# Error downloading GeoIP behind proxy in Elasticsearch

**URL:** <https://discuss.elastic.co/t/error-downloading-geoip-behind-proxy-in-elasticsearch/297152>\
**Category:** Elasticsearch\
**Created:** [February 14, 2022, 2:24pm UTC](https://discuss.elastic.co/t/error-downloading-geoip-behind-proxy-in-elasticsearch/297152 "2022-02-14T14:24:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RdrgPorto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rdrgporto/32/13278_2.png) [@RdrgPorto](https://discuss.elastic.co/u/RdrgPorto)\
**Post date:** [February 14, 2022, 2:24pm UTC](https://discuss.elastic.co/t/error-downloading-geoip-behind-proxy-in-elasticsearch/297152/1 "2022-02-14T14:24:32Z")

</div>

Hi, everyone

I have just installed **Elasticsearch 7.16.3** in **Red Hat 7.9**. This virtual machine is **behind a proxy**. Looking over **Elasticsearch's log** , I have found an **error** related to **GeoIP** :

```auto
[2022-02-14T15:14:29,056][ERROR][o.e.i.g.GeoIpDownloader] [node-name] exception during geoip databases update
java.net.SocketTimeoutException: Connect timed out
        at sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:546) ~[?:?]
        at sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) ~[?:?]
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[?:?]
        at java.net.Socket.connect(Socket.java:633) ~[?:?]
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:299) ~[?:?]
        at sun.net.NetworkClient.doConnect(NetworkClient.java:178) ~[?:?]
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:498) ~[?:?]
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:603) ~[?:?]

```

Is there any way to configure **Elasticsearch behind a proxy**?

Thanks in advance,

Regards 🖖

## Update 🆕

I have added some **proxy parameters** in **jvm.options** file and it works 🙂 :

```auto
# Proxy
-Dhttp.proxyHost=<ip>
-Dhttp.proxyPort=<port>
-Dhttps.proxyHost=<ip>
-Dhttps.proxyPort=<port>

```

---

<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:** [March 14, 2022, 2:24pm UTC](https://discuss.elastic.co/t/error-downloading-geoip-behind-proxy-in-elasticsearch/297152/2 "2022-03-14T14:24:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Luca\_Belluccini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_belluccini/32/33239_2.png) [@Luca\_Belluccini](https://discuss.elastic.co/u/Luca_Belluccini)\
**Post date:** [May 20, 2022, 9:49am UTC](https://discuss.elastic.co/t/error-downloading-geoip-behind-proxy-in-elasticsearch/297152/3 "2022-05-20T09:49:50Z")

</div>

> [@RdrgPorto](#):
>
> ```auto
> # Proxy
> -Dhttp.proxyHost=<ip>
> -Dhttp.proxyPort=<port>
> -Dhttps.proxyHost=<ip>
> -Dhttps.proxyPort=<port>
> 
> ```

Just a clarification.

The solution above works, but I discourage it as it would imply all outgoing HTTP requests from Elasticsearch (not many, it only happens for a limited set of features such as Watcher webhooks...) would go through the proxy.

The [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/geoip-processor.html#use-custom-geoip-endpoint) covers how to setup a local mirror of GeoIP databases.

Please note support for HTTP Proxy is not yet available: [Add support to configure Proxy to allow geoip databases update · Issue #77069 · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/issues/77069)
