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:
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'
Are you certain the database settings used by the Sonar server:
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.