-
Notifications
You must be signed in to change notification settings - Fork 972
Postgres with SSL throws "PSQLException: SSL error: null" #8624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking &l 8000 dquo;Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@pkutlunin I tried enabling SSL connection between GoCD and a RDS PostgreSQL instance and it worked,
I need to setup a PostgreSQL instance to verify |
@maheshp thanks for checking this! Based on the stack trace ( |
@maheshp I verified that upgrade of the bouncycastle dependency to version 1.65 solves the issue. Here is a simple JDBC-client that reproduces the issue:
compile: And then, there will be an exact NPE thrown as the one I attached above. If you run the same class with a BC.jar version >= 1.65, the issue is gone. |
@pkutlunin we have a PR #8716 to upgrade BC to 1.65. Will you be able to take the installers generated for the PR and verify if it fixes the issue. |
@maheshp I verified that this PR has fixed the issue:
I'll wait for a new release to confirm that it is fixed. Once I check it with a release version, I'll close this issue. |
@pkutlunin thanks for verifying this. |
Upgrade BC version to '1.65' to fix #8624
Revert "Upgrade BC version to '1.65' to fix #8624"
I confirm this works in the release 20.9.0. One remark about the release notes for 20.9.0:
I've never mentioned it but those were legit certificates issued by |
The release notes has been updated. Thanks! |
Bug Report
Summary
When using a Postgres database with SSL enabled, GoCD fails to start because it cannot establish a connection with the database.
Details
When GoCD server starts up, it seems to successfully connect to the database at first using SSL and run the db-migration checks:
Then when GoCD tries to fetch pipelines, stages, etc., it fails with the exception:
Full stack trace is attached below.
Basic environment details
20.8.0 (12213-1e23a06e496205ced5f1a8e83d9b209fc0a290cb)
14.0.2
Linux 4.19.112+
Steps to Reproduce
Prerequisites:
Steps:
Actual Results
Exceptions during startup:
Possible Fix
It seems to be a known bug in bouncy castle library and it has been already fixed in release 1.65: bcgit/bc-java#633
Updating the dependency to the latest version of bouncycastle should fix the issue.
The text was updated successfully, but these errors were encountered: