3

I just followed this install guide for Elasticsearch via APT: https://www.elastic.co/guide/en/elasticsearch/reference/5.0/deb.html

When I run curl -X GET 'http://127.0.0.1:9200/' (or localhost) I receive an error: Failed to connect to 127.0.0.1 port 9200: Connection refused

In my configuration, I'm using:

network.bind_host: localhost
network.publish_host: 0.0.0.0
network.host: 0.0.0.0
http.port: 9200

My log at /var/log/elasticsearch/ is blank, but looking at sudo journalctl --unit elasticsearch I see:

Starting Elasticsearch...
Started Elasticsearch.
elasticsearch.service: Main process exited, code=killed, status=9/KILL
elasticsearch.service: Unit entered failed state.
elasticsearch.service: Failed with result 'signal'.
Starting Elasticsearch...
Started Elasticsearch.
elasticsearch.service: Main process exited, code=killed, status=9/KILL
elasticsearch.service: Unit entered failed state.
elasticsearch.service: Failed with result 'signal'.
Starting Elasticsearch...
Started Elasticsearch.
elasticsearch.service: Main process exited, code=killed, status=9/KILL
elasticsearch.service: Unit entered failed state.
elasticsearch.service: Failed with result 'signal'.
...

How can I track down the holdup in getting this service online?

iRyanBell
  • 413
  • 2
  • 11
  • 20

1 Answers1

1

undo your configuration changes and service should start:

  • bind_host is defaults to network.host (in your case it's 0.0.0.0), yet you're forcing to localhost? (0.0.0.0 != localhost)
  • network.host - for security reason, I wouldn't set to 0.0.0.0 (default: 127.0.0.1)
  • http.port - is set to 9200 by default.
alexus
  • 12,342
  • 27
  • 115
  • 173
  • I switched from a t2.small (2GB ram) to a t2.medium (4Gb RAM) EC2 server and this seemed to get it up and running. It looks like elasticsearch wants to see *64Gb* – iRyanBell Feb 21 '17 at 22:00
  • @arby: BTW, Elasticsearch could start at 2Gb of RAM check /etc/elasticsearch/jvm.options file and change default values to: -Xms2g -Xmx2g – adel-s Mar 31 '17 at 10:32