Install SonarQube 8.7 and unable to create or update postgresql database 12.5


I installed SonarQube 8.7 with aws rds postresql database and I am unable to write to the database. The database seems to be in a read only state. Whenever I attempt to create or update a project, user or anything I get an error like this error below:

localhost - - [08/Mar/2021:22:32:22 +0000] “POST /sonar/api/projects/create HTTP/1.1” 401 - “http://localhost:9000/sonar/projects/create?mode=manual

I am also unable to login using the username: admin and password: admin because by default I wants me to change my password. The password update fails do to the inability to write or update the database.

Please help!

Hello @ljdavis and welcome to the community :wave:

can you elaborate the environment your are running in and share the log files (in $SONARQUBE_HOME/logs/) with us to narrow down the problem?


I am honored to be apart of the SonarSource Community. I have installed the SonarQube Enterprise Edition 8.7.0 latest on an AWS Centos 7.2 Linux Ami. Once installed, the app. worked fine with the H2 database. But, once I switched over to the Postgres database everything changed. I chose to us a AWS RDS Postgres database (v12.5). I made sure that the Security Group inbound rules are set to connect to the database. Also, I created a sonarqube user and granted it full access to the database and public schema. The application does connect to the database and creates all tables. Additionally, I am using the pgadmin client to manipulate the database server. I also noticed that I was unable to update the “reset_password” flag using the inline table manipulation tool. However, I am able to update the table by executing a SQL command from the “Query Tool” in the pgadmin tool. This is really weird! There is really nothing in the logs that jumps out. I there a way to make SonarQube list the logs verbosely?

Thanks for your help,

you can increase the verbosity of the logs by setting another log level as described in our docs here, maybe that helps.
apart from that the issue seems indeed be related to your rds postgres setup and not to sonarqube specifically. Do you see any Spikes in the RDS monitoring or any suspicious log entries on the RDS side? Sometimes you need to manually perform a VACUUM (FULL, ANALYZE) on RDS. Usually only after an update but maybe this will help here as well.


I believe it was Postgres user permissions issue. It is fixed now.

Thanks for you help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.