After starting Bitbucket, bundled ElasticSearch service fails to start with: lengthTag=63, too big

Still need help?

The Atlassian Community is here for you.

Ask the community

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


After a Bitbucket restart, the code search does not work anymore.


  • Bitbucket 7.6.4
  • Bitbucket with bundled elasticsearch


Elasticsearch logs (bitbucket_search.log) show the following error:

[2022-01-20T20:06:51,900][ERROR][o.e.b.Bootstrap          ] [bitbucket_bundled]Exception
org.elasticsearch.common.ssl.SslConfigException: failed to initialize a TrustManager for the system keystore
    at org.elasticsearch.common.ssl.DefaultJdkTrustConfig.createTrustManager( ~[?:?]
    at org.elasticsearch.common.ssl.SslConfiguration.createSslContext( ~[?:?]

Caused by: problem accessing trust store
    at ~[?:?]
    at ~[?:?]
    at org.elasticsearch.common.ssl.KeyStoreUtil.createTrustManager( ~[?:?]
    at org.elasticsearch.common.ssl.DefaultJdkTrustConfig.createTrustManager( ~[?:?]
    ... 24 more
Caused by: DerInputStream.getLength(): lengthTag=63, too big.

The same error may be present in Bitbucket, although the application starts as usual.


There is a similar error outlined in the Java Certificate Issue - IOException: DerInputStream.getLength(): lengthTag=109, too big article which points to a misconfiguration in the keystore.
This error could also be related due to a misconfiguration with SSL parameters in file. 


  1. Follow the article above and fix any issues that you may have with keystore.
  2. Review Bitbucket SSL configuration and make sure it follows the recommendation from the Secure Bitbucket with Tomcat using SSL document.

Last modified on Jan 28, 2022

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.