Elasticsearch Unreachable

I'm facing the weird error. Likely, this is the scenario.

  1. Start Ubuntu 16.04 on my VM
  2. Start elasticsearch, kibana using sudo service
  3. Verify in browser if everything is fine. I can see the right output on browser at the startup.
  4. Start the logstash with the below command
    /usr/share/logstash/bin/logstash --path.settings /etc/logstash -f /etc/logstash/conf.d/console_worked.conf
  5. When I check the logs, elasticsearch isn't working. Connection refused. In browser, localhost:9200 is not reachable. What might be the reason?

Since elasticsearch instance isn't running, i can't check _cluster/pending_tasks?pretty status.

Please help me in learning. I'm so struck.

[2017-04-18T16:52:37,749][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://localhost:9200/, :path=>"/"}
[2017-04-18T16:52:37,755][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>#<URI::HTTP:0x3ec6624 URL:http://localhost:9200/>, :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://localhost:9200/][Manticore::SocketException] Connection refused (Connection refused)"}
[2017-04-18T16:52:42,775][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://localhost:9200/, :path=>"/"}
[2017-04-18T16:52:42,783][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>#<URI::HTTP:0x3ec6624 URL:http://localhost:9200/>,     :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://localhost:9200/][Manticore::SocketException] Connection refused (Connection refused)"}
[2017-04-18T17:02:02,373][WARN ][logstash.outputs.elasticsearch] UNEXPECTED POOL ERROR {:e=>#<LogStash::Outputs::ElasticSearch::HttpClient::Pool::NoConnectionAvailableError: No Available connections>}
[2017-04-18T17:02:02,378][ERROR][logstash.outputs.elasticsearch] Attempted to send a bulk request to elasticsearch, but no there are no living connections in the connection pool. Perhaps Elasticsearch is unreachable or down? {:error_message=>"No Available connections", :class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::NoConnectionAvailableError", :will_retry_in_seconds=>64}

I resolved the issue.

I increased my VM configuration. RAM as 8GB.

Then on start up,

Start elasticsearch
Stop Kibana
Start logstash

then after loading the data, start Kibana. Don't know if this is the reason for the resolution, but I tried something and it worked. Hopefully someone can use this too.

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