Hi,
I’m setting up a trial of SonarQube developer edition (sonarqube-developer-8.3.1.34397) in one of my test servers.
I’ve followed the documentations from here,
I had some issues but I was able to resolve them except 1, the web.log showed that it failed to connect to the database.
Here are the steps that I have done for the Postgres side of things,
sudo su postgres
createuser sonar
psql postgres -W
Password:
psql (10.4)
postgres=# ALTER USER sonar WITH ENCRYPTED password ‘password’;
ALTER ROLE
postgres=# CREATE DATABASE sonar WITH ENCODING ‘UTF8’ OWNER sonar;
CREATE DATABASE
postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------±---------±---------±------------±------------±----------------------
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
sonar | sonar | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(4 rows)
I have tried both scenarios where I run and did not run (both didn’t work),
ALTER USER sonar SET search_path to sonar
I have tested the manual Postgres login using sonar/password credentials to make sure the login information is correct,
psql sonar -W
Password:
psql (10.4)
Type “help” for help.
sonar=#
The config that I had put into the sonar.properties file (tried both of the following),
sonar.jdbc.username=sonar
sonar.jdbc.password=password
sonar.jdbc.url=jdbc:postgresql://localhost/sonar
sonar.jdbc.username=sonar
sonar.jdbc.password=password
sonar.jdbc.url=jdbc:postgresql://localhost:5432/sonar
Here are the logs,
20200512_sonarqube_web.log (12.3 KB) 20200512_sonarqube_sonar.log (2.2 KB) 20200512_sonarqube_es.log (3.8 KB)
The configuration seems correct but it’s still not able to connect to the local psql database.
Anyone had this issue before?
Thanks!