Fail to download scanner-developer-8.1.0.31237-all.jar

Hi everybody and thanks for accepting myself in the community!
I’m trying to setup a SonarQube environment.
On Windows 10 I’m using SonarQube 8.1.0 and the Sonar Scanner for MSBuild 4.8 (the one related to .NET Core)
I was able to launch the local server on the port 9000, connect it to a SQL Server database, create a project and get the identifier token to use for login, create the .bat file in the directory of the .NET project i would analyze.
Everything seems fine during the scanner’s first passage (begin), as I clearly see all the issues passing by on the screen. Then executing the ‘end’ command, it always breaks when trying to download the file named scanner-developer-8.1.0.31237-all.jar
Error is : SonarQube server [http://localhost:9000] can not be reached, but I suppose it’s misleading because the scanner has previously download from the same server…
I’ve tried modifying login parameters in every places but the best I can do is getting the above error…
Yet tried restart installation :disappointed_relieved:
Any suggestion will be appreciated!
Here is the verbose log of the ‘end’ scanning :

11:50:57.248 INFO: Scanner configuration file: C:\Users\Giovanni\.dotnet\tools\.store\dotnet-sonarscanner\4.8.0\dotnet-sonarscanner\4.8.0\tools\netcoreapp3.0\any\sonar-scanner-4.2.0.1873\bin\..\conf\sonar-scanner.properties
11:50:57.253 INFO: Project root configuration file: E:\VisualStudio\repos\Dev\3.0\PS\MA.WS.PS\Base\.sonarqube\out\sonar-project.properties
11:50:57.286 INFO: SonarQube Scanner 4.2.0.1873
11:50:57.286 INFO: Java 1.8.0_131 Oracle Corporation (64-bit)
11:50:57.286 INFO: Windows 10 10.0 amd64
11:50:57.436 DEBUG: keyStore is :
11:50:57.436 DEBUG: keyStore type is : jks
11:50:57.436 DEBUG: keyStore provider is :
11:50:57.436 DEBUG: init keystore
11:50:57.436 DEBUG: init keymanager of type SunX509
11:50:58.049 DEBUG: Create: C:\Users\Giovanni\.sonar\cache
11:50:58.050 INFO: User cache: C:\Users\Giovanni\.sonar\cache
11:50:58.050 DEBUG: Create: C:\Users\Giovanni\.sonar\cache\_tmp
11:50:58.059 DEBUG: Extract sonar-scanner-api-batch in temp...
11:50:58.127 DEBUG: Get bootstrap index...
11:50:58.128 DEBUG: Download: http://localhost:9000/batch/index
11:50:58.210 DEBUG: Get bootstrap completed
11:50:58.219 DEBUG: Download http://localhost:9000/batch/file?name=scanner-developer-8.1.0.31237-all.jar to C:\Users\Giovanni\.sonar\cache\_tmp\fileCache3624859097868949590.tmp
11:50:58.764 INFO: ------------------------------------------------------------------------
11:50:58.764 INFO: EXECUTION FAILURE
11:50:58.764 INFO: ------------------------------------------------------------------------
11:50:58.764 ERROR: SonarQube server [http://localhost:9000] can not be reached
11:50:58.765 INFO: Total time: 1.545s
11:50:58.786 INFO: Final Memory: 5M/245M
11:50:58.787 ERROR: Error during SonarQube Scanner execution
11:50:58.787 INFO: ------------------------------------------------------------------------
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
        at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
        at java.security.AccessController.doPrivileged(Native Method)
        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:73)
        at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: Fail to download scanner-developer-8.1.0.31237-all.jar to C:\Users\Giovanni\.sonar\cache\_tmp\fileCache3624859097868949590.tmp
        at org.sonarsource.scanner.api.internal.cache.FileCache.download(FileCache.java:100)
        at org.sonarsource.scanner.api.internal.cache.FileCache.get(FileCache.java:84)
        at org.sonarsource.scanner.api.internal.JarDownloader.lambda$getScannerEngineFiles$0(JarDownloader.java:60)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
        at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:61)
        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.SocketException: Connection reset
        at java.net.SocketInputStream.read(SocketInputStream.java:210)
        at java.net.SocketInputStream.read(SocketInputStream.java:141)
        at org.sonarsource.scanner.api.internal.shaded.okio.Okio$2.read(Okio.java:140)
        at org.sonarsource.scanner.api.internal.shaded.okio.AsyncTimeout$2.read(AsyncTimeout.java:237)
        at org.sonarsource.scanner.api.internal.shaded.okio.RealBufferedSource.indexOf(RealBufferedSource.java:358)
        at org.sonarsource.scanner.api.internal.shaded.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:230)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http1.Http1ExchangeCodec.readHeaderLine(Http1ExchangeCodec.java:242)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.java:213)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.Exchange.readResponseHeaders(Exchange.java:115)
        at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.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.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:43)
        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:113)
        at org.sonarsource.scanner.api.internal.ServerConnection.downloadFile(ServerConnection.java:78)
        at org.sonarsource.scanner.api.internal.JarDownloader$ScannerFileDownloader.download(JarDownloader.java:73)
        at org.sonarsource.scanner.api.internal.cache.FileCache.download(FileCache.java:98)
        ... 19 more
Process returned exit code 1
The SonarQube Scanner did not complete successfully
11:50:58.857  Post-processing failed. Exit code: 1

E:\VisualStudio\repos\Dev\3.0\PS\MA.WS.PS\Base>set /P var2=wait for user...
wait for user...

Got it.
It’s just an antivirus issue (in my case, Kaspersky).
Curse myself I haven’t thought before.
Hope this could help somebody else.

1 Like

is there a fix for centos 7 and sonarqube 8.1 ?