SonarQube is not connecting to Azure SQL after upgrade to 8.9.2

I’ve been trying to upgrade our SonarQube instance to enterprise but having a problem.

Please see the web.log attached.

We are now on and we want to upgrade to (developer edition)
Our SQ running on Windows Server, our database is Azure SQL.
I’ve used the manual for upgrade (as always, and previously I had no issues at all). I’m using the same configuration.
After upgrade, based on the logs, SQ can’t connect to database.

I’ve tried to upgrade to both Enterprise edition (which we recently bought and want to move to this version) and Developer edition (which we are using now) — same error.

When I’m rolling back to the old build everything work absolutely fine, without any errors. Also the connection to database was tested from the server where the SQ is running.

My config:

ldap.bindDn=CN=sonar.service,OU=Service Accounts,OU=Users,OU=Global IT,OU=Valtech,DC=valtech,DC=com

ldap.user.request=(&(objectClass=user)(sAMAccountName={login})(memberOf=CN=GL.SonarQube.Access,OU=SonarQube,OU=Security Groups,OU=Global IT,OU=Valtech,DC=valtech,DC=com))

#GroupsConfig,OU=Security Groups,OU=Global IT,OU=Valtech,DC=valtech,DC=com{dn}))

Please advice.

sonar-web-log.txt (9.3 KB)


Welcome to the community!

The errors in the web log (kudos for including it in the first post! :slightly_smiling_face:) are pretty clear:

2021.09.20 13:45:37 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.').
Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (Login failed for user ''. ClientConnectionId:ce4f13d1-14b9-4127-a350-5912d227e40e)

So it looks like you need to double-check our DB settings.


Hi Ann,

Thanks for your reply.

Apparently the problem was not with the settings itself (because the same settings was working absolutely fine with the old build) but with the way I was editing the config file.
What I was doing earlier it’s just copying all content from the old to the new file (I wasn’t copying the file itself, just the content inside it).
The resolution was to open from the new built, uncomment and edit each required line.
I’m not sure why it is so, because previously I haven’t had any issues with just copying content of the file…

1 Like


I guess this must have been about whitespace characters. Anyway, thanks for the followup.


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