Elasticsearch不会在Ubuntu 16.04上启动?

时间:2017-02-20 07:32:23

标签: ubuntu elasticsearch

我正在使用Ubuntu 16.04并从https://www.elastic.co/guide/en/elasticsearch/reference/5.2/deb.html安装弹性搜索,现在启动它后不会导致任何日志是否开始。然后我输入了命令sudo service elasticsearch status

● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendo
   Active: failed (Result: exit-code) since Mon 2017-02-20 12:56:37 IST; 2s ago
     Docs: http://www.elastic.co
  Process: 26953 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_D
  Process: 26950 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd
 Main PID: 26953 (code=exited, status=1/FAILURE)

Feb 20 12:56:37 saikiran-ubuntu systemd[1]: Starting Elasticsearch...
Feb 20 12:56:37 saikiran-ubuntu systemd[1]: Started Elasticsearch.
Feb 20 12:56:37 saikiran-ubuntu elasticsearch[26953]: Could not find any executa
Feb 20 12:56:37 saikiran-ubuntu systemd[1]: elasticsearch.service: Main process 
Feb 20 12:56:37 saikiran-ubuntu systemd[1]: elasticsearch.service: Unit entered 
Feb 20 12:56:37 saikiran-ubuntu systemd[1]: elasticsearch.service: Failed with r

我在stackoverflow上尝试了一些解决方案,包括这个sudo chown -R elasticsearch:elasticsearch /var/lib/elasticsearch/ ,甚至尝试重新启动服务,但没有任何效果。即使此修复https://github.com/elastic/elasticsearch/issues/10671也无效。

有关如何解决此问题的任何建议?

3 个答案:

答案 0 :(得分:2)

我认为你没有安装/识别java。 试试这个来安装Oracle的java:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && sudo apt-get install oracle-java8-installer

试验:

java -version

然后运行ES服务:

sudo service elasticsearch start

现在一切都应该有效

答案 1 :(得分:0)

根据this,尝试设置

在/ etc / default / elasticsearch中将START_DAEMON设置为true

这对我有用。

答案 2 :(得分:0)

我遇到了类似的问题,就我而言,我已经在Ubuntu上安装了弹性搜索7.5.1版,并最终成功安装并运行。