I’m using Sonarqube 9.9 for the project analysis which is deployed on the amazon-linux instance in the zip form. I’m doing the analysis through gitlab-CI.
Now there is one project on which I’m trying to run the analysis, but on running the gitlab job which is doing the analysis, the error mentioned in the header is coming.
I have tried clearing .sonar files before the analysis by adding
rm -rf .sonar
I also tried clearing the runner cache, I also tried running the analysis by Temporarily Disabling Cache by adding
-Dsonar.cpd.exclusions=**
in the sonar-scanner command.
Below is the .gitlab-ci.yml file for the analysis job:
I don’t expect that either removing .sonar or setting -Dsonar.cpd.exclusions will have any effect here (you could try setting sonar.analysisCache.enabled=false, but this won’t fix the root cause!)
Could you turn on DEBUG level logs and attach the full logs? sonar-scanner -X.
Thank you for your response, I have tried running the analysis by adding sonar.analysisCache.enabled=false and it is working, but as you stated that it won’t fix the root cause, so if I face this issue again in near future, I will post the DEBUG logs here.
Thanks. I think we can rule out that this has anything specifically to do with the cache, as this time it’s on another file.
06:21:20.860 DEBUG: Download https://sonar.jungleworks.com/batch/file?name=sonar-scanner-engine-shaded-9.9.1.69595-all.jar to /builds/hippo/hippo-backend/.sonar/cache/_tmp/fileCache1420644740582642099.tmp
...
Caused by: java.net.ProtocolException: unexpected end of stream
It looks like you’re serving your SonarQube server over HTTPS, which means there’s something in the middle that’s actually serving your project over HTTPS (Nginx, IIS, Httpd). What are you using, and could there be some non-standard configuration that inteferes with client connections, especially when it comes to downloading larger files (reference)?
Thank you for the response, The maximum body size for the client was 100M, I have now updated it to 1000MB, and after the update, the analysis is working fine.