在Ubuntu 12.0.4(Natty)上无法使弹性搜索作为服务运行 - ElasticSearch可能无法启动 [英] Can't get elasticsearch to run as a service on Ubuntu 12.0.4 (Natty) - ElasticSearch may have failed to start
问题描述
我已经阅读了三个提供的解决方案:这里和此处和此处。跟随这三个,但它不工作。每当我尝试运行弹性搜索服务时:
/etc/init.d/elasticsearch start
它总是给我:
等待ElasticSearch ................................
警告:ElasticSearch可能无法启动。
现在,当我尝试找到错误日志(/ var / log / elasticsearch)时,它从来没有。确定你有JDK,你已经指定了 JAVA_HOME
和 ES_HOME
vars。
以下片段适用于我:
sudo apt-get安装openjdk-6-jdk#如果没有
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#在前台运行
每当你想要的时候,你可以输入以下内容,以查看该程序的作用:
tail - f ES_HOME / logs / elasticsearch.log
最后,你可以用pid杀死程序。有很多方法。一个简单的如下:
ps -ef | grep elasticsearch
kill #PID以前命令的结果
更容易:
pkill -f elasticsearch
I've read three of the solutions provided here and here and here. Followed those three however it doesn't work. Whenever I tried running elasticsearch as a service:
/etc/init.d/elasticsearch start
it 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's never there. ANy idea?
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
这篇关于在Ubuntu 12.0.4(Natty)上无法使弹性搜索作为服务运行 - ElasticSearch可能无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!