"Unsupported search server version" error after upgrade to Bitbucket 9.x

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

After upgrading Bitbucket to 9.x from 8.x, the version search service is not available.

Testing the connection to the search server from Bitbucket results in an error:

 "Connected to an unsupported search server version."

Environment

  • Bitbucket 9.x

  • OpenSearch 2.11

Bitbucket application logs show an error when creating an index due to "Unsupported search version Elasticsearch 7.10.2"

2025-01-30 11:49:56,680 ERROR [Caesium-1-1] c.a.b.i.s.i.IndexingSynchronizationService An error was encountered while checking or creating the mapping in the search server com.atlassian.bitbucket.internal.search.indexing.exceptions.IndexException: Unable to validate mapping in the search server at com.atlassian.bitbucket.internal.search.indexing.IndexingSynchronizationService.lambda$checkMapping$4(IndexingSynchronizationService.java:206) at io.atlassian.fugue.Either$Left.fold(Either.java:598) at com.atlassian.bitbucket.internal.search.indexing.IndexingSynchronizationService.checkMapping(IndexingSynchronizationService.java:204) at com.atlassian.bitbucket.internal.search.indexing.IndexingSynchronizationService.synchronizeMapping(IndexingSynchronizationService.java:122) Caused by: com.atlassian.bitbucket.internal.search.indexing.exceptions.IndexException: Unsupported search version Elasticsearch 7.10.2. Unable to continue, operator intervention is required. at com.atlassian.bitbucket.internal.search.indexing.administration.DefaultIndexAdministrationService.failIfRunningOldVersion(DefaultIndexAdministrationService.java:246) at com.atlassian.bitbucket.internal.search.indexing.administration.DefaultIndexAdministrationService.lambda$validateCodeSearchMapping$12(DefaultIndexAdministrationService.java:168) at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:69) at rx.internal.producers.SingleProducer.request(SingleProducer.java:65)

Search config in the Bitbucket application reports the following:

<Search> <base-url>https://<aws opensearch instance></base-url> <username>user</username> <hasPassword>Sanitized by Support Utility</hasPassword> <aws-region>ap-southeast-2</aws-region> <connection-result>SUCCESS</connection-result> <distribution>Elasticsearch</distribution> <version>7.10.2</version> </Search>
  • The analysis confirms that the external search service reports its version as Elasticsearch 7.10.2, despite the installation being Opensearch 2.11.

  • Bitbucket 9.0 and subsequent versions do not support Elasticsearch 7.10.2, resulting in the "Unsupported search version Elasticsearch 7.10.2" error in logs.

  • The last compatible version of Bitbucket with Elasticsearch 7.10.2 was 8.19, where no issues were encountered.

Solution

Compatibility mode is the root cause of the error

Compatibility Mode was enabled in the OpenSearch instance configuration.

  • Enable compatibility mode option was checked on the OpenSearch instance config

  • When AWS opensearch is setup with compatibility mode it reports the Opensearch Cluster as ElasticSearch 7.10 this is documented on the AWS Opensearch as well

Compatibility mode allows AWS OpenSearch to simulate a version number of Elasticsearch 7.10 for compatibility purposes, so clients that require Elasticsearch 7.10 specifically will still work. Under the hood, it still runs the OpenSearch version that was selected.

Bitbucket 9.x no longer supports Elasticsearch 7.10.2, which leads to connection failures with the OpenSearch instance.

Disable compatibility mode

Disable compatibility mode by unchecking the Enable compatibility mode option in the Opensearch instance config.

To disable compatibility mode on existing OpenSearch domains, you should use the _cluster/settings API operation as outlined in their Developer Guide. A sample command is specified below:

curl -X PUT <OpenSearch-URL>/_cluster/settings -u <Master-Username> -H 'Content-Type: application/json' -d '{ "persistent" : { "compatibility.override_main_response_version" : false } }'

Updated on June 24, 2025

Still need help?

The Atlassian Community is here for you.