# How to specify proxy\_url on Logstash with x-pack

**URL:** <https://discuss.elastic.co/t/how-to-specify-proxy-url-on-logstash-with-x-pack/103887>\
**Category:** Logstash\
**Created:** [October 13, 2017, 11:55am UTC](https://discuss.elastic.co/t/how-to-specify-proxy-url-on-logstash-with-x-pack/103887 "2017-10-13T11:55:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giancarlo\_Rubio](https://avatars.discourse-cdn.com/v4/letter/g/51bf81/32.png) [@Giancarlo\_Rubio](https://discuss.elastic.co/u/Giancarlo_Rubio)\
**Post date:** [October 13, 2017, 11:55am UTC](https://discuss.elastic.co/t/how-to-specify-proxy-url-on-logstash-with-x-pack/103887/1 "2017-10-13T11:55:53Z")

</div>

My Logstash is running behind a proxy server with all the logs successfully delivered to Elasticsearch Cloud. Now I'm trying to enable x-pack on logstash and looks like xpack is not following my proxy. Besides that I can't found any doc related to enable proxy on logstash with x-pack.

My es output  
...  
output {  
elasticsearch {  
hosts =\> "[https://xxx.europe-west1.gcp.cloud.es.io:9243/](https://xxx.europe-west1.gcp.cloud.es.io:9243/)"  
password =\> "xxxx"  
user =\> "logstash\_internal"  
proxy =\> "[http://proxy.my.url:8080](http://proxy.my.url:8080)"  
}  
}  
...

I tried to set all possible variables to setup the proxy but it didn't worked .

```
set JRUBY_OPTS="-J-Dhttp.proxyHost=proxy.myhost.local -J-Dhttp.proxyPort=8080"
set http_proxy="http://proxy.myhost.local:8080"
set https_proxy="http://proxy.myhost.local:8080"
set HTTP_PROXY="http://proxy.myhost.local:8080"
set HTTPS_PROXY="http://proxy.myhost.local:8080"
set LS_JAVA_OPTS="-Dhttp.proxyHost=proxy.myhost.local -Dhttp.proxyPort=8080" 

Errors 
[2017-10-13T13:23:44,858][INFO][logstash.licensechecker.licensereader] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>https://logstash_internal:xxxxxx@xxxx.europe-west1.gcp.cloud.es.io:9243/, :path=>"/"}
[2017-10-13T13:23:49,874][INFO][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>https://logstash_internal:xxxxxx@xxx.europe-west1.gcp.cloud.es.io:9243/, :path=>"/"}
[2017-10-13T13:23:54,874][WARN][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"https://logstash_internal:xxxxxx@xxx.europe-west1.gcp.cloud.es.io:9243/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [https://logstash_internal:xxxxxx@xxx.europe-west1.gcp.cloud.es.io:9243/][Manticore::ConnectTimeout] connect timed out"}
```

---

<div class="post-metadata">

**Author:** ![Giancarlo\_Rubio](https://avatars.discourse-cdn.com/v4/letter/g/51bf81/32.png) [@Giancarlo\_Rubio](https://discuss.elastic.co/u/Giancarlo_Rubio)\
**Post date:** [October 13, 2017, 11:59am UTC](https://discuss.elastic.co/t/how-to-specify-proxy-url-on-logstash-with-x-pack/103887/2 "2017-10-13T11:59:38Z")

</div>

Without proxy and with the same configuration, x-pack and Logstash work

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 10, 2017, 11:59am UTC](https://discuss.elastic.co/t/how-to-specify-proxy-url-on-logstash-with-x-pack/103887/3 "2017-11-10T11:59:48Z")

</div>

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