Elasticsearch unreachable from Logstash


#1

Hello everyone,
I have searched for a long time for a solutios, but found none yet.

When I run Logstash to connect to Elasticsearch through the local network, it is not working. I get the following message:
Sep 24 12:59:37 elasticsearch1 logstash[28554]: [2018-09-24T12:59:37,507] [WARN ] [logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://192.168.144.163:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://192.168.144.163:9200/][Manticore::SocketException] Connection refused (Connection refused)"}

here is my logstash configuration file:

input {
  beats {
    port => 5044
  }
}

filter {
}

output {
  elasticsearch {
    hosts => ["192.168.144.163:9200"] 
  }
}

I let elasticsearch.yml without changing anything. If I try to put the change suggested in this thread, I get the following message: Caused by: java.lang.IllegalArgumentException: unknown setting [xpack.monitoring.elasticsearch.url] please check that any required plugins are installed, or check the breaking changes documentation for removed settings

Note that tcpdump in the Elasticsearch machine shows connection attempts from the Logstash machine.

How can I make Logstash and Elasticsearch work together?

Thank you for your answers


(Jake Landis) #2

You may want to try to set the network.host setting in elasticsearch.yml

https://www.elastic.co/guide/en/elasticsearch/reference/current/network.host.html


#3

It worked, thanks. Then I had to modify vm.max_map_count and max file descriptors using:

since this solution automatically made elasticsearch go in production mode


(system) #4

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