-
Notifications
You must be signed in to change notification settings - Fork 230
SonarQube - Unable to Connect to External Postgres DB #273
Comments
This issue might be related to #218. When looking at the changelog for v9.2.2, it states Added a condition to deployment.yaml so that wait-for-db initContainer is only created if postgresql.enabled=true. Therefore, this init container shouldn't even be running according to that statement. What's interesting is I have set postgresql.enabled to false. |
I was able to fix my problem. I removed the jdbcUrlOverride field and changed the postgresql config to the values below. I then added a secret named external-sonarqube-opts with the following key/value pairs.
Finally, I added the following.
After that, it connected to my external Postgres DB without issues. I suspect this isn't the standard way of using an external DB with this Helm chart but perhaps my problems can be translated into a fix or enhancement of some sort. I'll leave this issue open so it can be reviewed. |
@GetchaDEAGLE I think you were just missing These Helm properties worked for me: postgresql:
postgresqlUsername: my-username
existingSecret: my-secret
existingSecretPasswordKey: pgsql-password
postgresqlServer: pgsql.example.com
postgresqlDatabase: sonarDB
service:
port: 5432 |
I had to set |
I have read through the documentation as well as other issues for using an external Postgres DB with this chart. However, the wait-for-db container never succeeds and shows the following error:
nc: bad address 'sonarqube-postgresql'
Keep in mind I only see this error after deleting the sonarqube-postgresql service (see below for more info). If this service hasn't been deleted then the wait-for-db container emits no logs and just hangs indefinitely. I'm perplexed as to why it's trying to connect to this address. The configuration I'm using for external Postgres is below.
I have Postgres running in my cluster already and it isn't accessible externally which is why I'm using the internal cluster host. This approach has worked fine with GitLab. Also, I noticed that some services for Postgres are being created - not sure why when I'm supposed to be using an external DB. The services being created are below.
Finally, when I don't specify a value for jdbcUrlOverride the installation succeeds but uses the embedded H2 database which isn't what I'm looking for. Any assistance solving this issue would be greatly appreciated. Thanks in advance.
The text was updated successfully, but these errors were encountered: