Sonar throwing error BadDatabaseVersion

后端 未结 2 495
情歌与酒
情歌与酒 2021-01-06 20:29

I have installed sonar and mysql database on server A and on server B. I\'m trying to run sonar analysis using sonar-runner but every time I get the following error:

2条回答
  •  执笔经年
    2021-01-06 21:02

    This error can also happen if you have 2 Sonar instances pointing at the same database. You can only have one Sonar instance per database.

    Sonar updates a row in the properties table where prop_key = 'sonar.core.id' every time it starts up, and then compares the cached value against the one in the database whenever an analysis is executed. If the two don't match then you get the error.

    To fix it, shut down both instances then only restart the instance you want to keep. Sonar will reset the sonar.core.id value and things should work again.

    You can get the server's cached id via REST: http://server:port/sonar/api/server

    It has to match the one in the database for Sonar to work. select * from properties where prop_key = 'sonar.core.id'

提交回复
热议问题