Outside of installing a SonarQube server as a cluster (something possible only with SonarQube’s Data Center Edition), having multiple instances of SonarQube connected to the same database is not possible. When this happens, two primary issues manifest.
- Background tasks being Cancelled unexpectedly
java.lang.IllegalStateException: Task does not exist anymore
- A license is unable to be applied (when two instances of different editions connect to the same database)
Analysis suspended. The license edition (Enterprise Edition) does not match the installation edition (Data Center).
These issues are solved by ensuring that only one SonarQube instance is connected to the database. The easiest way to check if multiple SonarQube instances are connected to the same database is to ask the database itself. Below are some resources for:
Once shutting down the rogue instance, should you notice any data discrepancies you may need to reindex Elasticsearch.