Sonar-scanner problem: not possible to connect to SonarQube server

Environment:

  • SonarQube Entreprise 10.3
  • SonarScanner CLI 6.0.0.4432
  • Local machine: Windows 10 64bits
  • Languages of the repository: C++

Problem

Hello,

I want to launch a SonarQube analysis on my local machine using Sonar-scanner.
For that, I used the wrapper to create the json file stored in build_wrapper_output_directory.
I launched the Sonar-scanner from the root of my project using MS command line.
The process begin, but I’ve an error, it seems it can’t connect to my SonarQube server.
I verified with my IT service, it seems there is no problem to access to the SonarQube server (I can access with my webrowser).
The SonarQube server url is defined in my sonar-project.properties file.
I tried to add the token in my properites file, but it is the same thing.
I don’t know if it is a connection problem or an identification problem.
Do you have an idea where does come from the problem ?

Thanks for your support.

Error message:

INFO  Scanner configuration file: C:\Program Files (x86)\sonar-scanner-6.0.0.4432-windows\bin\..\conf\sonar-scanner.properties
INFO  Project root configuration file: C:\Workspace\HUT-CRI-SEEDS-SCP\sonar-project.properties
INFO  SonarScanner CLI 6.0.0.4432
INFO  Java 17.0.11 Eclipse Adoptium (64-bit)
INFO  Windows 10 10.0 amd64
DEBUG Scanner max available memory: 3 GB
DEBUG Create: C:\Users\a0e72162\.sonar\cache
INFO  User cache: C:\Users\a0e72162\.sonar\cache
DEBUG Create: C:\Users\a0e72162\.sonar\cache\_tmp
DEBUG Successfully loaded KeyStore of the type [Windows-ROOT] having [63] entries
DEBUG Failed to load KeyStore of the type [Windows-ROOT-LOCALMACHINE]
DEBUG Successfully loaded KeyStore of the type [Windows-ROOT-CURRENTUSER] having [63] entries
DEBUG Successfully loaded KeyStore of the type [Windows-MY] having [0] entries
DEBUG Successfully loaded KeyStore of the type [Windows-MY-CURRENTUSER] having [0] entries
DEBUG Failed to load KeyStore of the type [Windows-MY-LOCALMACHINE]
DEBUG Loaded [126] system trusted certificates
DEBUG --> GET https://sonarqube_server_address/api/v2/analysis/version
DEBUG <-- HTTP FAILED: java.net.SocketTimeoutException: Connect timed out
DEBUG --> GET https://sonarqube_server_address/api/server/version
DEBUG <-- HTTP FAILED: java.net.SocketTimeoutException: Connect timed out
INFO  EXECUTION FAILURE
INFO  Total time: 10.346s
ERROR Error during SonarScanner CLI execution
java.lang.IllegalStateException: Failed to get server version
        at org.sonarsource.scanner.lib.ScannerEngineBootstrapper.getServerVersion(ScannerEngineBootstrapper.java:147)
        at org.sonarsource.scanner.lib.ScannerEngineBootstrapper.bootstrap(ScannerEngineBootstrapper.java:111)
        at org.sonarsource.scanner.cli.Main.analyze(Main.java:75)
        at org.sonarsource.scanner.cli.Main.main(Main.java:63)
Caused by: java.lang.IllegalStateException: Call to URL [https://sonarqube-p.cicd.iasp.tgscloud.net/api/v2/analysis/version] failed
        at org.sonarsource.scanner.lib.internal.http.ServerConnection.callUrl(ServerConnection.java:172)
        at org.sonarsource.scanner.lib.internal.http.ServerConnection.callApi(ServerConnection.java:143)
        at org.sonarsource.scanner.lib.internal.http.ServerConnection.callRestApi(ServerConnection.java:121)
        at org.sonarsource.scanner.lib.ScannerEngineBootstrapper.getServerVersion(ScannerEngineBootstrapper.java:142)
        ... 3 common frames omitted
Caused by: java.net.SocketTimeoutException: Connect timed out
        at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(Unknown Source)
        at java.base/sun.nio.ch.NioSocketImpl.connect(Unknown Source)
        at java.base/java.net.SocksSocketImpl.connect(Unknown Source)
        at java.base/java.net.Socket.connect(Unknown Source)
        at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128)
        at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295)
        at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207)
        at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
        at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
        at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
        at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:221)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
        at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
        at org.sonarsource.scanner.lib.internal.http.ServerConnection.callUrl(ServerConnection.java:170)
        ... 6 common frames omitted
