Can't connect to Elasticsearch from logstash version8.2

I want to use Elasticsearch and Logstash(ver 8.2).
After installed Elasticsearch and Kibana, I installed logstash.
But I got error.It seems logstash can't connect to Elasticsearch.
But Elasticsearch is runnning correctly.
(This configuration run correctly when used version 7)

Someone please teach me this reason?
Error message and configration is below.

----ERROR when start logstash-------
[INFO ][logstash.outputs.Elasticsearch][main] Failed to perform request {:message=>" failed to respond", :exception=>Manticore::ClientProtocolException, :cause=>org.apache.http.NoHttpResponseException: failed to respond}
[WARN ][logstash.outputs.Elasticsearch][main] Attempted to resurrect connection to dead ES instance, but got an error {:url=>"http://elastic:xxxxxx@", :exception=>LogStash::Outputs::Elasticsearch::HttpClient::Pool::HostUnreachableError, :message=>"Elasticsearch Unreachable: [][Manticore::ClientProtocolException] failed to respond"}

----logstash config(only output)----

output {
  elasticsearch {
    hosts => [""]
    index => "indexname"
    user => "elastic"
    password => "password"
    codec => rubydebug

  1. Firewall and port
  2. Elasic interface in Elasticsearch.yml
    Set and restart ES

Thanks for your response!
I tried but still can't connect to Elasticsearch form logstash.

1)Firewall and port
--> I set firewall , TCP 9200

2)Elastic interface in Elasticsearch.tml
--> I already set "" in Elasticsearch.yml as below.

--------network part in elasticsearch.yml-------
http.port: 9200

Are there others reason?
Can anyone help me?

What will happen when you access "" using browser or curl command?

Thanks for your reply!

With Browser, access "", I got below
(of course I entered ID and Pass)

  "name" : "XXXXXX",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "XXXXXX",
  "version" : {
    "number" : "8.2.2",
    "build_flavor" : "default",
    "build_type" : "zip",
    "build_hash" : "XXXXXX",
    "build_date" : "2022-05-25T15:47:06.259735307Z",
    "build_snapshot" : false,
    "lucene_version" : "9.1.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  "tagline" : "You Know, for Search"

But, access "", I could not get response.

Is this means that I need setting of SSL in logstash configuration?
I saw manuarl below, but there was no comment.

If this is the reason, would you tell me the configuration I have to add?

※Below in in japanese with same meaning
https では出力が上記の通り出ましたが、httpではレスポンスがありませんでした。

1 Like

Change two params:

output {
Elasticsearch {
hosts => [""]
index => "indexname"
user => "elastic"
password => "password"
ssl_certificate_verification => false
codec => rubydebug

1 Like

Thank you for your reply!

It's exactly as you said.
I changed logstash configuration, and logstash worked correctly!
Thank you for your good advice!!

1 Like

This is minimum to establish SSL, however not sure will CISO accept that. Latter you can generate certificates and improve security -> link

1 Like

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