Unable to setup developer edition as Postgres database is not being detected by the sonarqube

Hi,

  • I have just downloaded latest version of SonarQube(9.7.1.62043) Developer edition and SonarScanner(4.7.0.2747)
  • I am trying to setup the SonarQube server with Scanner in my local Macbook and will be using it for my Swift based project.
  • I have made changes to Sonar properties file for Postgres access. Following are my changes

sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
sonar.jdbc.url=jdbc:postgresql://localhost:5432/sonardb

I have PostgreSQL 14 installed in my macbook and it running. I have also added sonar user in Postgres.
But I am still getting following error:

Migration not supported

Migration is not supported on embedded databases.

Also when I try to run the server I get following message in console logs:
Database needs to be migrated. Please refer to Upgrade Guide | SonarQube Docs

I have tried to refer to above guide but I am still not able to set it up. Can someone please help me here?

Regards
Pankaj

Hi,

Welcome to the community!

You’ve described two very different situations. Since we try to keep it to one topic per thread (otherwise, it gets messy, fast) I’ll address the first one.

This implies that the connection is being made not to your Postgres DB, but to an H2 database seeded with data from an earlier version.

First, did you copy a data directory from an earlier install? Don’t do that. Second, you should check your server logs to see if you can learn anything about why SonarQube isn’t connecting to Postgres.

 
HTH,
Ann