Sonarqube analysis on my project fails intermittently

252 views
Skip to first unread message

vinay premkumar

unread,
Jan 19, 2017, 2:02:29 AM1/19/17
to SonarQube
Hi,

I am using Sonarqube version 5.1. The analysis fails intermittently with the below error.

08:35:55 ERROR: Error during SonarQube Scanner execution
08:35:55 ERROR: Fail to decorate 'org.sonar.api.resources.Project@364f4a06[id=387190,key=projectname:1.0,qualifier=TRK]'
08:35:55 ERROR: Caused by: Unable to find org.sonar.api.database.model.Snapshot with id 48113743

OR 

10:46:51 17:46:53.305 ERROR - It looks like an analysis of 'projectname' is already running (started 7 minutes ago).
10:46:51 INFO: ------------------------------------------------------------------------
10:46:51 INFO: EXECUTION FAILURE
10:46:51 INFO: ------------------------------------------------------------------------
10:46:51 INFO: Total time: 14.224s
10:46:52 INFO: Final Memory: 18M/537M
10:46:52 INFO: ------------------------------------------------------------------------
10:46:52 ERROR: Error during SonarQube Scanner execution
10:46:52 ERROR: The project is already being analysed.

Can you please let us how to resolve this?

Regards,
Vinay

G. Ann Campbell

unread,
Jan 19, 2017, 4:28:04 AM1/19/17
to SonarQube
Hi Vinay,

The second error comes from multiple, simultaneous analyses of the same project, which you just can't do in 5.1. I'm fairly sure the first error is a result of the same thing.

I would guess you have your CI system set to fire a build/analysis job for every commit without blocking simultaneous runs of the same job. Try tuning your CI job to block, and/or have a wait period. That should help.


Ann

vinay premkumar

unread,
Jan 20, 2017, 5:42:16 AM1/20/17
to SonarQube
Hi Ann,

Thanks for your quick reply. The settings in jenkins allows only one concurrent build to run at a time. You can find the details in the attached snapshot.Besides that there is atleast 1-2 hours difference between the failed and passed jobs as well and analysis roughly takes only 10-20 mins time. Could there be anything wrong from the server end which could be causing this?

Regards,
Vinay
Capture.PNG

G. Ann Campbell

unread,
Jan 23, 2017, 3:17:06 AM1/23/17
to vinay premkumar, SonarQube
Hi Vinay,

If it's not in your Jenkins setup, then my next piece of advice is going to be to upgrade your SonarQube instance. In 5.1 analyses were still synchronous, and there were occasionally problems with the mechanism to keep simultaneous analyses from running. By 5.6, the current Long Term Support version, analyses became asynchronous, with that mechanism entirely eliminated. 


Ann



---
G. Ann CAMPBELL | SonarSource
Product Manager

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/gy2ExsH3aiI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/30b87204-fb57-4f1e-a8fe-741e1c31ccbd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages