# \_geoip\_database\_unavailable\_GeoLite2-City.mmdb Error

**URL:** <https://discuss.elastic.co/t/geoip-database-unavailable-geolite2-city-mmdb-error/359439>\
**Category:** Elastic Agent\
**Created:** [May 14, 2024, 8:25am UTC](https://discuss.elastic.co/t/geoip-database-unavailable-geolite2-city-mmdb-error/359439 "2024-05-14T08:25:58Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![shrikantgulia](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@shrikantgulia](https://discuss.elastic.co/u/shrikantgulia)\
**Post date:** [May 14, 2024, 8:25am UTC](https://discuss.elastic.co/t/geoip-database-unavailable-geolite2-city-mmdb-error/359439/1 "2024-05-14T08:25:58Z")

</div>

Dear Members,

can someone please guide i am facing the below issues don't know unable to lookup my field with geo ip details  
[2024-05-14T12:21:49,461][ERROR][o.e.i.g.GeoIpDownloader] [node1] exception during geoip databases update  
java.net.UnknownHostException: [geoip.elastic.co](http://geoip.elastic.co)  
at sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:567) ~[?:?]  
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[?:?]  
at java.net.Socket.connect(Socket.java:751) ~[?:?]  
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:304) ~[?:?]  
at sun.net.NetworkClient.doConnect(NetworkClient.java:178) ~[?:?]  
at sun.net.www.http.HttpClient.openServer(HttpClient.java:531) ~[?:?]  
at sun.net.www.http.HttpClient.openServer(HttpClient.java:636) ~[?:?]  
at sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:264) ~[?:?]  
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:377) ~[?:?]  
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:193) ~[?:?]  
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1237) ~[?:?]  
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1123) ~[?:?]  
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:179) ~[?:?]  
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1675) ~[?:?]  
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1599) ~[?:?]  
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:531) ~[?:?]  
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:307) ~[?:?]  
at org.elasticsearch.ingest.geoip.HttpClient.lambda$get$0(HttpClient.java:46) ~[?:?]  
at java.security.AccessController.doPrivileged(AccessController.java:571) ~[?:?]  
at org.elasticsearch.ingest.geoip.HttpClient.doPrivileged(HttpClient.java:88) ~[?:?]  
at org.elasticsearch.ingest.geoip.HttpClient.get(HttpClient.java:40) ~[?:?]  
at org.elasticsearch.ingest.geoip.HttpClient.getBytes(HttpClient.java:36) ~[?:?]  
at org.elasticsearch.ingest.geoip.GeoIpDownloader.fetchDatabasesOverview(GeoIpDownloader.java:157) ~[?:?]  
at org.elasticsearch.ingest.geoip.GeoIpDownloader.updateDatabases(GeoIpDownloader.java:140) ~[?:?]  
at org.elasticsearch.ingest.geoip.GeoIpDownloader.runDownloader(GeoIpDownloader.java:279) ~[?:?]  
at org.elasticsearch.ingest.geoip.GeoIpDownloaderTaskExecutor.nodeOperation(GeoIpDownloaderTaskExecutor.java:160) ~[?:?]  
at org.elasticsearch.ingest.geoip.GeoIpDownloaderTaskExecutor.nodeOperation(GeoIpDownloaderTaskExecutor.java:59) ~[?:?]  
at org.elasticsearch.persistent.NodePersistentTasksExecutor$1.doRun(NodePersistentTasksExecutor.java:42) ~[elasticsearch-8.12.2.jar:?]  
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983) ~[elasticsearch-8.12.2.jar:?]  
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26) ~[elasticsearch-8.12.2.jar:?]  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]  
at java.lang.Thread.run(Thread.java:1583) ~[?:?]

---

<div class="post-metadata">

