Sonarqube-7.6-Unable to see the new projects analysed for the admin even though the permissions are given

We are using Sonarqube in our server and a mysql database for DB and have asked the developers to run their local sonarqube 7.6 against the Server Database. But whenever a developer runs a new project in his/her machine It is not available under Server Sonarqube Dashboard. Everytime we extract a new Sonarqube file again make sonar.prop config in the server only then it is visible under Dashboard.

Hi,

It sounds like each developer has a local instance of SonarQube pointing to the central database…? I.e. multiple SQ instances and one DB…?

If I’ve understood correctly, I have to start by saying this is a very bad idea; SonarQube is not designed to work this way and you will at best get inconsistent data (which seems to be the core of your issue).

If I have 3 SQ servers; let’s call them A, B, and C; pointing at the same database then I have 3 sets of Elasticsearch data. When I analyze a project against A, then A’s ES indices are updated, and I’ll see my new project in A. For the project to show up in B and C I’ll have to force reindexing on those servers.

Assuming I’ve correctly understood your situation, then I have to tell you that you should re-engineer your setup immediately. I’d start by changing the DB password, and then centralizing build/analysis using something like Jenkins.

If I’ve not correctly understood your situation, then please set me straight. :smile:

 
Ann

Exactly Ann… This is the issue we are facing but as of now the set up is like this.If I restart the SonarQube server reindexing should happen right but that’s the issue we face here.Even if we restart the SonarQube server as a service, UI is not updated. Instead i extract a new sonarqube package and configure again to see the updated one.

Correct me If I’m wrong with my Understanding.

Hi,

Sorry, but until you have only a single instance of SonarQube pointed at your database, no one’s going to be able to help you. And once you do have only a single instance pointed at your database, your problem will likely simply go away.

 
Ann

OK. Thank You.

Hi Ann,
Even after pointing the one sonarqube instance to the database the same issue.But now the analysis will be done from each developer machine to the same sonarqube instance in the server using maven

Hi,

This is a very bad idea. Why? To quote my own SO answer:

…why developers shouldn’t be using sonar:sonar locally: it updates the central server in a last-saved-wins manner. So if you’ve edited A.java and analyzed it locally before commit, and I’ve renamed A.java to B.java and done a similar pre-commit local analysis… what’s visible on the SonarQube server? Depends on who saved/analyzed last.

Instead, sonar:sonar should be run only from your CI tool on the checked-in code that’s already visible to the whole team .

 
Ann