Elasticsearch unreachable error with logstash configuration

I am getting error when I am trying to access elasticsearch from logstash configuration.
elasticsearch and logstash version - 7.4.0

logstash configuration :-

input{
}
output {
elasticsearch {
hosts => ["icici-elk-production.nip.io"]
index => "winston-logs"
}
}

error :-

error=>"Elasticsearch Unreachable: [http://icici-elk-production.nip.io:9200/][Manticore::ConnectTimeout] connect timed out"}

You can see in error automatically port is appended to elasticsearch url. My elasticsearch is hosted on server and my logstash conf file is on my local system.
Can anyone tell me how this port 9200 is automatically append to my elasticearch url?

Thanks

Note: icici-elk-production.nip.io is my elasticsearch proxy url.

The Elasticsearch API runs on port 9200 by default, so unless you specify otherwise (e.g., hosts => ["foo.com:1234"], the Elasticsearch Output Plugin for Logstash assumes you want to connect to 9200.

Hi Yaauie,
In which file I have to made this changes.

Thanks

The Elasticsearch Output Plugin for Logstash is configured in the output section of your pipeline configuration, so if you want it to output to port 80 on icici-elk-production.nip.io, your pipeline configuration would include something like:

output {
  elasticsearch {
    hosts => ["icici-elk-production.nip.io:80"]
    index => "winston-logs"
  }
}

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