-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Affects Version/s: 8.5.12
-
Component/s: Other
-
1
-
Severity 2 - Major
Issue Summary
After configurating Kerberos authentication to a SQL Server database, Confluence stops responding after a while and the application freezes.
Steps to Reproduce
- Install Confluence v8.5.12 on Linux
- Setup as database MSSQL with Microsoft SQL Server 2017 and Kerberos authentication
Expected Results
When the Hikari Connection pool need to acquire new connections with the MSSQL database the operation is successful.
Actual Results
The below exception is thrown in the atlassian-confluence.log file:
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Kerberos Login failed: Integrated authentication failed. ClientConnectionId:c724dcd3-7f95-4665-a2fa-97423cad00bc due to javax.security.auth.login.LoginException (No LoginModule found for com.sun.security.auth.module.Krb5LoginModule) at com.microsoft.sqlserver.jdbc.KerbAuthentication.intAuthInit(KerbAuthentication.java:100) at com.microsoft.sqlserver.jdbc.KerbAuthentication.generateClientContext(KerbAuthentication.java:207) at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:4820) at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:3731) at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:94) at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:3675) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7194) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2979) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2488) at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2142) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1993) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1164) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:760) at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) at com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:726) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:712) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
Workaround
Newer versions of MS SQL jdbc driver built from Java 11 are not affected by the above problem. Follow the below steps to update the driver:
- Stop Confluence.
- Download and extract MS SQL jdbc v12.6.2 driver from the list below.
- Drop the .jar file in your <installation-directory>/confluence/WEB-INF/lib directory.
- Delete the previous version of the driver com.microsoft.sqlserver_mssql-jdbc-7.4.1.jre8.jar from <installation-directory>/confluence/WEB-INF/lib directory.
- Start Confluence.