A-A+

elasticsearch 启动报错解决方法

2018年09月28日 18:42 学习笔记 暂无评论 阅读 4,452 views 次

【注意:此文章为博主原创文章!转载需注意,请带原文链接,至少也要是txt格式!】

在启动elasticsearch之后发现没有正常启动。查看了一下

systemctl status elasticsearch.service

结果如下错误。当时一脸懵逼,什么也没动怎么就错了,

[admin@xxxxxx ~]$ systemctl status elasticsearch.service 
● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since 五 2018-09-28 17:29:48 CST; 1min 9s ago
     Docs: http://www.elastic.co
  Process: 4097 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
 Main PID: 4097 (code=exited, status=1/FAILURE)

9月 28 17:29:48 xxxxxx.centos elasticsearch[4097]: ... 8 more
9月 28 17:29:48 xxxxxx.centos elasticsearch[4097]: Caused by: while scanning a simple key
9月 28 17:29:48 xxxxxx.centos elasticsearch[4097]: in 'reader', line 91, column 1:
9月 28 17:29:48 xxxxxx.centos elasticsearch[4097]: allow origin
9月 28 17:29:48 xxxxxx.centos elasticsearch[4097]: ^
9月 28 17:29:48 xxxxxx.centos elasticsearch[4097]: could not find expected ':'
9月 28 17:29:48 xxxxxx.centos elasticsearch[4097]: in 'reader', line 92, column 1:
9月 28 17:29:48 xxxxxx.centos systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
9月 28 17:29:48 xxxxxx.centos systemd[1]: Unit elasticsearch.service entered failed state.
9月 28 17:29:48 xxxxxx.centos systemd[1]: elasticsearch.service failed.

发现不出什么猫腻,为什么呢,什么原因呢,,还是看看日志先。

tail -f /var/log/elasticsearch/your_cluster_name.log

没发现什么错误,但是从新查看状态的时候发现如下错误。
结果如下:


9月 28 18:38:38 xxxxxx.centos elasticsearch[7208]: at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1192)
9月 28 18:38:38 xxxxxx.centos elasticsearch[7208]: at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1165)
9月 28 18:38:38 xxxxxx.centos elasticsearch[7208]: at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:100)
9月 28 18:38:38 xxxxxx.centos elasticsearch[7208]: at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:95)
9月 28 18:38:38 xxxxxx.centos elasticsearch[7208]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
9月 28 18:38:38 xxxxxx.centos elasticsearch[7208]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
9月 28 18:38:38 xxxxxx.centos elasticsearch[7208]: at org.elasticsearch.cli.Command.main(Command.java:90)
9月 28 18:38:38 xxxxxx.centos systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
9月 28 18:38:38 xxxxxx.centos systemd[1]: Unit elasticsearch.service entered failed state.
9月 28 18:38:38 xxxxxx.centos systemd[1]: elasticsearch.service failed.

-----------不说废话了,再说废话就被打死了解决方案-------------
是因为我之前不小心修改了elasticsearch.yml配置文件导致的,所以你需要从新设置一下这个文件哦。

布施恩德可便相知重

微信扫一扫打赏

支付宝扫一扫打赏

×

给我留言