ERROR: Error during SonarQube Scanner execution


(Rafal) #1

Hi Guys,

We have a issue with SonarQube scanner, can you please help us with this. Please see the log below:

2019-01-29T10:22:51.5201295Z ##[error]ERROR: Error during SonarQube Scanner execution
2019-01-29T10:22:51.5201295Z ERROR: Error during SonarQube Scanner execution
2019-01-29T10:22:51.5201295Z ##[error]ERROR: Unable to load component class org.sonar.scanner.repository.ProjectRepositories
ERROR: Caused by: Error 500 on http://[server_name]:9000/batch/project.protobuf?key=[Proj_name]: {"errors":[{"msg":"An error has occurred. Please contact your administrator"}]}

ERROR:
2019-01-29T10:22:51.5201295Z ERROR: Unable to load component class org.sonar.scanner.repository.ProjectRepositories
2019-01-29T10:22:51.5201295Z ERROR: Caused by: Error 500 on http://[server_name]:9000/batch/project.protobuf?key=[Proj_name]: : {"errors":[{"msg":"An error has occurred. Please contact your administrator"}]}
2019-01-29T10:22:51.5201295Z ERROR:
2019-01-29T10:22:51.5826232Z ##[error]The SonarQube Scanner did not complete successfully
2019-01-29T10:22:51.5826232Z The SonarQube Scanner did not complete successfully
2019-01-29T10:22:51.5982444Z 10:22:51.598 Creating a summary markdown file...
2019-01-29T10:22:51.5982444Z ##[error]10:22:51.598 Post-processing failed. Exit code: 1
2019-01-29T10:22:51.5982444Z 10:22:51.598 Post-processing failed. Exit code: 1
2019-01-29T10:22:51.6138706Z ##[error]D:\Dev\Agent\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.4.1\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe failed with return code: 1
2019-01-29T10:22:51.6295000Z ##[section]Finishing: Run Code Analysis

There is nothing in Event Log in SonarQube server.

SonarScanner for MSBuild 4.4.2
SonarQube Scanner 3.2.0.1227
Java 1.8.0_151 Oracle Corporation (64-bit)
Windows Server 2016 10.0 amd64
SONAR_SCANNER_OPTS=-Xmx1024m
User cache: C:\Users\xxx.sonar\cache
SonarQube server 7.3.0

Please let me know if I need to add something important.

Thanks,
Rafal


(G Ann Campbell) #2

Hi Rafal,

I’ve code-formatted your logs to make them easier to read.

If you’re getting a 500 on the analysis side that means that the server is sending a 500, and there will be an error in some log. This will help: https://docs.sonarqube.org/latest/setup/troubleshooting/

 
Ann


(Rafal) #3

Hi Ann,

Thanks for your update. I have found below logs in the web.log file. I think that may be connected with the issue we have. Can you please look at it and tell me what do you think about it:

I saw also that there is Java Update available on the server.

Thanks.
Rafal


(Rafal) #4

Hi Guys,

I have found some clues at:
https://stackoverflow.com/questions/44669506/sonar-unable-to-load-component-class-org-sonar-scanner-scan-projectlock/47540538

Fingers crossed!
Thanks,
Rafal


(Rafal) #5

Hi Ann,

I thought that the issue has been fixed but it wasn’t.
Can you please advice what I have to check regarding this error:

ERROR web[AWZ9gpivyUO+rsTSAFAr][o.s.s.w.WebServiceEngine] Fail to process request http://[server_name]:9000/batch/project.protobuf?key=[proj_name]
java.lang.NullPointerException: null

Thanks.
Rafal


(G Ann Campbell) #6

Hi Rafal,

Can you access the project via the UI?

 
Ann


(Rafal) #7

Hi Ann,

No, but I can ask dev guys for this.
Please let me know what you need to check and I will ask them.
I have access to the TFS configuration and to the SonarQube server also.

Thanks
Rafal