Timeout exception during upload report

Hi,

I’m facing the timeout exception during “Upload report”
My SonarQube info.
SonarQube Version: 8.8.0.42792 (download from docker-hub)
Scanner Version: 4.6.0.2311
BuildWrapper Version: 6.18
Target Language: C++
License: Developer
And I didn’t use reverse proxy(eg, nginx)

Upload is always failed when I tried to scan whole project sources.
But when I scan piece of sources in project, “Upload report” is succeesed.

I tried to change value of timeout to sonar.ws.timeout=300.
It also failed. I think timeout value is not applied to scanner.

How can I fix it?

Scanner Logs:

13:54:53.055 INFO: Load New Code definition (done) | time=20ms
13:54:54.615 INFO: Analysis report generated in 939ms, dir size=4 MB
13:54:56.757 INFO: Analysis report compressed in 2140ms, zip size=1 MB
13:54:56.757 INFO: Analysis report generated in C:\byzantine\bzt.flash\.scannerwork\scanner-report
13:54:56.757 DEBUG: Upload report
13:55:26.993 INFO: ------------------------------------------------------------------------
13:55:26.993 INFO: EXECUTION FAILURE
13:55:26.993 INFO: ------------------------------------------------------------------------
13:55:26.993 INFO: Total time: 1:17.483s
13:55:27.072 INFO: Final Memory: 9M/240M
13:55:27.072 INFO: ------------------------------------------------------------------------
13:55:27.072 ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Fail to request url: http://10.152.100.66:9000/api/ce/submit?projectKey=bzt.flash&projectName=bzt.flash
        at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:205)
        at org.sonarqube.ws.client.HttpConnector.post(HttpConnector.java:155)
        at org.sonarqube.ws.client.HttpConnector.call(HttpConnector.java:114)
        at org.sonar.scanner.bootstrap.DefaultScannerWsClient.call(DefaultScannerWsClient.java:73)
        at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:204)
        at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:141)
        at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:365)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
        at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:149)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
        at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
        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(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
        at com.sun.proxy.$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:112)
        at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
        at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.net.SocketTimeoutException: timeout
        at okio.SocketAsyncTimeout.newTimeoutException(JvmOkio.kt:143)
        at okio.AsyncTimeout.access$newTimeoutException(AsyncTimeout.kt:162)
        at okio.AsyncTimeout$sink$1.write(AsyncTimeout.kt:335)
        at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.kt:255)
        at okio.RealBufferedSink.write(RealBufferedSink.kt:146)
        at okhttp3.internal.http1.Http1ExchangeCodec$KnownLengthSink.write(Http1ExchangeCodec.kt:271)
        at okio.ForwardingSink.write(ForwardingSink.kt:29)
        at okhttp3.internal.connection.Exchange$RequestBodySink.write(Exchange.kt:218)
        at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.kt:255)
        at okio.RealBufferedSink.writeAll(RealBufferedSink.kt:194)
        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:59)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
        at org.sonarqube.ws.client.OkHttpClientBuilder.addHeaders(OkHttpClientBuilder.java:208)
        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:203)
        ... 25 more
Caused by: java.net.SocketException: Socket closed
        at java.base/java.net.SocketOutputStream.socketWrite(Unknown Source)
        at java.base/java.net.SocketOutputStream.write(Unknown Source)
        at okio.OutputStreamSink.write(JvmOkio.kt:53)
        at okio.AsyncTimeout$sink$1.write(AsyncTimeout.kt:103)
        ... 50 more

