Confluence will throw an exception in the catalina.out file while using SSL with MySQL and Java 11

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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: 

closing inbound before receiving peer's close_notify

(info) 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

  1. Using Confluence with the aforementioned platforms. 
  2. Find the error message in the catalina.out file inside <confluence-install>/logs folder:
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 
  • Switch from Java 11 to Java 8
  • (warning) Disable SSL by adding the useSSL=false flag in Confluence MySQL URL (confluence.cfg.xml file) – Not recommended
    • Tell me how to do it...

      1. Shutdown Confluence

      2. Navigate to Confluence home folder

      3. Edit the confluence.cfg.xml file to add useSSL=false:

      <property name="hibernate.connection.url">jdbc:mysql://<hosts>/<confluencedb>?useSSL=false</property>

      4. Save the file and restart Confluence


Last modified on Nov 3, 2020

Was this helpful?

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