elastic search 第一次安装 报错记录

安装版本 elasticsearch-5.5.2
安装路径 /usr/local/es/

启动报错:
/usr/local/es/elasticsearch-5.5.2/bin/
bash ./bash ./elasticsearch

Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000085330000, 2060255232, 0) failed; error=‘Cannot allocate memory‘ (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 2060255232 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /usr/local/es/elasticsearch-5.5.2/bin/hs_err_pid2353.log

  

解决:
切换到配置目录下  /usr/local/es/elasticsearch-5.5.2/config/
打开  jvm.options
将 -Xms2g 改为1g  (改1g不行就试试 改成 512m)

再次启动试一试吧。

报错:

org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:127) ~[elasticsearch-5.5.2.jar:5.5.2]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) ~[elasticsearch-5.5.2.jar:5.5.2]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) ~[elasticsearch-5.5.2.jar:5.5.2]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.5.2.jar:5.5.2]
	at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.5.2.jar:5.5.2]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.5.2.jar:5.5.2]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.5.2.jar:5.5.2]
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
	at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:106) ~[elasticsearch-5.5.2.jar:5.5.2]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:194) ~[elasticsearch-5.5.2.jar:5.5.2]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:351) ~[elasticsearch-5.5.2.jar:5.5.2]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.5.2.jar:5.5.2]

  

意思是不能用root用户来启动,那我们新建一个用户来启动

继续解决这个问题

## 意思是不能用root用户来启动,那我们新建一个用户来启动
[[email protected]_0_13_centos bin]# useradd elastic

##新建elastic用户 并且把目录权限赋予给elastic
[[email protected]_0_13_centos bin]#  chown -R elastic:elastic /usr/local/es/elasticsearch-5.5.2/

##我们切换成elastic用户,然后执行
[[email protected]_0_13_centos bin]# su elastic
[[email protected]_0_13_centos bin]$ sh /usr/local/es/elasticsearch-5.5.2/bin/elasticsearch

  

## -d 后台运行

[[email protected]_0_13_centos bin]$ sh /usr/local/es/elasticsearch-5.5.2/bin/elasticsearch -d

## 检查是否启动成功
[[email protected]_0_13_centos bin]$ ps -ef | grep elasticsearch

  

若出现这个表示成功

我们来验证下服务是否正常运行
 curl http://localhost:9200

  

{
  "name" : "QHNWXbg",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "hVyq1z2LR9aEiyBhEsU-fw",
  "version" : {
    "number" : "5.5.2",
    "build_hash" : "b2f0c09",
    "build_date" : "2017-08-14T12:33:14.154Z",
    "build_snapshot" : false,
    "lucene_version" : "6.6.0"
  },
  "tagline" : "You Know, for Search"
}

  

感谢:
java1234 小锋

https://m.aliyun.com/yunqi/articles/523874

原文地址:https://www.cnblogs.com/Uzai/p/11297365.html

时间: 2024-11-12 13:27:58

elastic search 第一次安装 报错记录的相关文章

hadoop安装报错记录

启动datanode失败 启动命令: /data/hadoop/sbin/hadoop-daemon.sh start datanode 查看日志有条FATAL日志: vi /data/hadoop/logs/hadoop-root-datanode-slave2.log ...... 2016-01-06 20:27:17,702 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for B

MSSQL 2012安装报错之0x858C001B

之前安装 Microsoft Sql Server 2012 R2 的时候总是报这样的错误: SQL Server Setup has encountered the following error: The SQL Server license agreement cannot be located for the selected edition, enterprise. This could be a result of corrupted media or the edition bei

rlwrap安装报错You need the GNU readline 解决方法

首先大家肯定知道rlwrap是干什么的? 在linux以及unix中,sqlplus的上下左右.回退无法使用,会出现乱码情况.而rlwrap这个软件就是用来解决这个的. 这个错误曾经困扰我很久很久!下载readline 安装,安装好readline 还是无法运行rlwrap的安装程序 在网上搜寻很久才找到一个靠谱的解决方法 原来rlwrap这个程序的安装,需要依赖两个包, 一个是readline,这个readline在RHEL中已经集成了.不需要去专门下载 另外一个包 libtermcap-de

mysql安装报错

如果编译时出现了以下错误:checking for tgetent in -ltermcap- nochecking for termcap functions library- configure: error: No curses/termcap library found说明 curses/termcap 库没有安装去下载一个ncurses-5.6.tar.gz,wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gztar zx

PHP编译安装报错: mcrypt.h not found. Please reinstall libmcrypt.

PHP编译安装报错: mcrypt.h not found. Please reinstall libmcrypt. 转载2016-04-25 12:40:44 标签:linuxitphp 解决方法: 1.为系统安装perl-Geo-IP,默认yum源中没有这个包,特意安装epel第三方yum源[[email protected] ~] rpm -Uvh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rp

jira安装报错 Unknown system variable 'default_storage_engine'

公司要使用BUG管理系统,所以对比了一下,最后决定安装jira. 安装后要在网页端,配置数据库,本地数据库是5.1的版本,一直有报错Unknown system variable 'default_storage_engine',在往上查询无果,my.ini设置也没用.把数据库远程连接到一个linux下的5.6版本就正常,最后决定安装5.6版本数据库. 问题解决.有些也是没办法的事情. jira安装报错 Unknown system variable 'default_storage_engin

duplicate symbol _OBJC_METACLASS_$ 报错记录

duplicate symbol _OBJC_METACLASS_$_TabbarButton in: /Users/hw201406/Library/Developer/Xcode/DerivedData/xxx-gafskbgawbctznekgfxqhaugwjce/Build/Intermediates/xxx.build/Debug-iphonesimulator/xxx06.build/Objects-normal/i386/TabbarButton-FDEB19611A30D765

InnoDB: The InnoDB memory heap is disabled报错记录

报错记录: [[email protected] ~]# cat /data/3307/data/localhost.localdomain.err  150509 21:21:27 mysqld_safe Starting mysqld daemon with databases from /data/3307/data 150509 21:21:27 InnoDB: The InnoDB memory heap is disabled 150509 21:21:27 InnoDB: Mute

DirectX 安装报错: 不能信任一个安装所需的压缩文件,请检查加密服务是否启用并且cabinet文件证书是否有效

DirectX 安装报错 不能信任一个安装所需的压缩文件,请检查加密服务是否启用并且cabinet文件证书是否有效 是直播软件open broadcaster software,这个软件安装的时候提示"your system is missing DirectX components that Open Broadcaster Software requires.Would you like to download them?"然后点是,就跳转微软的官方下载页面了. 下载dxwebse