Currently have 1 jenkins (development) server connected to 1 sonarqube server. Now, I'd like to connect my 2nd jenkins (production) server to the same sonarqube server. Is this possible?
I've tried setting up my production server with the same sonarqube configuration settings and was able to successfully connect to sonarqube server using the deprecated sonarqube post build action. Since it's deprecated, I switched to enabling "Prepare SonarQube Scanner Environment" and "Invoke top-level maven targets". However it's failing for some reason when i tried to run the build.
Error: [INFO] The current batch process and the configured remote server do not share the same DB configuration. - Batch side: jdbc:postgresql://something.net/****** (****** / *****) - Server side: check the configuration at http://******.net:9000/system
Note: - sonar.code.id is the same value as URL/api/server - jenkins system configuration is the same as URL/system
Yes, nothing prevents from connecting two Jenkins instances to the same SonarQube server.
According to your error message, the database configuration of your production server does not have the right configuration of your Postgresql server.
You should check that you have the same configuration on both Jenkins and SonarQube for Postgresql.
If it's not the case, please post the full log of the error.