camunda/camunda-platform-get-started

Tasklist and operate connection refused to elasticsearch in docker-compose

n0rb3rt opened this issue · 2 comments

Tasklist and operate can't connect to elasticsearch in docker-compose

tasklist       | 2021-06-23 16:20:43.267 ERROR 1 --- [           main] i.c.t.e.ElasticsearchConnector           : Error occurred while connecting to Elasticsearch: clustername [elasticsearch], elasticsearch:9200. Will be retried (1/50) ...
tasklist       |
tasklist       | java.net.ConnectException: Connection refused
operate        | 2021-06-23 16:21:45.215  INFO 8 --- [           main] i.c.o.u.RetryOperation                   : Connect to Elasticsearch cluster [elasticsearch] at http://localhost:9200 - Waiting 3 SECONDS. 20/50

Hi @n0rb3rt thanks for raising this issue. In the docker-compose setup all services will be started at once, which means there is an expected unavailability, i.e. while elasticsearch is starting Operate and Tasklist cannot access it. But this transient error should disappear once elasticsearch is started. You can check that in the logs of ES when then indices become healthy (status green), after that Operate and Tasklist should be able to connect.

I hope with #12 I fixed a configuration issue with Operate. Can you check out the latest master and test if you still have the same issue? Thanks

That did the trick -- thanks!

Previously ES was up, which I'd ensured by exposing its port and checking with curl. So something else was amiss. But no matter since it seems to be running as expected now.