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 8.9.1.44547 and we want to upgrade to 8.9.2.46101 (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.
The errors in the web log (kudos for including it in the first post! ) 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.
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 sonar.properties to the new file (I wasn’t copying the file itself, just the content inside it).
The resolution was to open sonar.properties 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…