ERROR
ERROR Re-run SonarScanner CLI using the -X switch to enable full debug logging.

Hey there.

A good first debugging step would be to just throw this in some powershell.

Invoke-WebRequest https://sonarqube_server_address/api/server/version

Does it come back successful?

A common problem here is also users assuming that https is available when the SonarQube server hasn’t been configured to be served over HTTPS. Are you sure your browser is accessing it at https:// and not http://?

Hello,

thanks for your answer.

The result of to the Invoke-WebRequest command is successful:

StatusCode : 200
StatusDescription : OK
Content : 10.3.0.82913
RawContent : HTTP/1.1 200 OK
Connection: keep-alive
Strict-Transport-Security: max-age=31536000; includeSubDomains;
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff…
Forms : {}
Headers : {[Connection, keep-alive], [Strict-Transport-Security, max-age=31536000; includeSubDomains;],
[X-Frame-Options, SAMEORIGIN], [X-XSS-Protection, 1; mode=block]…}
Images : {}
InputFields : {}
Links : {}
ParsedHtml : mshtml.HTMLDocumentClass
RawContentLength : 12

I can connect too with my web browser successful.

I did 2 tries:

1. The first with sonar-scanner-5.0.1.3006

I launched a sonar-scanner command.

The result log:

INFO: Scanner configuration file: C:\Program Files (x86)\sonar-scanner-5.0.1.3006-windows\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: C:\Workspace\HUT-CRI-SEEDS-SCP\sonar-project.properties
08:12:23.572 INFO: SonarScanner 5.0.1.3006
08:12:23.578 INFO: Java 17.0.7 Eclipse Adoptium (64-bit)
08:12:23.579 INFO: Windows 10 10.0 amd64
08:12:23.704 DEBUG: keyStore is :
08:12:23.704 DEBUG: keyStore type is : pkcs12
08:12:23.704 DEBUG: keyStore provider is :
08:12:23.704 DEBUG: init keystore
08:12:23.705 DEBUG: init keymanager of type SunX509
08:12:23.834 DEBUG: Create: C:\Users\a0e72162\.sonar\cache
08:12:23.835 INFO: User cache: C:\Users\a0e72162\.sonar\cache
08:12:23.835 DEBUG: Create: C:\Users\a0e72162\.sonar\cache\_tmp
08:12:23.839 DEBUG: Extract sonar-scanner-api-batch in temp
08:12:23.844 DEBUG: Get bootstrap index
08:12:23.845 DEBUG: Download: **https://sonarqube_address.net/batch/index**
08:12:44.936 ERROR: SonarQube server [**https://sonarqube_address.net**] can not be reached
08:12:44.937 INFO: ------------------------------------------------------------------------
08:12:44.941 INFO: EXECUTION FAILURE
08:12:44.944 INFO: ------------------------------------------------------------------------
08:12:44.947 INFO: Total time: 21.443s
08:12:44.984 INFO: Final Memory: 3M/20M
08:12:44.985 INFO: ------------------------------------------------------------------------
08:12:44.988 ERROR: Error during SonarScanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis
        at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
        at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
        at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
        at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
        at org.sonarsource.scanner.cli.Main.execute(Main.java:74)
        at org.sonarsource.scanner.cli.Main.main(Main.java:62)
Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server
        at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:42)
        at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58)
        at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
        at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
         7 more
Caused by: java.net.ConnectException: Failed to connect to sonarqube_address.net/13.107.246.65:443
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connectSocket(RealConnection.java:265)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connect(RealConnection.java:183)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.Transmitter.newExchange(Transmitter.java:169)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.getResponseWithInterceptorChain(RealCall.java:221)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.execute(RealCall.java:81)
        at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:115)
        at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:99)
        at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:39)
         10 more
Caused by: java.net.ConnectException: Connection timed out: no further information
        at java.base/sun.nio.ch.Net.pollConnect(Native Method)
        at java.base/sun.nio.ch.Net.pollConnectNow(Unknown Source)
        at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(Unknown Source)
        at java.base/sun.nio.ch.NioSocketImpl.connect(Unknown Source)
        at java.base/java.net.SocksSocketImpl.connect(Unknown Source)
        at java.base/java.net.Socket.connect(Unknown Source)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.platform.Platform.connectSocket(Platform.java:130)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connectSocket(RealConnection.java:263)
        31 more
08:12:45.027 ERROR:
08:12:45.027 ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

I launched an Invoke-WebRequest: Invoke-WebRequest https://sonarqube_address.net/batch/index/batch/index with a power shell

