Logstash can't connect to Elasticsearch when install X-Pack

When i install x-pack plugin for ES, kibana, and logstash.
Kibana work well.
But Logstash can't connect to the ES. (ES install in a remote server).
Before install x-pack, logstash work well.
My logstash output configuration:

elasticsearch {
        hosts => [ "ip_of_es_server:9200" ]
        user: "myuser"
        password: "mypasssword"
    }

The log errors here:

LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://myuser:xxxxxx@localhost:9200/][Manticore::SocketException] Connection refused: connect"}

Can you curl the Elasticsearch host from the Logstash one using those details?

It's here:

    {
      "name" : "5gqJdvp",
      "cluster_name" : "elasticsearch",
      "cluster_uuid" : "r8qPXLeXSuOwWnOIj7x-Jw",
      "version" : {
        "number" : "5.4.3",
        "build_hash" : "eed30a8",
        "build_date" : "2017-06-22T00:34:03.743Z",
        "build_snapshot" : false,
        "lucene_version" : "6.5.1"
      },
      "tagline" : "You Know, for Search"
    }

The error log above appear when i start logstash.

Is that config above exactly what you have in Logstash? Because it's not syntactically correct if it is.

Here is all my pipeline conf file that i use to run logstash:

# The # character at the beginning of a line indicates a comment. Use
# comments to describe your configuration.
input {
	beats {
        port => "5043"
    }
}
# The filter part of this file is commented out to indicate that it is
# optional.
filter {
  json {
    source => "message"
	remove_field => ["message","input_type","source","type"]
  }
  date {
    match => [ "ActionDate", "yyyy-MM-dd HH:mm:ss" ]
  }
}
output {
     elasticsearch {
        hosts => [ "192.168.2.61:9200" ]
	user => "myuser"
	password => "mypass"
        flush_size => 10000
    }
}

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