**Author:** ![Keith\_Massey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_massey/32/83666_2.png) [@Keith\_Massey](https://discuss.elastic.co/u/Keith_Massey)\
**Post date:** [May 14, 2024, 1:19pm UTC](https://discuss.elastic.co/t/geoip-database-unavailable-geolite2-city-mmdb-error/359439/2 "2024-05-14T13:19:28Z")

</div>

Elasticsearch periodically updates the geoip databases used by default by the geoip processor. I am guessing that you are in a locked-down environment where your Elasticsearch nodes cannot access `geoip.elastic.co` in order to do this. Assuming you want to use the geoip processor, take a look at [GeoIP processor | Elasticsearch Guide [8.13] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/geoip-processor.html#manage-geoip-database-updates) for options.

---

<div class="post-metadata">

**Author:** ![shrikantgulia](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@shrikantgulia](https://discuss.elastic.co/u/shrikantgulia)\
**Post date:** [May 15, 2024, 5:32am UTC](https://discuss.elastic.co/t/geoip-database-unavailable-geolite2-city-mmdb-error/359439/3 "2024-05-15T05:32:19Z")

</div>

Hi @Keith_Massey ,

got the below error while accessing the api's

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/2/429bd3b61bdb6c4123b9f59d90a2e0447df1a414.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/3/a3e0a5cc4205c8aa3b2d3791ac5023a42ed8ec8c.png)

requesting your support though when i curl the command [https://geoip.elastic.co/v1/database/?elastic\_geoip\_service\_tos=agree](https://geoip.elastic.co/v1/database/?elastic_geoip_service_tos=agree)  
i was able to get status 200 from the machine and was also able to curl the maxmind url's

Regards

---

<div class="post-metadata">

**Author:** ![Keith\_Massey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_massey/32/83666_2.png) [@Keith\_Massey](https://discuss.elastic.co/u/Keith_Massey)\
**Post date:** [May 15, 2024, 2:14pm UTC](https://discuss.elastic.co/t/geoip-database-unavailable-geolite2-city-mmdb-error/359439/4 "2024-05-15T14:14:35Z")

</div>

Hi @shrikantgulia. I'm not entirely sure what you're asking. As the end of your post implies, Elasticsearch is trying to hit `https://geoip.elastic.co/v1/database?elastic_geoip_service_tos=agree` to get the list of available databases and their locations. But Elasticsearch is reporting `java.net.UnknownHostException: geoip.elastic.co`, meaning that Elasticsearch was unable to find an IP address for `geoip.elastic.co`, maybe because the administrator of the Elasticsearch cluster doesn't have those Elasticsearch nodes set up to use DNS.

---

<div class="post-metadata">

**Author:** ![shrikantgulia](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@shrikantgulia](https://discuss.elastic.co/u/shrikantgulia)\
**Post date:** [May 15, 2024, 2:29pm UTC](https://discuss.elastic.co/t/geoip-database-unavailable-geolite2-city-mmdb-error/359439/5 "2024-05-15T14:29:49Z")

</div>

Hi @Keith_Massey ,

my machines are behind proxy and [geoip.elastic.co](http://geoip.elastic.co) does not exist while doing curl got below error

root@vmi1399665:~# curl -v [geoip.elastic.co](http://geoip.elastic.co)

- Trying 104.154.207.153:80...
- Connected to [geoip.elastic.co](http://geoip.elastic.co) (104.154.207.153) port 80 (#0)

> GET / HTTP/1.1  
> Host: [geoip.elastic.co](http://geoip.elastic.co)  
> User-Agent: curl/7.81.0  
> Accept: _/_

- Mark bundle as not supporting multiuse  
\< HTTP/1.1 308 Permanent Redirect  
\< Date: Wed, 15 May 2024 14:29:21 GMT  
\< Content-Type: text/html  
\< Content-Length: 164  
\< Connection: keep-alive  
\< Location: [https://geoip.elastic.co](https://geoip.elastic.co)  
\<

308 Permanent Redirect
# 308 Permanent Redirect

* * *
nginx \* Connection #0 to host geoip.elastic.co left intact

---

<div class="post-metadata">

**Author:** ![Keith\_Massey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_massey/32/83666_2.png) [@Keith\_Massey](https://discuss.elastic.co/u/Keith_Massey)\
**Post date:** [May 15, 2024, 2:52pm UTC](https://discuss.elastic.co/t/geoip-database-unavailable-geolite2-city-mmdb-error/359439/6 "2024-05-15T14:52:50Z")

</div>

That's it then. You'll just need to choose one of the options from the documentation I linked above.

---

<div class="post-metadata">

**Author:** ![shrikantgulia](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@shrikantgulia](https://discuss.elastic.co/u/shrikantgulia)\
**Post date:** [May 16, 2024, 7:12am UTC](https://discuss.elastic.co/t/geoip-database-unavailable-geolite2-city-mmdb-error/359439/7 "2024-05-16T07:12:50Z")

</div>

Hi @Keith_Massey ,

even after updating the setting as below

ingest.geoip.downloader.eager.download: true  
ingest.geoip.downloader.enabled: true  
ingest.geoip.downloader.endpoint: [https://geoip.elastic.co/v1/database](https://geoip.elastic.co/v1/database)

i am still facing the issue.

---

<div class="post-metadata">

**Author:** ![Keith\_Massey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_massey/32/83666_2.png) [@Keith\_Massey](https://discuss.elastic.co/u/Keith_Massey)\
**Post date:** [May 16, 2024, 1:14pm UTC](https://discuss.elastic.co/t/geoip-database-unavailable-geolite2-city-mmdb-error/359439/8 "2024-05-16T13:14:59Z")

</div>

It looks like you've configured it to use what is already the default. You need to either set up a way for your nodes to access [geoip.elastic.co](http://geoip.elastic.co) (a reverse proxy is what is recommended in the documentation), or host the files on a machine inside your network (that's what `ingest.geoip.downloader.endpoint` would point to). Either way you probably need to work with your network administrator.

---

<div class="post-metadata">

**Author:** ![shrikantgulia](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@shrikantgulia](https://discuss.elastic.co/u/shrikantgulia)\
**Post date:** [May 16, 2024, 4:24pm UTC](https://discuss.elastic.co/t/geoip-database-unavailable-geolite2-city-mmdb-error/359439/9 "2024-05-16T16:24:06Z")

</div>

Dear @Keith_Massey ,

I have one doubt  
why are we getting 404 error when i am having open internet while accessing [geoip.elastic.co](http://geoip.elastic.co)  
just curious

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/4/c495f79f890c7c710a37db59294120c7e6b9220d.png)

---

<div class="post-metadata">

**Author:** ![Keith\_Massey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_massey/32/83666_2.png) [@Keith\_Massey](https://discuss.elastic.co/u/Keith_Massey)\
**Post date:** [May 16, 2024, 5:31pm UTC](https://discuss.elastic.co/t/geoip-database-unavailable-geolite2-city-mmdb-error/359439/10 "2024-05-16T17:31:33Z")

</div>

That's because we don't have anything at the URL [https://geoip.elastic.co/](https://geoip.elastic.co/). The list of databases is at [https://geoip.elastic.co/v1/database?elastic\_geoip\_service\_tos=agree](https://geoip.elastic.co/v1/database?elastic_geoip_service_tos=agree).

---

<div class="post-metadata">

**Author:** ![shrikantgulia](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@shrikantgulia](https://discuss.elastic.co/u/shrikantgulia)\
**Post date:** [May 18, 2024, 9:48am UTC](https://discuss.elastic.co/t/geoip-database-unavailable-geolite2-city-mmdb-error/359439/11 "2024-05-18T09:48:22Z")

</div>

Dear @Keith_Massey ,

my machine is connected to internet via proxy server still facing the error.  
requesting your advice and support

---

<div class="post-metadata">

**Author:** ![shrikantgulia](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@shrikantgulia](https://discuss.elastic.co/u/shrikantgulia)\
**Post date:** [May 20, 2024, 12:13pm UTC](https://discuss.elastic.co/t/geoip-database-unavailable-geolite2-city-mmdb-error/359439/12 "2024-05-20T12:13:33Z")

</div>

Dear @Keith_Massey ,

Resolved it by inserting the proxy details in jvm.options file

# Proxy

-Dhttp.proxyHost=  
-Dhttp.proxyPort=  
-Dhttps.proxyHost=  
-Dhttps.proxyPort=
