SonarScanner.MSBuild.exe doesn't publish using Windows 10

scanner

(Jener Garcia Menezes) #1

Dear all,

I’ve a problem with SonarScanner.MSBuild.exe in machines with Windows 10. The same source and configuration works well in Windows 8.1.

Just when I run “SonarScanner.MSBuild.exe END”, it finishes well but doesn’t publish to sonarqube.
This was answer for the END command.

C:\ProjectName>“C:\Sonar\ES\project-group\ProjectName\SonarScanner.MSBuild.exe” end
SonarScanner for MSBuild 4.3.1
Using the .NET Framework version of the Scanner for MSBuild
Default properties file was found at C:\Sonar\ES\project-group\ProjectName\SonarQube.Analysis.xml
Loading analysis properties from C:\Sonar\ES\project-group\ProjectName\SonarQube.Analysis.xml
Post-processing started.
SONAR_SCANNER_OPTS is not configured. Setting it to the default value of -Xmx1024m
Calling the SonarQube Scanner…
The SonarQube Scanner has finished
10:33:33.225 Creating a summary markdown file…
10:33:33.23 Analysis results: https://mycompany/sonar/dashboard/index/vbnet-project
10:33:33.231 Post-processing succeeded.

Thanks in advance,


(Amaury Levé) #2

Hi,

I am quite surprised by the length of the end step log. There should be more information.
This seems quite likely to be a machine configuration issue. Have you checked that all dependencies (java, .net…) are installed (check this document)?

Cheers,
Amaury


(Jener Garcia Menezes) #3

Hi Amaury, I think is a environment problem too. But I don’t know what’s happening, the SonarScanner.MSBuild.exe doesn’t show any clue. I’ve attached the SonarScanner.MSBuild.exe end with verbose: sonar-end.txt (20.9 KB)

java version “1.8.0_181”
Java™ SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot™ 64-Bit Server VM (build 25.181-b13, mixed mode)

.NET versions are installed til 4.7.2.

Could you help me? Any other idea I could run?

Best regards,
Jener


(Amaury Levé) #4

Hi @jenergm,

Could you provide the log of the begin step too (with /d:sonar.verbose=true )? Also could you let me know the version of your SonarQube? The version of SonarVB and also the version of SonarC#?

Cheers,
Amaury


(Jener Garcia Menezes) #5

Hi Amaury,

Thanks for answer and following my case.

sonar-begin.txt (904 Bytes)

SonarQube

  • Version is 5.6.6
  • SonarC# is 5.9.0.1001
  • SonarVB is 4.0.0.115

Best regards,
Jener


(Amaury Levé) #6

Hi again,

You passed /d:sonar-verbose=true instead of /d:sonar.verbose=true to the begin step (dash instead of dot). Could you re-run with the correct syntax and upload again the logs?

Cheers,
Amaury


(Jener Garcia Menezes) #7

Hi,

Sorry… follow the file: sonar-begin.txt (6.4 KB)

Best regards,
Jener


(Amaury Levé) #8

Hi,

The logs mention SonarVB 6.5.0.3766 but the latest released version is 5.1, are you using the official plugins? Also I see that you are using a quite old version of SonarC#, is there a good reason not to update?

Cheers,
Amaury


(Jener Garcia Menezes) #9

Hi Amaury, how it’s going?

Yes, all plug-ins are official.
My doubt is why it’s working in Windows 8.1 machines. The same sources and configuration.

I attached here the Sonar System Informations:

.

Cheers,
Jener


(Jener Garcia Menezes) #10

Hi Amaury,

Is there anyway of cleaning full sonar cache? I think the problem can be some of that.

Cheers,
Jener


(Amaury Levé) #11

Hi,

Which cache are you referring too?


(Jener Garcia Menezes) #12

Hi @Ammo,

I find it can be any cache problem, I don’t know how types of cache sonar has. It can be java version or some environment variables?

There is other machine here, but with Windows 10 that it works well too.

Really I don’t know what’s happening… logs don’t show the problem…

Could you help me, please?

Cheers,
Jener


(Amaury Levé) #13

Can you create a small console application and put a // TODO: inside. Then run the scanner begin, build and the scanner end and let me know if you have something on your SonarQube instance.


(Jener Garcia Menezes) #14

Hi @Ammo,

Follow the file sonar-console-app.txt (8.0 KB)

Cheers,
Jener


(Amaury Levé) #15

Hi @jenergm,

I am sorry I didn’t noticed this before but you said you are on SonarQube 5.6.6 which is no longer supported (current LTS is 6.7.*). It’s always recommended to be at least on LTS version.

Could you upgrade your instance and give it a new try?


(Jener Garcia Menezes) #16

Hi @Ammo,
We will upgrade SonarQube soon, but I don’t know why it works in other machine with the same client.
Regards,
Jener


(Amaury Levé) #17

I agree that the behavior you describe is pretty weird and shouldn’t occur. Keep me posted with the results after the upgrade.


(Jener Garcia Menezes) #18

Hi @Ammo,

I tested in other server with sonar version 6.7.4.38452.

It didn’t work either. Same thing, works running the same sources and configurations in a Windows Server 2018 R2 x64, but in several machines with Windows 10 it don’t work.

Please, who can help me with this?

Cheers,


(Amaury Levé) #19

Could you manage to create a project that fails 100% cases on Windows 10 so that I can debug locally?


(Jener Garcia Menezes) #20

Any project fail. A simple console fail.