I upgraded SonarQube 7.9 to 8.1 on an Ubuntu 18.04 (100k line paid edition)
I found that I got a new server ID, thus I had to contact the friendly folks at SonarQube support to get a new license file.
I configured the new 8.1 on the same Linux box as where I had the 7.9 version. I made an error with my tokens and chose to redo the 8.1 installation since I was not very far into it.
I moved the 8.1 away and installed in the same with into the same /opt/sonarqube-8.1.0.31237/ as where I started.
When I then checked the new instance it was identified with a new yet another server ID - even though the first and second installation of SonarQube 8.1 was made on the same server, same directory etc. Very odd!
After reverting back to the first 8.1 installation - I managed to delete the wrong tokens, and got back on track, but I was a bit annoyed to see yet another server ID after both of the two re-installs.
Hi Peter.
Server ID is expected to change if the DB JDBC URL string changes or if data in the DB is changed (fresh dataset for example). Did any of those happen in your case?
I have not set up any database - just using the default embedded H2 database.
I have not seen a real need for e.g. postgresql (yet).
I have some C based projects where I authenticate the scanner towards sonarqube via a token - generated in the sonarqube web UI.
Ok, thanks for clarifying. The default H2 setup is be based on the installation directory so changes to it might affect the server ID. We don’t recommend that setup for production instances.
Maybe one of the developers can try the following:
Install sonarqube-8.1.0.31237 into /opt/sonarqube-8.1.0.31237/ (or similar if there is another build)
Install sonarqube-8.2.0.32929 into /opt/sonarqube-8.2.0.32929/
In /opt/sonarqube-*/conf/sonar.properties add three values e.g. on the top (or outcomment)
sonar.web.host=127.0.0.1
sonar.web.context=/sonarqube
sonar.web.port=8082
(I use Nginx as a frontend - you can most likely skip sonar.web.context)
I get different server ID for the two installations. Yes - I know that I should replace the H2 database with e.g. some better database - but I have not done that.
There is typically no Server ID change when you upgrade SonarQube – you are using the embedded database that’s only supposed to be used for evaluation.
If you start using an external database, your problem is solved