Getting an Erorr when jenkins upload analysis report to sonarqube

INFO: CPD Executor CPD calculation finished (done) | time=4722ms
INFO: Analysis report generated in 5369ms, dir size=72.5 MB
INFO: Analysis report compressed in 17701ms, zip size=20.9 MB
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 12:41.756s
INFO: Final Memory: 24M/87M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Failed to upload report: Fail to request url: http://ip-address:9000/api/ce/submit?projectKey=CRM-project
    at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:239)
    at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:163)
    at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:371)
    at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:201)
    at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:180)
    at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:139)
    at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:201)
    at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:180)
    at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:71)
    at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:65)
    at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
    at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
    at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
    at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
    at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
    at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
    at org.sonarsource.scanner.cli.Main.main(Main.java:62)
Caused by: java.lang.IllegalStateException: Fail to request url: http://ip-address:9000/api/ce/submit?projectKey=CRM-project
    at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:211)
    at org.sonarqube.ws.client.HttpConnector.executeRequest(HttpConnector.java:161)
    at org.sonarqube.ws.client.HttpConnector.call(HttpConnector.java:116)
    at org.sonar.scanner.bootstrap.DefaultScannerWsClient.call(DefaultScannerWsClient.java:88)
    at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:237)
    ... 21 more
Caused by: java.net.SocketException: An established connection was aborted by the software in your host machine
    at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:420)
    at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:440)
    at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:826)
    at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1035)
    at okio.OutputStreamSink.write(JvmOkio.kt:56)
    at okio.AsyncTimeout$sink$1.write(AsyncTimeout.kt:102)
    at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.kt:256)
    at okio.RealBufferedSink.write(RealBufferedSink.kt:147)
    at okhttp3.internal.http1.Http1ExchangeCodec$KnownLengthSink.write(Http1ExchangeCodec.kt:279)
    at okio.ForwardingSink.write(ForwardingSink.kt:29)
    at okhttp3.internal.connection.Exchange$RequestBodySink.write(Exchange.kt:223)
    at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.kt:256)
    at okio.RealBufferedSink.writeAll(RealBufferedSink.kt:195)
    at okhttp3.RequestBody$Companion$asRequestBody$1.writeTo(RequestBody.kt:167)
    at okhttp3.MultipartBody.writeOrCountBytes(MultipartBody.kt:157)
    at okhttp3.MultipartBody.writeTo(MultipartBody.kt:93)
    at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:62)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
    at org.sonarqube.ws.client.OkHttpClientBuilder.addHeaders(OkHttpClientBuilder.java:222)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
    at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
    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.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
    at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
    at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:209)
    ... 25 more
    Suppressed: java.net.SocketException: An established connection was aborted by the software in your host machine
        at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:325)
        at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350)
        at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803)
        at java.base/java.net.Socket$SocketInputStream.read(Socket.java:966)
        at okio.InputStreamSource.read(JvmOkio.kt:93)
        at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:128)
        at okio.RealBufferedSource.indexOf(RealBufferedSource.kt:430)
        at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:323)
        at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
        at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
        at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:110)
        at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:93)
        ... 39 more
    Suppressed: java.net.SocketException: An established connection was aborted by the software in your host machine
        ... 56 more
        Suppressed: java.net.SocketException: An established connection was aborted by the software in your host machine
            at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:325)
            at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350)
            at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803)
            at java.base/java.net.Socket$SocketInputStream.read(Socket.java:966)
            at okio.InputStreamSource.read(JvmOkio.kt:93)
            at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:128)
            at okio.RealBufferedSource.indexOf(RealBufferedSource.kt:430)
            at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:323)
            at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
            at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
            at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:110)
            at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:93)
            ... 39 more
ERROR: 
The SonarScanner did not complete successfully
00:12:50.669  Post-processing failed. Exit code: 1
[Pipeline] }
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeed?
[Pipeline] // withSonarQubeEnv

Hey there.

As requested in the template post, what verison of SonarQube are you using?

Does this happen all the time, with all projects?

hey @Colin
thanks for your response .
this issue is resolved now, i think that is problem because of my system i restart it and run sonarqube again , now it’s working fine.
btw i am using sonarqube-10.3.0.82913 community edition

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