The result is ok:

StatusCode        : 200
StatusDescription : OK
Content           : scanner-enterprise-10.3.0.82913-all.jar|017822ac5a4cda64e2a22aeda676951f

RawContent        : HTTP/1.1 200 OK
                    Connection: keep-alive
                    Strict-Transport-Security: max-age=31536000; includeSubDomains;
                    X-Frame-Options: SAMEORIGIN
                    X-XSS-Protection: 1; mode=block
                    X-Content-Type-Options: nosniff...
Forms             : {}
Headers           : {[Connection, keep-alive], [Strict-Transport-Security, max-age=31536000; includeSubDomains;],
                    [X-Frame-Options, SAMEORIGIN], [X-XSS-Protection, 1; mode=block]...}
Images            : {}
InputFields       : {}
Links             : {}
ParsedHtml        : mshtml.HTMLDocumentClass
RawContentLength  : 73

2. The second with sonar-scanner-6.0.0.4432

I launched a sonar-scanner command.

The result log:

08:21:26.091 INFO  Scanner configuration file: C:\Program Files (x86)\sonar-scanner-6.0.0.4432-windows\bin\..\conf\sonar-scanner.properties
08:21:26.095 INFO  Project root configuration file: C:\Workspace\HUT-CRI-SEEDS-SCP\sonar-project.properties
08:21:26.107 INFO  SonarScanner CLI 6.0.0.4432
08:21:26.108 INFO  Java 17.0.11 Eclipse Adoptium (64-bit)
08:21:26.109 INFO  Windows 10 10.0 amd64
08:21:26.117 DEBUG Scanner max available memory: 3 GB
08:21:26.129 DEBUG Create: C:\Users\a0e72162\.sonar\cache
08:21:26.130 INFO  User cache: C:\Users\a0e72162\.sonar\cache
08:21:26.130 DEBUG Create: C:\Users\a0e72162\.sonar\cache\_tmp
08:21:26.273 DEBUG Successfully loaded KeyStore of the type [Windows-ROOT] having [63] entries
08:21:26.273 DEBUG Failed to load KeyStore of the type [Windows-ROOT-LOCALMACHINE]
08:21:26.299 DEBUG Successfully loaded KeyStore of the type [Windows-ROOT-CURRENTUSER] having [63] entries
08:21:26.301 DEBUG Successfully loaded KeyStore of the type [Windows-MY] having [0] entries
08:21:26.302 DEBUG Successfully loaded KeyStore of the type [Windows-MY-CURRENTUSER] having [0] entries
08:21:26.302 DEBUG Failed to load KeyStore of the type [Windows-MY-LOCALMACHINE]
08:21:26.304 DEBUG Loaded [126] system trusted certificates
08:21:26.528 DEBUG --> GET https://sonarqube_address.net/api/v2/analysis/version
08:21:31.580 DEBUG <-- HTTP FAILED: java.net.SocketTimeoutException: Connect timed out
08:21:31.581 DEBUG --> GEThttps://sonarqube_address.net/api/server/version
08:21:36.586 DEBUG <-- HTTP FAILED: java.net.SocketTimeoutException: Connect timed out
08:21:36.587 INFO  EXECUTION FAILURE
08:21:36.593 INFO  Total time: 10.503s
08:21:36.594 ERROR Error during SonarScanner CLI execution
java.lang.IllegalStateException: Failed to get server version
        at org.sonarsource.scanner.lib.ScannerEngineBootstrapper.getServerVersion(ScannerEngineBootstrapper.java:147)
        at org.sonarsource.scanner.lib.ScannerEngineBootstrapper.bootstrap(ScannerEngineBootstrapper.java:111)
        at org.sonarsource.scanner.cli.Main.analyze(Main.java:75)
        at org.sonarsource.scanner.cli.Main.main(Main.java:63)
Caused by: java.lang.IllegalStateException: Call to URL [https://sonarqube-p.cicd.iasp.tgscloud.net/api/v2/analysis/version] failed
        at org.sonarsource.scanner.lib.internal.http.ServerConnection.callUrl(ServerConnection.java:172)
        at org.sonarsource.scanner.lib.internal.http.ServerConnection.callApi(ServerConnection.java:143)
        at org.sonarsource.scanner.lib.internal.http.ServerConnection.callRestApi(ServerConnection.java:121)
        at org.sonarsource.scanner.lib.ScannerEngineBootstrapper.getServerVersion(ScannerEngineBootstrapper.java:142)
        ... 3 common frames omitted
Caused by: java.net.SocketTimeoutException: Connect timed out
        at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(Unknown Source)
        at java.base/sun.nio.ch.NioSocketImpl.connect(Unknown Source)
        at java.base/java.net.SocksSocketImpl.connect(Unknown Source)
        at java.base/java.net.Socket.connect(Unknown Source)
        at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128)
        at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295)
        at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207)
        at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
        at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
        at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
        at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:221)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
        at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
        at org.sonarsource.scanner.lib.internal.http.ServerConnection.callUrl(ServerConnection.java:170)
        ... 6 common frames omitted
