Confluence will throw an exception in the catalina.out file while using SSL with MySQL and Java 11
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
When running Confluence with MySQL using SSL and Java 11, we will see this error in the catalina.out file:
1
closing inbound before receiving peer's close_notify
ℹ️ No issues observed while using Confluence.
Environment
Confluence Server and Data Center 7.1 or later versions
All versions of MySQL 5.x, 8.0.12 or earlier
Java 11 – Oracle or AdoptOpenJDK
Diagnosis
Using Confluence with the aforementioned platforms.
Find the error message in the catalina.out file inside <confluence-install>/logs folder:
1
2
3
4
5
6
7
8
EXCEPTION STACK TRACE:
** BEGIN NESTED EXCEPTION **
javax.net.ssl.SSLException
MESSAGE: closing inbound before receiving peer's close_notify
STACKTRACE:
javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:133)
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
Cause
This problem is caused by a MySQL Bug – https://bugs.mysql.com/bug.php?id=93590
Bug fix
"For an SSL connection, after a client disconnected from a server by calling Connection.close(), the TCP connection remained in the TIME_WAIT state on the server side.
With this fix, the connection remains in the TIME_WAIT state on the client side instead, in most cases."
Solution
We have three options to resolve this bug. Verify if the change can be performed based on the Supported Platforms for your current version of Confluence.
Upgrade to MySQL 8.0.13 or later versions – Supported in Confluence 7.4.x or later
⚠️ Disable SSL by adding the useSSL=false flag in Confluence MySQL URL (confluence.cfg.xml file) – Not recommended
1. Shutdown Confluence
2. Navigate to Confluence home folder
3. Edit the confluence.cfg.xml file to add useSSL=false:
1
<property name="hibernate.connection.url">jdbc:mysql://<hosts>/<confluencedb>?useSSL=false</property>
4. Save the file and restart Confluence
Was this helpful?