Elasticsearch input running behind a proxy

Hi all,
I'm trying to get data from an Elasticsearch cluster to another via Logstash the problem is that the input cluster is running behind a proxy. This is my configuration:

input {
  elasticsearch {
    hosts => "myhost:9200"
    index => "test"
    user => "xxxx"
    password => "xxxx" 
 }
}
output {
  elasticsearch {
    hosts => "localhost:9200"
    index => "test"
  }
}

I always get this error:

[ERROR] 2018-05-28 13:41:44.800 [[main]<elasticsearch] pipeline - A plugin had an unrecoverable error. Will restart this plugin.
  Pipeline_id:main
  Plugin: <LogStash::Inputs::Elasticsearch...
  Error: Net::ReadTimeout
  Exception: Faraday::TimeoutError
  ...

It tried to add this environment variable when running Logstash but nothing has changed.
export LS_JAVA_OPTS=-Dhttp.proxyHost=myproxy.mydomain.com -Dhttp.proxyPort=8080
I also tried to add the http_proxy variable.

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