Bitbucket Server logs getting filled up by the error java.lang.NullPointerException: null

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

Sometimes, you might observe that the log directory is growing large, and upon checking, you can see that the atlassian-bitbucket.log is filling up with entries similar to the one below.

1 2 3 4 2022-04-04 07:11:41,685 ERROR [https-jsse-nio-443-exec-16] o.apache.tomcat.util.net.NioEndpoint Error running socket processor java.lang.NullPointerException: null 2022-04-04 07:11:41,685 ERROR [https-jsse-nio-443-exec-16] o.apache.tomcat.util.net.NioEndpoint Error running socket processor java.lang.NullPointerException: null

Environment

Bitbucket Server/Data Center with OpenJDK 1.8.0_272 or lower.

Diagnosis

Check the bitbucket.properties file to confirm if the instance is running on TLS version 1.3.

Cause

The instance is probably running into the JDK bug JDK-8241248. According to the tomcat developers, this is related to TLSv1.3 clients and the instance needs to use only TLSv1.2.

Workaround

Add the following to the bitbucket.properties file and restart the server. This would define all the TLS protocols Bitbucket can use for encryption.

1 server.ssl.enabled-protocols=SSLv2Hello,TLSv1,TLSv1.1,TLSv1.2

Please note that even if you set server.ssl.protocol=TLSv1.2 in the bitbucket.properties file, it only defines the default and does not disable TLSv1.3. So if that line exists in your bitbucket.properties file, you can remove it. 

Solution

The permanent solution for this issue would be to upgrade your JDK to a version which contains the bug fix. Please refer to the bug report for more information and the fixed version details.

If it still doesn't fix the issue, please get in touch with Atlassian support.

Updated on February 25, 2025

Still need help?

The Atlassian Community is here for you.