问题:elasticsearch systemd服务失败

我刚刚在我的 linux 14.10 上切换到 systemd,现在我的弹性搜索服务无法正常启动

elasticsearch.service             loaded failed failed  

systemctl status给了我以下信息:

elasticsearch.service - Starts and stops a single elasticsearch instance on this system
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled)
   Active: failed (Result: exit-code) since Mon 2015-04-13 23:23:54 CEST; 4s ago
     Docs: http://www.elasticsearch.org
  Process: 1227 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -Des.default.config=$CONF_FILE -Des.default.path.home=$ES_HOME -Des.default.path.logs=$LOG_DIR -Des.default.path.data=$DATA_DIR -Des.default.path.work=$WORK_DIR -Des.default.path.conf=$CONF_DIR (code=exited, status=3)
 Main PID: 1227 (code=exited, status=3)

我在管理服务方面没有经验,而且我对 systemd 还很陌生,所以我不知道如何解决这个问题。

有人能指出我正确的方向吗?谢谢 !

解答

好吧,我通过删除 elasticsearch.service 文件、禁用服务并重新安装它来解决它:

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

欢迎大家访问Elastic 中国社区。由Elastic 资深布道师,Elastic 认证工程师,认证分析师,认证可观测性工程师运营管理。

更多推荐