ERROR: Error during SonarScanner execution java.lang.IllegalStateException: Fail to request url:

We are seeing the following issue “ERROR: Error during SonarScanner execution java.lang.IllegalStateException: Fail to request URL:” while analyzing on large projects, for smaller we don’t see the issue. New to sonarqube, can someone help me to resolve the issue, please?

ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Fail to request URL: 
projectKey=
	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:150)
	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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	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.SocketException: Software caused connection abort: socket write error
	at java.net.SocketOutputStream.socketWrite0(Native Method)
	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
	at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
	at sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:431)
	at sun.security.ssl.OutputRecord.write(OutputRecord.java:417)
	at sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:879)
	at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:850)
	at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
	at okio.OutputStreamSink.write(JvmOkio.kt:53)
	at okio.AsyncTimeout$sink$1.write(AsyncTimeout.kt:103)
	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: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:203)
	... 25 more
ERROR: 
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeed?
ERROR: SonarQube scanner exited with non-zero code: 1
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in  19 second
Finished: FAILURE

Thanks in advance,
CH

Hi CH,

A little more of the log context would have been good, but when you say this happens on big projects and not on small ones I can guess this is at the end of analysis during the upload of the analysis report. You need to talk to your network folks. You’ve got something “helpful” on your network like a proxy blocking the transmission of the analysis report because of its size.

 
HTH,
Ann