elasticsearch.exceptions.ConnectionError

Hello my friends !
i am working at a Django project , that use Elasticsearch , so when i transfert my project to docker container , i got this error from indexer


image

es = Elasticsearch('http://127.0.0.1:9200/')

Please any help ! i have deadline ..

Is your application running in the same container that is running Elasticsearch?

If not, you need to configure the IP address of your application to point to the name of the container that is running Elasticsearch.

Hello , Yes the project on localhost too , like Elasticsearch ,
the project and Elasticsearch at the same container , but image indexer in other container

Where is this configuration set:

es = Elasticsearch('http://127.0.0.1:9200/')

Is this set in a service that is running in the same container as Elasticsearch?

You need to provide more context about the architecture you are using.

The error you got means that something that is running in the imageindexerapi can not connect to Elasticsearch container, if your Elasticsearch container is running and the service is ok, as it seems to be by the health status you shared, then there is something wrong in the configuration of your application running in the imageindexerapi or in the way you are starting up docker.

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