Sonarqube for .NET - Post Processing succeeded but there is no report in Dashboard

I’m using sonarqube-10.3.0.82913, with MSBuilder sonar-scanner-6.1.0.83647-net-framework, my project is .NET framework 7 and I’m trying to see the Result of Sonarqube, but there is no report in Dashboard of my project.

I reinstalled the Sonarqube, review the permissions, remove all temp files and the logs do not show any processing errors, but even all tentative the results are the same.

It follows attached my logs with verbose.sonar = true

Below is the final excerpt from SonarScaner.MSBuild.exe end
Log 1 - Begin.txt (7.3 KB)
Log 2 - End.txt (25.6 KB)

18:10:39.214 Writing processing summary to C:\Projetos\CIA\BR\BR-ADFS-Integration-Web\BR-ADFS-Integration.sonarqube\out\ProjectInfo.log
Calling the TFS Processor executable…
Executing file C:\SonarQube\mssbuilder\SonarScanner.MSBuild.TFSProcessor.exe
Args: ConvertCoverage C:\Projetos\CIA\BR\BR-ADFS-Integration-Web\BR-ADFS-Integration.sonarqube\conf\SonarQubeAnalysisConfig.xml C:\Projetos\CIA\BR\BR-ADFS-Integration-Web\BR-ADFS-Integration.sonarqube\out\sonar-project.properties
Working directory: C:\Projetos\CIA\BR\BR-ADFS-Integration-Web\BR-ADFS-Integration
Timeout (ms):-1
Process id: 14080
Process returned exit code 0
The TFS Processor has finished
Calling the SonarScanner CLI…
Executing file C:\SonarQube\mssbuilder\sonar-scanner-5.0.1.3006\bin\sonar-scanner.bat
Args: -Dsonar.scanAllFiles=true -Dproject.settings=C:\Projetos\CIA\BR\BR-ADFS-Integration-Web\BR-ADFS-Integration.sonarqube\out\sonar-project.properties --from=ScannerMSBuild/6.1 --debug
Working directory: C:\Projetos\CIA\BR\BR-ADFS-Integration-Web\BR-ADFS-Integration
Timeout (ms):-1
Process id: 12316
Process returned exit code 0
The SonarScanner CLI has finished
18:10:39.468 Post-processing succeeded.

Screenshot of Sonarqube running on localhost

Hi,

Welcome to the community!

Could we also have the build log from that verbose run?

 
Thx,
Ann

Thanks for the answer.

I redid the process.
It follows attached the all log files

Log 1 - Begin - 20240201.txt (7.3 KB)
Log 2 - Build - 20240201.txt (293.9 KB)
Log 3 - End - 20240201.txt (25.6 KB)

Thank you.

Hi,

Thanks for those logs. I can see issues being raised (in the build log) and I don’t see anything in the log to indicate a problem. So I’m going to call for another set of eyes.

 
Ann

Hi again,

Can you click through into your project and check its Background Tasks? You’ll find them under Project Settings.

 
Ann

Hi,
There is nothing running on background tasks. =/

To do a new test, I created a virtual machine, and a simple C# (.net core) project and the same thing happens. It’s very weird.

access.log (433.4 KB)
My Access Log from C:\SonarQube\sonarqube-10.3.0.82913\logs

Hi,

Your access log doesn’t include any lines for /api/ce/submit which is the URL used to submit analysis reports to SonarQube. I can only conclude that there’s something between the analyzer and SonarQube blocking the network traffic.

 
HTH,
Ann

Hi Ann,
I guess we’re getting close. :cry: :muscle:
In fact, there is something wrong, but what exactly?


Is there any config, properties or ini file I can check?

Hi,

Normally I think the clue would be found in your analysis logs, but what you’ve provided is essentially empty.

Maybe… watch your network traffic during an analysis?

 
Ann

Hi @BrunoBL ,

I had the same issue today and I found a solution, not the best, but it worked.
The problem for me was that the classic .net framework invocation wasn’t calling sonar-scanner correctly. For some reason they’re called but didn’t executed succefuly.
So I force this call at the end of script, like this:

SonarScanner.MSBuild.exe begin /k:"PROJECT-KEY" /d:sonar.token="TOKEN"
MSBuild.exe /t:Rebuild
SonarScanner.MSBuild.exe end /d:sonar.token="TOKEN"

sonar-scanner -Dsonar.token=TOKEN -Dsonar.projectKey=PROJECT-KEY -Dsonar.sources=. -Dsonar.host.url=http://localhost:9000 -X

You can’t include “” in sonar-scanner parameters, just the value.

I hope I’ve helped

2 Likes

Hi @fabricioasv,

Would you mind providing those logs?

 
Thx,
Ann

1 Like

Fantastic @fabricioasv and @ganncamp, it worked :heart_eyes:
I just had to make this change to call the sonar-scanner bat, see:

C:\SonarQube\mssbuilder\sonar-scanner-5.0.1.3006\bin\sonar-scanner.bat -Dsonar.token=TOKEN -Dsonar.projectKey=PROJECT-KEY -Dsonar.sources=. -Dsonar.host.url=http://localhost:9000 -X

Thank you so much!

1 Like

Sure @ganncamp !

I attach the logs from two executions, with and without force sonar-scanner call.

Maybe is important to say that I’m use sonarqube docker for server.
To initialize, I did this commands:

sysctl -w vm.max_map_count=524288
sysctl -w fs.file-max=131072
ulimit -n 131072
ulimit -u 8192
docker volume create --name sonarqube_data
docker volume create --name sonarqube_logs
docker volume create --name sonarqube_extensions
docker run -d -v sonarqube_data:/opt/sonarqube/data -v sonarqube_extensions:/opt/sonarqube/extensions -v sonarqube_logs:/opt/sonarqube/logs --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube

And unfortunately, I’m checking now that c# code is not being fully analyzed.
I’m trying to solve this …

_data_with_sonar-scanner.zip (31.5 KB)
_data_without_sonar-scanner.zip (28.0 KB)

1 Like

Hi @fabricioasv,

Thanks for the logs!

I’m a bit out of my depth at this point, so I’ve flagged this for more expert eyes.

 
Ann

Ok @ganncamp , no problem!

And I did another change that scanner worked for me too an maybe will work for you @BrunoBL.
I was using sonar-sanner for .NET and when I change to sonar-sanner CLI (SonarScanner CLI) I just needed to execute the command:

call sonar-scanner -Dsonar.token=TOKEN

But unfortunately, I still with C# problem.
I check log execution and I saw this information:

“WARN: Your project contains C# files which cannot be analyzed with the scanner you are using. To analyze C# or VB.NET, you must use the SonarScanner for .NET 5.x or higher, see https://redirect.sonarsource.com/doc/install-configure-scanner-msbuild.html

But I’m already using tje sonar-scanner 5.0.1 from sonar-scanner CLI.

So, I continue trying to solve c# issue …

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.