the7erm
the7erm

Reputation: 215

Make sonarqube connect to unix socket

I'm on a server where the socket I want to connect to is actually a file. /var/opt/gitlab/postgresql/.s.PGSQL.5432 to be exact.

What little documentation I've found covering dp connections in sonarqube is https://jdbc.postgresql.org/documentation/80/connect.html and https://docs.sonarqube.org/display/SONAR/Installing+the+Server would lead me to believe that connecting to a unix socket isn't possible.

Is it possible, and what would the format for the sonar.jdbc.url to accomplish this?

This is the example the sonarqube docs use:

sonar.jdbc.url=jdbc:postgresql://localhost/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance

I'm attempting to do something like this:

sonar.jdbc.url=jdbc:postgresql://var/opt/gitlab/postgresql/.s.PGSQL.5432/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance

Thanks for your time.

Upvotes: 0

Views: 240

Answers (1)

Eric Hartmann
Eric Hartmann

Reputation: 1701

Unfortunately, as far as I know, connecting to a Unix socket through Postgresql JDBC driver is not possible.

You have to open a TCP/IP socket server in your postgresql configuration.

Upvotes: 2

Related Questions