无法启动elasticsearch的服务

2024-10-01 04:59:38 发布

您现在位置:Python中文网/ 问答频道 /正文

我无法启动elasticsearch的服务。我在elasticsearch中配置了所有东西。但我运行它的服务时出错了。在

 $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

我不知道我犯了什么错误。有谁能给我一些建议来解决这个问题并开始服务吗。在


Tags: init错误etcnotelasticsearch建议daemonstarting
1条回答
网友
1楼 · 发布于 2024-10-01 04:59:38

从弹性搜索文档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后台程序重新加载 sudo/bin/systemctl启用弹性搜索服务 sudo/bin/systemctl启动弹性搜索服务在

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)

^{pr2}$

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:

例如:

PATH=/bin/systemctl daemon-reload

相关问题 更多 >