SonarQube cannot connect database aws-aurora-postgresql11 after database restart

SonarQube cannot connect database aws-aurora-postgresql11 after database restart

  • Versions used: Enterprise Edition - Version 8.7.1 (build 42226)

  • Error observed: All tasks shows pending in “Background Tasks”. See the following errors in log file:

2021.06.30 10:37:50 ERROR ce[][o.s.c.t.CeWorkerImpl] Failed to pop the queue of analysis reports
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: org.postgresql.util.PSQLException: Connection to aws-aurora-postgresql11....amazonaws.com:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
### The error may exist in org.sonar.db.property.InternalPropertiesMapper
### The error may involve org.sonar.db.property.InternalPropertiesMapper.selectAsText
### The error occurred while executing a query
### Cause: org.postgresql.util.PSQLException: Connection to  aws-aurora-postgresql11....amazonaws.com:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
        at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
  • Steps to reproduce: Restart database

  • Potential workaround: Restart SonarQube service

Hi,

Welcome to the community!

I think this is your problem:

It looks like you need to double-check your DB connection settings, including the credentials.

 
HTH,
Ann