简体   繁体   English

继续在Ubuntu启动时启动ElasticSearch

[英]Keep having to start ElasticSearch on Ubuntu start up

I am using the latest Ubuntu build 15.10 and have gone through the install of ElasticSearch here: https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-service.html 我正在使用最新的Ubuntu版本15.10,并在此处进行了ElasticSearch的安装: https ://www.elastic.co/guide/en/elasticsearch/reference/current/setup-service.html

However, even after executing the command that adds the service to the start up process. 但是,即使在执行将服务添加到启动过程的命令之后。

sudo update-rc.d elasticsearch defaults 95 10
sudo /etc/init.d/elasticsearch start

Rebooting the computer, then going to localhost:9200 gives a 404. 重新启动计算机,然后转到localhost:9200会得到404。

And every single morning I run the sudo /etc/init.d/elasticsearch start , then the sudo update-rc.d elasticsearch defaults 95 10 in hopes that tomorrow will be a different day, to find my machine in the exact same state as yesterday. 每天早晨,我都运行sudo /etc/init.d/elasticsearch start ,然后sudo update-rc.d elasticsearch defaults 95 10 ,希望明天是不同的一天,以使我的机器处于与以下状态完全相同的状态昨天。

On a side note, my machine at work uses the same version of Ubuntu and the steps described above worked on the first try. 附带一提,我的机器正在使用相同版本的Ubuntu,并且上述步骤在第一次尝试时就起作用了。

If anyone has overcome this issue, your insight would be very appreciated! 如果有人克服了这个问题,您的见解将不胜感激!

Thanks you! 谢谢!

Ubuntu, since version 15.04, is using systemd by default instead of the older upstart for handling services and init scripts. 从版本15.04开始,Ubuntu 默认使用systemd而不是较早的upstart来处理服务和初始化脚本。 I think you need to initialize elasticsearch differently, as described in the ES docs . 我认为您需要以不同的方式初始化Elasticsearch,如ES docs中所述

Something like: 就像是:

sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
sudo /bin/systemctl start elasticsearch.service

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM