Geoip error while deploying elasticsearch

Hi,

I'm trying to start a single node elasticsearch cluster using Docker. I get the following error in the startup logs

"type": "server", "timestamp": "2021-09-13T13:41:29,255Z", "level": "ERROR", "component": "o.e.i.g.GeoIpDownloader", "cluster.name": "docker-cluster", "node.name": "e0f33c6f9ce4", "message": "exception during geoip databases update", "cluster.uuid": "Pt03VoTAT-OJfcHjonJBPw", "node.id": "83jOyCgFQQavshyezqeaOQ" ,
"stacktrace": ["java.net.SocketException: Network is unreachable"

I have the same error when using the helm charts as well. What should be done to mitigate this ?

Thank you
Shubh

Can you share a little more about your docker setup and the Elasticsearch version you tried to run? I suppose it's something 7.14?

Hi,

The Docker version is 20.10.8 and the Elasticsearch version is 7.14.0.

how do you start Elasticsearch with docker/docker-compose? Is there a configuration file so one can reproduce?

I am using this command

docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.14.0

Can your node access internet? Is there any proxy which could prevent this?

There is a proxy running but it is configured to allow Internet access. I have no problems pulling Docker images.

Sure. You are pulling the Docker images from your machine but can you connect to internet from the container?

There was a bug fix in 7.14.1

You can set in 7.14.1+ to disable the downloading of the GeoIP Database.
If you do not... elasticsearch will attempt to download the Latest GeoIP Database.
ingest.geoip.downloader.enabled: false

You can test if you have connectivity by running (technically you would run this from inside your container)
curl https://geoip.elastic.co/v1/database?elastic_geoip_service_tos=agree

If you have connectivity you should get a bunch of data back.

Also finally Elasticsearch should work file even with that error....

1 Like

Hi,

It is working now. I think there was some problem with my local Docker installation. I did a fresh install and there are no problems. Thank you everyone for the help.

I had the same problem, which I solved by restarting Docker