Unable to use code search on Bitbucket Data Center due to c.a.b.s.i.i.IndexingSynchronizationService Unable to establish a connection to Elasticsearch.
The code search functionality does not work at all in Bitbucket Server, and the following appears in the atlassian-bitbucket.log file.
INFO [Caesium-1-1] c.a.b.s.i.i.jobs.StartupChecksJob Attempting provisioning in startup job INFO [Caesium-1-1] c.a.b.s.i.i.jobs.StartupChecksJob Running startup jobs for search ERROR [Caesium-1-1] c.a.b.s.i.i.IndexingSynchronizationService Unable to establish a connection to Elasticsearch. WARN [Caesium-1-1] c.a.b.s.i.cluster.ClusterJobRunner Job execution failed. Rescheduling. Job key: com.atlassian.bitbucket.search.internal.indexing.jobs.StartupChecksJob Job id: faf44142-3a7f-42c9-b840-4267101ea9b6
- Bitbucket Data Center is installed
- The bundled Elasticsearch is connected
This is caused by using the bundled Elasticsearch on Bitbucket Data Center.
It's necessary to install and configure a remote Elasticsearch instance. Please refer to this documentation in order to configure a new remote Elasticsearch instance.