Elasticsearchdd service failure

I just switched to systemd on my Linux 14.10 and now my elasticsearch service is not starting properly

elasticsearch.service             loaded failed failed  

a systemctl statusgives me the following:

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)

I have no experience in managing services, and I'm pretty new to systemd, so I don’t see how I can solve this.

Can someone point me in the right direction? Thank!

+4
source share
2 answers

Ok, I solved this by deleting the elasticsearch.service file, disabling the service, and reinstalling this:

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

- , , systemd. . Java.

sudo -u elasticsearch/usr/share/elasticsearch/bin/elasticsearch \                                                 -Des.pidfile =/var/run/elasticsearch/elasticsearch.pid \                                                 -Des.default.path.home =/usr/share/elasticsearch \                                                 -Des.default.path.logs =/var/log/elasticsearch \                                                 -Des.default.path.data =/var/lib/elasticsearch \                                                 -Des.default.path.conf =/ .. /elasticsearch

: no java in (/usr/sbin:/usr/bin:/sbin:/bin) java . , java PATH JAVA_HOME

+1

All Articles