Python Team
Python Team

Reputation: 1171

Can't start elasticsearch's service

I am not able to start elasticsearch's service. I configured everything in elasticsearch. But when I run its service, I am getting the following error.

 $Stopping elasticsearch: /etc/init.d/elasticsearch: 129: /etc/init.d/elasticsearch: killproc: not found

 $Starting elasticsearch: /etc/init.d/elasticsearch: 119: /etc/init.d/elasticsearch: daemon: not found

I don't know what mistake I did. Can anyone give me any suggestions to clear this issue and start service.

Upvotes: 0

Views: 1994

Answers (1)

glls
glls

Reputation: 2403

from Elastic Searches docs https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-service.html

RPM based distributionsedit Using chkconfigedit

Some RPM based distributions are using chkconfig to enable and disable services. The init script is located at /etc/init.d/elasticsearch, where as the configuration file is placed at /etc/sysconfig/elasticsearch. Like the debian package the RPM package is not started by default after installation, you have to do this manually by entering the following commands

sudo /sbin/chkconfig --add elasticsearch 
startsudo service elasticsearch

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

Distributions like Debian Jessie, Ubuntu 14, and many of the SUSE derivatives do not use the chkconfig tool to register services, but rather systemd and its command /bin/systemctl to start and stop services (at least in newer versions, otherwise use the chkconfig commands above)

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

https://unix.stackexchange.com/questions/180342/running-init-d-script-produces-start-stop-daemon-not-found

add PATH to your script PRIOR TO /bin or /sbin. Since the init script might not share the PATH environment variable with the rest of the system you might need to set it directly in your script and make sure /bin or /sbin is in there:

Ex:

PATH=/bin/systemctl daemon-reload

Upvotes: 1

Related Questions