"Database must be manually upgraded" message

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • what are you trying to achieve
  • what have you tried so far to achieve this

Hi there
I have sonarqube community edition 7.5 (build 20543) which I want to upgrade to 8.6. Reading through the docs I can see I have to upgrade to the next LTS first, which looks to be 7.9.5.

I am on Debian 9 linux server with 16gb ram. I have a locally running postgres database. Sonarqube 7.5 has been running without issues for at least 12 months or so.

I have shutdown 7.5 and started 7.9.5, and I get the following in the console:

jvm 1 | 2021.01.13 14:12:05 WARN app[startup] ################################################################################
jvm 1 | 2021.01.13 14:12:05 WARN app[startup] The database must be manually upgraded. Please backup the database and browse /setup. For more information: https://docs.sonarqube.org/latest/setup/upgrading
jvm 1 | 2021.01.13 14:12:05 WARN app[startup] ################################################################################

However I see no reference on how to manually upgrade the database. Can anyone point me towards what I need to do?

Hey there.

Just go to your SonarQube instance and append /setup to the URL. There’s a button for you to click. :slight_smile:

unfortunately I get the loading spinner at the /setup url, and no buttons or anything. I don’t see anything else obvious in the logs. Do you know if I can force the database upgrade if I cannot see the button?

If you force the database upgrade via Web API, it’s likely you’ll just hit the spinning wheel again when you’ve upgraded.

Can you try browsing in an incognito window or a different browser? This can sometimes represent a cache issue.

I now see the issue, I am deploying sonar in mydomain. com/sonar but sonar is trying to access all its files from the root of the domain, and getting an error. Can I set the path in one of the config files? I do not see anything relevant under web server in the main sonar.properties file in conf folder.

I believe fiddling with sonar.web.context in your conf/sonar.properties file will do the trick, but I’m not completely sure which direction you need to go in (removing it, or making sure it’s set to /sonar). It gets funny when there’s another layer (like a reverse proxy) involved.

You are correct, I had to add /sonar to the sonar.web.contect parameter. I now see the button to upgrade.

Thanks for your help.

1 Like