-
Bug
-
Resolution: Fixed
-
Low
-
7.4.6, 7.8.3, 7.10.0
-
None
-
17
-
Severity 3 - Minor
-
29
-
Summary
PostgreSQL updated the default fallback behavior in the 42.2.16 driver in a way that breaks support for PostgreSQL instances in Microsoft Azure. This version of the driver was bundled into Confluence as of 7.8.3.
Environment
- Azure Postgres
- AWS serverless Aurora Postgres (reported in comments)
Steps to Reproduce
- Setup an Azure PostgreSQL instance
- Attempt to test a connection in the Confluence setup wizard to this instance
Expected Results
Confluence is able to connect to the database
Actual Results
The test fails
The below exception is thrown in the xxxxxxx.log file:
2021-01-06 19:17:56,961 ERROR [http-nio-8090-exec-8] [atlassian.config.bootstrap.DefaultAtlassianBootstrapManager] getTestDatabaseConnection Could not successfully test your database: -- referer: http://localhost:7000/setup/setupdbtype-start.action | url: /setup/setupstandarddb-testconnection.action | traceId: 004f898b296e23d7 | userName: anonymous | action: setupstandarddb-testconnection org.postgresql.util.PSQLException: The connection attempt failed. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:315) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:51) at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:225) at org.postgresql.Driver.makeConnection(Driver.java:465) at org.postgresql.Driver.connect(Driver.java:264) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228) at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.getTestDatabaseConnection(DefaultAtlassianBootstrapManager.java:347)
Notes
- This was reported to PostgreSQL at Fallback for gssEncMode connection mode is not working as expected · Issue #1868 · pgjdbc/pgjdbc · GitHub
- Driver 42.2.18 includes a fix for this bug
Workaround
- Download the new driver from the following link: https://jdbc.postgresql.org/download/postgresql-42.2.18.jar
- Stop Confluence
- Rename the current driver
- Navigate to <confluence-install>/confluence/WEB-INF/lib
- Rename postgresql-42.2.16.jar to postgresql-42.2.16.jar.old
- Move the new driver into <confluence-install>/confluence/WEB-INF/lib
- Start Confluence
At this point, you should be able to create a connection.
- relates to
-
JRASERVER-72629 Upgrade PostgresSQL JDBC driver to 42.2.23+ version
- Closed
- followed by
-
PSR-594 Loading...
- is resolved by
-
HL-1998 Loading...