08:21:36.604 ERROR
08:21:36.607 ERROR Re-run SonarScanner CLI using the -X switch to enable full debug logging.

I launched an Invoke-WebRequest: Invoke-WebRequest https://sonarqube_address.net/api/v2/analysis/version with a power shell

The result is nok:

Invoke-WebRequest : Le serveur distant a retourné une erreur : (401) Non autorisé.
Au caractère Ligne:1 : 1
 Invoke-WebRequest https://sonarqube_address.net/api/v2/analysis/versiont/api/v2/a ...

     CategoryInfo          : InvalidOperation : (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebEx
   ception
     FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

I launched an other Invoke-WebRequest: Invoke-WebRequest https://sonarqube_address.net/api/server/version with a power shell

The result is ok:

StatusCode        : 200
StatusDescription : OK
Content           : 10.3.0.82913
RawContent        : HTTP/1.1 200 OK
                    Connection: keep-alive
                    Strict-Transport-Security: max-age=31536000; includeSubDomains;
                    X-Frame-Options: SAMEORIGIN
                    X-XSS-Protection: 1; mode=block
                    X-Content-Type-Options: nosniff...
Forms             : {}
Headers           : {[Connection, keep-alive], [Strict-Transport-Security, max-age=31536000; includeSubDomains;],
                    [X-Frame-Options, SAMEORIGIN], [X-XSS-Protection, 1; mode=block]...}
Images            : {}
InputFields       : {}
Links             : {}
ParsedHtml        : mshtml.HTMLDocumentClass
RawContentLength  : 12

Even when the ressources exist and when it is possible to access them, it seems the the sonar-scanner can’t.
Strange ?

Is SonarQube entreprise 10.3 compatible with the sonar-scanner 6.0.0.4432 and 5.0.1.3006 ?

Hey there.

We just need to focus on the call to /api/server/version. The Scanner (v6) supports another endpoint on newer versions of SonarQube, but it’s okay if it fails, because it falls back to the old one.

Can you confirm that 13.107.246.65 is the expected IP address your SonarQube server is being hosted at?

You should be able to do something like:

Resolve-DNSName sonarqube_address.net

To see if they match.

Yes, 13.107.246.65` is the IP address of sonarqube_address.net.

There is no problem to access it.

We can try and isolate the issue a bit further with a tool like SSLPoke. Making sure that you use the same Java distribution that’s running your SonarQube server, whether or not this tool can make a successful connection to your SQ server might tell us… something (like if the issue is specific to Java).

Hello,
thanks for the answer, but I don’t know the Java version used on the SonarQube server, because the server is on an other site.

Ah, whoops! Got myself confused. I mean the scanner, which runs either on your local installation of Java or the version embedded in the scanner zip.

No, I downloaded the scanner from SonarQube website and installed it on my computer

Looks like you are using windows… But if WSL is an option, you might want to checkout sonarless GitHub - gitricko/sonarless: SonarQube Scan CLI + GitHub Action without a need of a dedicated hosted SonarQube Server

It automates your scanning (include setup) to just sonarless scan on your local git directory.

Please stop promoting your tool in discussions unrelated to it.

The original poster is utilizing SonarQube Enterprise Edition for C++ code analysis.

Your tool appears to be a stripped-down version of SonarQube, lacking its key features, not suitable for enterprise needs, and it lacks support for C++ code as it’s based on the Community Edition. It doesn’t even work for this situation!

2 Likes

Oops, u are right… community version supports C# and not C++. For those who like to use community version for C++, it seems like there is GitHub - SonarQubeCommunity/sonar-cppcheck: SonarQube Cppcheck Plugin

Still, just trying to be helpful here… It can be good to troubleshoot if the issue is a local issue or a remote issue. Installing a local sonarqube and try use the same scanning can help to determinate that. That is the next step I would do especially you don’t have access to remote sonarqube

In fact I’m waiting the IT update SonarQube to 10.6, because normally, I will not need to use wrapper, it will solve my problems.