Sonar throwing error BadDatabaseVersion

后端 未结 2 496
情歌与酒
情歌与酒 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'

    0 讨论(0)
  • 2021-01-06 21:02

    Are you certain the database settings used by the Sonar server:

    • http://xx.xx.xx.xx:9000/system

    Match the database credentials used by your build?

    The error message suggests they don't. The JIRA issue SONAR-3685 was closed with a "Not A Bug" resolution code.

    0 讨论(0)
提交回复
热议问题