On a new test install of SonarQube 7.7 on CentOS-7.5 with Postgresql 10.7, I am getting the following error. What could be the issue?
java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by 'sonar.jdbc.').
The following Postgres commands were given.
postgres=#create role sonarqube with login password 'XXXXXXXX';
CREATE ROLE
postgres=# grant all on schema public to sonarqube;
GRANT
postgres=# \dn+
List of schemas
Name | Owner | Access privileges | Description
--------+----------+-----------------------+------------------------
public | postgres | postgres=UC/postgres +| standard public schema
| | sonarqube=UC/postgres |
(1 row)
postgres=# grant all on all tables in schema public to sonarqube;
GRANT
postgres=# \dn+
List of schemas
Name | Owner | Access privileges | Description
--------+----------+-----------------------+------------------------
public | postgres | postgres=UC/postgres +| standard public schema
| | sonarqube=UC/postgres |
(1 row)
The following JDBC settings are used in sonar.properties.
sonar.jdbc.username=sonarqube
sonar.jdbc.password=XXXXXXXX
sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube