ERROR: Error during SonarScanner execution java.lang.IllegalStateException: Fail to request http://IP_Address:9000/sonarqube/api/ce/submit?projectKey=iOS-myid-iphone-client&projectName=iOS-myid-iphone-client

While running the scan on iOS code (Obective c and Swift), got the below error…
Platform: Mac OS - 10.14.6
Xcode: Xcode - 11.1 version

WARN: Too many duplication groups on file Classes/libPhoneNumber/NBMetadataCoreTest.m. Keep only the first 100 groups.

INFO: CPD Executor CPD calculation finished (done) | time=5798ms

INFO: Analysis report generated in 2957ms, dir size=118 MB

INFO: Analysis report compressed in 51121ms, zip size=27 MB

INFO: ------------------------------------------------------------------------

INFO: EXECUTION FAILURE

INFO: ------------------------------------------------------------------------

INFO: Total time: 42:20.385s

INFO: Final Memory: 32M/114M

INFO: ------------------------------------------------------------------------

ERROR: Error during SonarScanner execution

java.lang.IllegalStateException: Fail to request http://IP_Address:9000/sonarqube/api/ce/submit?projectKey=iOS-myid-iphone-client&projectName=iOS-myid-iphone-client

at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:200)

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:205)

at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:142)

at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:359)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

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.Okio$4.newTimeoutException(Okio.java:232)

at okio.AsyncTimeout.exit(AsyncTimeout.java:286)

at okio.AsyncTimeout$1.write(AsyncTimeout.java:184)

at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:179)

at okio.RealBufferedSink.write(RealBufferedSink.java:42)

at okhttp3.internal.http1.Http1ExchangeCodec$KnownLengthSink.write(Http1ExchangeCodec.java:324)

at okio.ForwardingSink.write(ForwardingSink.java:35)

at okhttp3.internal.connection.Exchange$RequestBodySink.write(Exchange.java:231)

at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:179)

at okio.RealBufferedSink.writeAll(RealBufferedSink.java:107)

at okhttp3.RequestBody$3.writeTo(RequestBody.java:171)

at okhttp3.MultipartBody.writeOrCountBytes(MultipartBody.java:173)

at okhttp3.MultipartBody.writeTo(MultipartBody.java:114)

at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:69)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)

at org.sonarqube.ws.client.OkHttpClientBuilder.addHeaders(OkHttpClientBuilder.java:208)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)

at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:43)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)

at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)

at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)

at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)

at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:221)

at okhttp3.RealCall.execute(RealCall.java:81)

at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:198)

… 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.Okio$1.write(Okio.java:79)

at okio.AsyncTimeout$1.write(AsyncTimeout.java:180)

… 54 more

Hi,

Welcome to the community!

Generally it’s better to provide a little verbal ‘padding’ in your posts, rather than just dumping an error. I.e. give some context.

However, this time the error happens to be pretty clear:

Analysis completed successfully and failure came when the analysis report was submitted to the server. Pretty much universally when we see this it’s because there’s something on the network (proxy, firewall, …) interfering with the connection. In short: you need to talk to your network folks.

 
Ann

Thanks for the reply, updated the context as you suggested.

WARN: Too many duplication groups on file Classes/libPhoneNumber/NBMetadataCoreTest.m. Keep only the first 100 groups.

INFO: CPD Executor CPD calculation finished (done) | time=5798ms

INFO: Analysis report generated in 2957ms, dir size=118 MB

INFO: Analysis report compressed in 51121ms, zip size=27 MB

INFO: ------------------------------------------------------------------------

INFO: EXECUTION FAILURE

INFO: ------------------------------------------------------------------------

INFO: Total time: 42:20.385s

INFO: Final Memory: 32M/114M

INFO: ------------------------------------------------------------------------

ERROR: Error during SonarScanner execution

java.lang.IllegalStateException: Fail to request http://10.176.63.120:9000/sonarqube/api/ce/submit?projectKey=iOS-myid-iphone-client&projectName=iOS-myid-iphone-client

at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:200)

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:205)

at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:142)

at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:359)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

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.Okio$4.newTimeoutException(Okio.java:232)

at okio.AsyncTimeout.exit(AsyncTimeout.java:286)

at okio.AsyncTimeout$1.write(AsyncTimeout.java:184)

at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:179)

at okio.RealBufferedSink.write(RealBufferedSink.java:42)

at okhttp3.internal.http1.Http1ExchangeCodec$KnownLengthSink.write(Http1ExchangeCodec.java:324)

at okio.ForwardingSink.write(ForwardingSink.java:35)

at okhttp3.internal.connection.Exchange$RequestBodySink.write(Exchange.java:231)

at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:179)

at okio.RealBufferedSink.writeAll(RealBufferedSink.java:107)

at okhttp3.RequestBody$3.writeTo(RequestBody.java:171)

at okhttp3.MultipartBody.writeOrCountBytes(MultipartBody.java:173)

at okhttp3.MultipartBody.writeTo(MultipartBody.java:114)

at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:69)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)

at org.sonarqube.ws.client.OkHttpClientBuilder.addHeaders(OkHttpClientBuilder.java:208)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)

at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:43)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)

at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)

at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)

at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)

at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)

at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:221)

at okhttp3.RealCall.execute(RealCall.java:81)

at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:198)

… 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.Okio$1.write(Okio.java:79)

at okio.AsyncTimeout$1.write(AsyncTimeout.java:180)

… 54 more

For the record, it looks like you posted the same thing twice at about the same time with slightly different headlines. I’ve consolidated them here.