Error downloading GeoIP behind proxy in Elasticsearch

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:

[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 :vulcan_salute:

Update :new:

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

# Proxy
-Dhttp.proxyHost=<ip>
-Dhttp.proxyPort=<port>
-Dhttps.proxyHost=<ip>
-Dhttps.proxyPort=<port>
4 Likes

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

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 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