Can't get elasticsearch to run as a service on Ubuntu 12.0.4 (Natty) - ElasticSearch may have failed to start

╄→尐↘猪︶ㄣ 提交于 2019-12-04 17:21:38

Make sure that you have the JDK and you have specified the JAVA_HOME and the ES_HOME vars.

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

Whenever you want, you can type the following, in order to see what the program do:

tail -f ES_HOME/logs/elasticsearch.log

Finally, you can kill the program with the pid. There are a lot of ways. A simple is the following:

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

of more easy:

pkill -f elasticsearch
Harsukh Makwana

Configure the elastic search in ubuntu. Please check here for the proper guidance.

Installing ElasticSearch on Ubuntu 12.04

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!