Web Server Logs:
java.io.IOException: org.apache.tomcat.util.http.fileupload.impl.IOFileUploadException: Processing of multipart/form-data request failed. java.io.EOFException: Unexpected EOF read on the socket
        at org.apache.catalina.connector.Request.parseParts(Request.java:3008)
        at org.apache.catalina.connector.Request.parseParameters(Request.java:3294)
        at org.apache.catalina.connector.Request.getParameter(Request.java:1169)
        at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:381)
        at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:158)
        at org.sonar.server.ws.ServletRequest.readParam(ServletRequest.java:88)
        at org.sonar.api.impl.ws.ValidatingRequest.readParam(ValidatingRequest.java:156)
        at org.sonar.api.impl.ws.ValidatingRequest.param(ValidatingRequest.java:71)
        at org.sonar.api.server.ws.Request.mandatoryParam(Request.java:79)
        at org.sonar.server.ce.ws.SubmitAction.handle(SubmitAction.java:94)
        at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:110)
        at org.sonar.server.platform.web.WebServiceFilter.doFilter(WebServiceFilter.java:84)
        at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:139)
        at org.sonar.server.platform.web.SonarLintConnectionFilter.doFilter(SonarLintConnectionFilter.java:66)
        at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:139)
        at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:108)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:81)
        at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:68)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:76)
        at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:58)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.sonar.server.platform.web.RequestIdFilter.doFilter(RequestIdFilter.java:66)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:544)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
        at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:353)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:616)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:831)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1629)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.apache.tomcat.util.http.fileupload.impl.IOFileUploadException: Processing of multipart/form-data request failed. java.io.EOFException: Unexpected EOF read on the socket
        at org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:295)
        at org.apache.catalina.connector.Request.parseParts(Request.java:2960)
        ... 57 common frames omitted
Caused by: org.apache.catalina.connector.ClientAbortException: java.io.EOFException: Unexpected EOF read on the socket
        at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:348)
        at org.apache.catalina.connector.InputBuffer.checkByteBufferEof(InputBuffer.java:663)
        at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:370)
        at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:183)
        at org.apache.tomcat.util.http.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:975)
        at org.apache.tomcat.util.http.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:879)
        at java.base/java.io.InputStream.read(Unknown Source)
        at org.apache.tomcat.util.http.fileupload.util.Streams.copy(Streams.java:98)
        at org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:291)
        ... 58 common frames omitted
Caused by: java.io.EOFException: Unexpected EOF read on the socket
        at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:803)
        at org.apache.coyote.http11.Http11InputBuffer.access$300(Http11InputBuffer.java:42)
        at org.apache.coyote.http11.Http11InputBuffer$SocketInputBuffer.doRead(Http11InputBuffer.java:1171)
        at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:140)
        at org.apache.coyote.http11.Http11InputBuffer.doRead(Http11InputBuffer.java:263)
        at org.apache.coyote.Request.doRead(Request.java:590)
        at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:344)
        ... 66 common frames omitted
1 Like

Hi,

This is going to be about what’s on your network between your analysis machine and SonarQube. You likely have a proxy blocking analysis reports over a certain size(?).

 
HTH,
Ann

1 Like

I have the same problem, Sonarqube and dotnet scanner are on the same machine. When i compile a small project i am able to see the results on Sonarqube dashboard, localhost:9000 but when i am executing my project file it fails. I dont have a proxy on my system? Please help solve.

INFO: Analysis report generated in 14317ms, dir size=11 MB
INFO: Analysis report compressed in 50795ms, zip size=5 MB
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 6:04.985s
INFO: Final Memory: 8M/40M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution 
INFO: ------------------------------------------------------------------------
    ERROR: Error during SonarScanner execution
    java.lang.IllegalStateException: Fail to request url: http://localhost:9000/api/ce/submit?projectKey=ASPSAMPLE
            at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:205)
            at org.sonarqube.ws.client.HttpConnector.post(HttpConnector.java:155)

Were you able to solve this issue? I know it is because of file size as i could see it work when the report is lesser than 4 mb or so

@lloydm generally it’s best to give the entire stacktrace, but there’s nothing in SonarQube analysis itself that’s dependent upon or related to the size of the analysis report.

 
:woman_shrugging:
Ann

Hi Ann,

Thanks for answer :grinning:

This is our network problem.
Uploading report is very slow due to our network security check all traffic.

1 Like

It is strange, i did the exact same steps instead of using cmd line, i created a build pipeline and it works fine, there was no issue in uploading report to Sonarqube.
Strange that it did not work via command line