-
Task
-
Resolution: Unresolved
-
L3 - Default
-
None
-
None
-
None
-
Not defined
When Optimize starts, it currently gets in an infinite loop if it can't connect to ES. This is not good practice and we should break out of this loop and allow Optimize to fail rather than continually retrying.
ATs:
- Optimize doesn't get stuck in an infinite loop on startup with connection errors to ES
- The amount of time that Optimize should retry for should be configurable
Testing Notes:
- Start Optimize without ES running. Observe the logs and see the repeated lines:
- 13:48:57.428 [main] ERROR o.c.o.u.e.ElasticsearchHighLevelRestClientBuilder - Can't connect to any ES node right now.
13:48:57.428 [main] INFO o.c.o.u.e.ElasticsearchHighLevelRestClientBuilder - No Elasticsearch nodes available, waiting [2000] ms to retry connecting
13:48:59.437 [main] ERROR o.c.o.u.e.ElasticsearchHighLevelRestClientBuilder - Can't connect to any ES node right now.
- 13:48:57.428 [main] ERROR o.c.o.u.e.ElasticsearchHighLevelRestClientBuilder - Can't connect to any ES node right now.
- Configure the max wait time using the env var CAMUNDA_OPTIMIZE_ELASTICSEARCH_CONNECTION_MAXIMUM_WAIT_IN_MS. Observe that after the time elapses (default is 60000), Optimize is allowed to fail and won't start up
- Configure the same in the config file with es.connection.maximumWaitInMs and observe the same behaviour
This ticket was migrated to github: https://github.com/camunda/camunda-optimize/issues/10238. Please use this link for any future references and continue any discussion there.