Not able to retrieve the sonarqube metrics data using API

Hi Team,

We are using SonarQube 8.9.6 Community Edition and Sonar-scanner 2.8.

The sonar-scan stage is executed successfully in the Jenkins. After sonar-scan, we added API call in the script to retrieve the code coverage metrics data from SonarQube.

We are getting the below error message.

API : http://localhost:9000/api/measures/component?component= Project-name&metricKeys=new_lines_to_cover,new_uncoverd_lines,new_line_coverage

Error Message: ERROR - additionalMessage=[------------Issue in sonar data processing groovy.lang.MissingMethodException: No Signature of Method.

Note: We are facing this issue from last two days only, previously it was working fine. There are no changes in the pipeline script and no plugins were updated.

Quick response is appreciated.


Hey there.

First of all, you’re using an extremely old version of the SonarQube scanner. You should upgrade to the latest version.

And, it looks like the error being thrown isn’t being thrown by anything related to the scanner, but specifically to your script/Jenkinsfile. If the API call is actually returning data (you might want to try a simple curl from your Jenkinsfile, outside of any other processing)… you are probably going to have to examine your script a bit closer.

Hi Colin,

Thanks for Quick response.

The script hasn’t been changed from last 6 months and the issue is started from last 2 days.

And also the API call is working outside the pipeline. We are using “curl” command only.