I have several projects on sonarcloud and they all work fine, however, I’m setting up a new java project that is too big (450k lines) and I’m having timeout issues to send analytics to sonarcloud
I’m performing the local analysis using the docker image from sonarsource/sonar-scanner-cli, as I do with the other projects using this command
docker create \
-e SONAR_SCANNER_VERSION=4.7.0.2747 \
-e SONAR_SCANNER_OPTS=-server \
--name sonar-cli \
sonarsource/sonar-scanner-cli \
-Dsonar.organization=**** \
-Dsonar.projectKey=**** \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=***** \
-Dsonar.ws.timeout=99999999 \
&& docker cp . sonar-cli:/usr/src \
&& docker start sonar-cli -a
the config file sonar-project.properties
sonar.sources=.
sonar.exclusions=**/*.html
sonar.inclusions=src/main/java/**
sonar.test.inclusions=src/test/java/**
sonar.sourceEncoding=ISO-8859-1
sonar.java.source=1.8
sonar.java.binaries=target
And I get this error log on completion process
INFO: ------------- Run sensors on project
INFO: Sensor Analysis Warnings import [csharp]
INFO: Sensor Analysis Warnings import [csharp] (done) | time=1ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=369ms
INFO: Sensor Java CPD Block Indexer
INFO: Sensor Java CPD Block Indexer (done) | time=2806ms
INFO: CPD Executor 1824 files had no CPD blocks
INFO: CPD Executor Calculating CPD for 5210 files
INFO: CPD Executor CPD calculation finished (done) | time=480ms
INFO: Analysis report generated in 667ms, dir size=39 MB
INFO: Analysis report compressed in 10167ms, zip size=20 MB
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 26:49.731s
INFO: Final Memory: 1363M/2336M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Fail to request https://sonarcloud.io/api/ce/submit?organization=****&projectKey=****
at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:186)
at org.sonarqube.ws.client.HttpConnector.post(HttpConnector.java:141)
at org.sonarqube.ws.client.HttpConnector.call(HttpConnector.java:100)
at org.sonar.scanner.bootstrap.DefaultScannerWsClient.call(DefaultScannerWsClient.java:59)
at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:222)
at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:159)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:408)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
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:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
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:340)
at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.kt:235)
at okio.RealBufferedSink.write(RealBufferedSink.kt:145)
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:235)
at okio.RealBufferedSink.writeAll(RealBufferedSink.kt:184)
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:201)
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:184)
... 25 more
Caused by: java.net.SocketException: Operation timed out (Write failed)
at java.base/java.net.SocketOutputStream.socketWrite0(Native Method)
at java.base/java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:110)
at java.base/java.net.SocketOutputStream.write(SocketOutputStream.java:150)
at java.base/sun.security.ssl.SSLSocketOutputRecord.deliver(SSLSocketOutputRecord.java:340)
at java.base/sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1299)
at okio.OutputStreamSink.write(JvmOkio.kt:53)
at okio.AsyncTimeout$sink$1.write(AsyncTimeout.kt:103)
... 50 more
this error does not occur when I reduce the parsing scope
Thank you in advanced for any help!