SQ can not connect to Database

Hi Tobias,

In our case, we have some differences in the message but the scenario is the same, it cannot be connected to the database. Thanks for your help..

2021.05.26 12:02:13 ERROR web[o.s.s.p.PlatformImpl] Web server startup failed
java.lang.IllegalStateException: Fail to connect to database

Caused by: java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by ‘sonar.jdbc.’).
at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:118)
at org.sonar.db.DefaultDatabase.start(DefaultDatabase.java:83)
… 24 common frames omitted
Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (The connection attempt failed.)
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:669)
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:544)
at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:753)
at org.sonar.db.profiling.NullConnectionInterceptor.getConnection(NullConnectionInterceptor.java:31)
at org.sonar.db.profiling.ProfiledDataSource.getConnection(ProfiledDataSource.java:317)
at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:115)
… 25 common frames omitted

Hi @jimmyquejada ,

i moved your reply to a new topic as the original thread was quiet old and had a different problem as yours.

did you already verify that there is no typo in any of the sonar.jdbc.properties or that there is a firewall blocking sonarqube from accessing your RDS database?
The stack trace indicates that the connection to the configured database could not get established, so a firewall is likely