Cannot get elasticsearch to run as a service on Ubuntu 12.0.4 (Natty). ElasticSearch may not be able to start

I read three of the suggested solutions here and here and here . Followed by these three, however it did not work. Whenever I tried to use elasticsearch as a service:

/etc/init.d/elasticsearch start

he always gives me:

Waiting for ElasticSearch................................
WARNING: ElasticSearch may have failed to start.

Now when I try to find the error log (/ var / log / elasticsearch), it never exists. ANY idea?

+2
source share
2 answers

Make sure that you have the JDK, and you have specified JAVA_HOMEand ES_HOMEvars.

The following snippet works for me:

sudo apt-get install openjdk-6-jdk # if you haven't
sudo export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64 >> /etc/bash.bashrc
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.6.tar.gz
tar xvf elasticsearch-0.90.6.tar.gz
mv elasticsearch-0.90.6 elasticsearch
cd elasticsearch
sudo export ES_HOME=`(pwd)` >> /etc/bash.bashrc
cd ./bin
./elasticsearch -f  # to run in the foreground

, , , , :

tail -f ES_HOME/logs/elasticsearch.log

, pid. . :

ps -ef |grep elasticsearch
kill #PID result of previous command

:

pkill -f elasticsearch
+6

All Articles