SonaScanner_Failure.log (2.3 MB) We are attempting to migrate from Sonarqube to SonarCloud, and are having dificulty getting the SonarScanner to complete execution successfully and report to our SonarCloud project.
- ALM used: Github
- CI system used: AppVeyor
- Scanner command used when applicable (private details masked):
SonarScanner.MSBuild.exe “begin” "/o:crownpeak"
“/k:Crownpeak_dxm” "/n:Advantage ServerApps"
“/v:$BuildNum” "/d:sonar.host.url=https://sonarcloud.io"
“/d:sonar.login=$SonarToken” "/d:sonar.sources=C:\projects\advantage\serverapps"
“/d:sonar.verbose=true”
- Languages of the repository: C# .net framework 4.7.1
- Error observed (wrap logs/code around with triple quotes ``` for proper formatting):
06:17:47.525 INFO: EXECUTION FAILURE
06:17:47.525 INFO: ------------------------------------------------------------------------
06:17:47.525 INFO: Total time: 46.211s
Crownpeak Run Step - End: Ends SonarQube analysis
CrownPeak Build Step - Time: Step time 000 min. 48.78 sec. (total millis=48775.5866)
CrownPeak Build Step - Time: Total time 074 min. 09.16 sec. (total millis=4449158.4147)
At C:\projects\build\advantage.build.ps1:367 char:1
+ task EndAnalyze {
+ ~~~~~~~~~~~~~~~~~
At C:\projects\build\advantage.build.ps1:1032 char:1
+ task Advantage `
+ ~~~~~~~~~~~~~~~~~
ERROR: 06:17:47.653 ERROR: Error during SonarScanner execution
Hi @Andy-Blatecky and welcome to the community !
Do you have the same setup between the CI you had for SonarQube and this one ?
If yes, what is the heap space dedicated to the JVM ?
It also look like that the log doesn’t contain the full stack of the error, is it possible for you to try to get it ? (it may not be present however, this is for troubleshooting purpose )
Thanks.
Hi Mickael,
Thanks for the response. Yes, this is the same CI we were using for SonarQube. We were also able to get this working and reporting to our on prem SonarQube server within our CI previously, so not sure JVM is contributing to the issue. Let me know if it would help to still track this down.
As for the logs, are you referring to the attached log file? This should contain everything that Sonar reported… I did have to cut out the logs of the C# solutions building due to upload size constraints.
Please advise. Thanks!
You may have some differences of the version of the analyzer you are using. Depending on the version of SonarQube you were using (i think it was starting with 8.3 or the latest 8.4) analyzers are not upgraded anymore (automatically), whereas on SonarCloud, you will always have the latest version with new rules, … which can take a bit more of memory than the previous versions.
That being said, JVM can be impacted, that’s the reason why i was asking the amount of memory dedicated to it.
I will take a look at the JVM size on our build workers. What is the recommended JVM size for running the analyzer?
Do the logs in the attached log file indicate any other issues to explore?
Here’s what I have for JVM size:
C:\Windows\System32>javaw -XX:+PrintFlagsFinal | find "MaxHeapSize" uintx MaxHeapSize := 1310720000 {product}
C:\Windows\System32>javaw -XX:+PrintFlagsFinal | find "InitialHeapSize" uintx InitialHeapSize := 83886080 {product}
Hi @Andy-Blatecky
Do you still face issues with that ?
Sorry for getting back late to you.
Thanks.
Mickaël