Job for elasticsearch.service failed because the service did not take the steps required by its unit configuration

Hi. I've just installed Elasticsearch 7.4 on three openSuSE LEAP 15.1 machines. Two are fine, one throws this systemd error:

$ sudo systemctl start elasticsearch
Job for elasticsearch.service failed because the service did not take the steps required by its unit configuration.
See "systemctl status elasticsearch.service" and "journalctl -xe" for details.

Systemctl status says:
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: failed (Result: protocol) since Wed 2019-10-16 13:35:41 EDT; 27min ago
Docs: http://www.elastic.co
Process: 2303 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 2303 (code=exited, status=1/FAILURE)

Oct 16 13:35:12 dibri systemd[1]: Starting Elasticsearch...
Oct 16 13:35:13 dibri elasticsearch[2303]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Oct 16 13:35:41 dibri systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Oct 16 13:35:41 dibri systemd[1]: Failed to start Elasticsearch.
Oct 16 13:35:41 dibri systemd[1]: elasticsearch.service: Unit entered failed state.
Oct 16 13:35:41 dibri systemd[1]: elasticsearch.service: Failed with result 'protocol'.

Any idea what the 'protocol' error is trying to say? This is a fresh install, no changes to default elastic files. Thanks.

@bayardk
I had the same issue this morning with my 7.4 setup. I think i read through 20+ threads on various sites. I found a thread that led me to this link below and it solved my problem.

Quick overview of how my issue came about.

  1. New ELK stack built yesterday
  2. I ran into the issue after a restarting elasticsearch that was needed because I changed my network.host to 0.0.0.0 on elasticsearch.yml
  3. Key was the bootstrap check failed because i didnt have the necessary cluster configuration with nodes, master, memory swap config, etc....
  4. I made all the necessary changes, but discovered that my elasticsearch.service file was not updated properly. The systemd configuration piece at the bottom of this link was the true fix.

https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-system-settings.html#systemd

Hope this leads you to a quick fix.

Thanks! Unfortunately, I tried the page suggestions and still get the same error. Does anyone know how to troubleshoot the systemd error to find out what a 'protocol' error means?

@ bayardk,

i played around some more and I solved my problem in a much more simple way.

in elasticsearch.yml

set your network.host to 0.0.0.0

Under Discovery add this with your own IP Address Info

discovery.seed_hosts:
   - 0.0.0.0:9300 #  This port is important.  Dont enter 9200 by mistake.
   - 192.168.1.50:9300 # Enter the actual IP of your elasticsearch server

Dont mess with any other junk that has been written in all the other posts. I didnt set node name, or cluster name etc. This may not be the preferred solution, but it works like a charm for me.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.