1、elasticsearch启动失败如下:[root@bogon home]# /home/elasticsearch-6.3.0/bin/elasticsearch[2019-02-11T07:15:14,874][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] 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:140) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.3.0.jar:6.3.0] at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.3.0.jar:6.3.0] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86) ~[elasticsearch-6.3.0.jar:6.3.0]Caused by: java.lang.RuntimeException: can not run elasticsearch as root at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:104) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:171) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) ~[elasticsearch-6.3.0.jar:6.3.0] at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.3.0.jar:6.3.0] ... 6 more原因:出于对root用户的安全保护,需要使用其他用户组进行授权启动解决:groupadd elsearch useradd elsearch -g elsearch -p elasticsearchchown -R elsearch:elsearch elasticsearch-6.3.0说明: 添加用户组 elsearch 添加用户 elsearch 密码为 elasticsearch 到用户组 elsearch 将elsearch安装目录授权给 用户组:用户 即 elsearch:elsearch重启elasticsearchsu elsearch/home/elasticsearch-6.3.0/bin/elasticsearch2、elasticsearch启动报错如下:ERROR: [2] bootstrap checks failed[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536][2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144][2019-02-11T07:20:56,458][INFO ][o.e.n.Node ] [lKlZCZf] stopping ...[2019-02-11T07:20:56,938][INFO ][o.e.n.Node ] [lKlZCZf] stopped[2019-02-11T07:20:56,938][INFO ][o.e.n.Node ] [lKlZCZf] closing ...[2019-02-11T07:20:57,013][INFO ][o.e.n.Node ] [lKlZCZf] closed[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]原因:虚拟机限制用户的执行内存解决:修改安全限制配置文件说明:使用最高权限 修改安全配置 在文件末尾加入su root cat> /etc/security/limits.conf<