ELK安装错误总结

1、不能以root用户启动

当启动elasticsearch时,出现如下报错,说明是用了root用户启动了,换个非root用户启动就好,并授予elasticsearch安装目录相关用户权限。

 

[root@logmachine bin]# ./elasticsearch
[2017-05-31T12:20:47,841][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [node-1] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
 at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:127) ~[elasticsearch-5.4.0.jar:5.4.0]
 at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) ~[elasticsearch-5.4.0.jar:5.4.0]
 at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) ~[elasticsearch-5.4.0.jar:5.4.0]
 at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.4.0.jar:5.4.0]
 at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.4.0.jar:5.4.0]
 at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.4.0.jar:5.4.0]
 at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.4.0.jar:5.4.0]
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
 at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:106) ~[elasticsearch-5.4.0.jar:5.4.0]
 at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:204) ~[elasticsearch-5.4.0.jar:5.4.0]
 at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:360) ~[elasticsearch-5.4.0.jar:5.4.0]
 at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.4.0.jar:5.4.0]
 ... 6 more

2、linux中参数报错

ERROR: bootstrap checks failed
max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]
max number of threads [1024] for user [elasticsearch] is too low, increase to at least [2048]
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

错误①:编辑文件vim /etc/security/limits.conf,添加

* – nofile 65536

错误②:编辑文件vim /etc/security/limits.d/90-nproc.conf,修改

* soft nproc 2048

错误③:编辑文件vim /etc/sysctl.conf,添加

vm.max_map_count=655360

然后重启机器,再以对应的用户运行即可。

 

0
如无特殊说明,文章均为本站原创,转载请注明出处
  • 转载请注明来源:ELK安装错误总结
  • 本文永久链接地址:http://www.hongxiaowei.com/xiaowei/556.html

该文章由 发布

这货来去如风,什么鬼都没留下!!!