Random timeouts waiting on analysis results

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

Version 10.4.1.88267
sonarsource/sonar-scanner-cli:latest (as of today this is 10.0.3.1430_5.0.1)

  • how is SonarQube deployed: zip, Docker, Helm

Helm

  • what are you trying to achieve

Perform a scan without random errors

  • what have you tried so far to achieve this
  1. Change nginx config to increase proxy read / send / connect timeout
  2. Change nginx config for max body size to 100MB, my largest report is around 26MB
  3. Remove SonarQube CPU limits on the cluster and give it 8GB of RAM, but looking at my performance metrics it is not very taxed, during peaks CPU usage is around 50%, during most analysis it’s around 10%
  4. Clear analysis cache for a project
  5. Spam GET requests to the endpoint which sonar-scanner claims is problematic but it works every time

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

The https://sonarqube.xxx/api/ce/task?id=24cebae4-a9f1-4543-9f7b-60b111b2f3cb endpoint is fine, if I retry this job it will work, the error is completely random but quite common occurs about 30% of the time so very very annoying and there is no reason for it.

sonar-scanner logs:

13:34:34.724 INFO: Analysis report generated in 287ms, dir size=1.1 MB
13:34:36.106 INFO: Analysis report compressed in 1382ms, zip size=1.9 MB
13:34:36.106 INFO: Analysis report generated in /builds/xxx/yyy/zzz/.scannerwork/scanner-report
13:34:36.106 DEBUG: Upload report
13:34:36.949 DEBUG: POST 200 https://sonarqube.xxx/api/ce/submit?projectKey=xxx&projectName=yyy&characteristic=pullRequest%3D374 | time=842ms
13:34:36.951 INFO: Analysis report uploaded in 845ms
13:34:36.952 DEBUG: Report metadata written to /builds/xxx/yyy/zzz/.scannerwork/report-task.txt
13:34:36.952 INFO: ------------- Check Quality Gate status
13:34:36.952 INFO: Waiting for the analysis report to be processed (max 300s)
13:34:36.962 DEBUG: GET 200 https://sonarqube.xxx/api/ce/task?id=24cebae4-a9f1-4543-9f7b-60b111b2f3cb | time=10ms
13:34:41.980 DEBUG: GET 200 https://sonarqube.xxx/api/ce/task?id=24cebae4-a9f1-4543-9f7b-60b111b2f3cb | time=14ms
13:35:46.990 INFO: ------------------------------------------------------------------------
13:35:46.990 INFO: EXECUTION FAILURE
13:35:46.990 INFO: ------------------------------------------------------------------------
13:35:46.990 INFO: Total time: 1:34.956s
13:35:47.033 INFO: Final Memory: 102M/400M
13:35:47.033 INFO: ------------------------------------------------------------------------
13:35:47.033 ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Fail to request url: https://sonarqube.xxx/api/ce/task?id=24cebae4-a9f1-4543-9f7b-60b111b2f3cb
	at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:213)
	at org.sonarqube.ws.client.HttpConnector.executeRequest(HttpConnector.java:128)
	at org.sonarqube.ws.client.HttpConnector.call(HttpConnector.java:114)
	at org.sonar.scanner.bootstrap.DefaultScannerWsClient.call(DefaultScannerWsClient.java:88)
	at org.sonar.scanner.qualitygate.QualityGateCheck.waitForCeTaskToFinish(QualityGateCheck.java:113)
	at org.sonar.scanner.qualitygate.QualityGateCheck.await(QualityGateCheck.java:89)
	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:178)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:223)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:202)
	at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:223)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:202)
	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:138)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:223)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:202)
	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.net.SocketTimeoutException: timeout
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.kt:675)
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.kt:684)
	at okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.kt:143)
	at okhttp3.internal.http2.Http2ExchangeCodec.readResponseHeaders(Http2ExchangeCodec.kt:97)
	at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:110)
	at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:93)
	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:211)
	... 28 more

engine log:

2024.07.09 13:34:38 INFO  ce[][o.s.c.t.CeWorkerImpl] Execute task | project=xxx | type=REPORT | pullRequest=374 | id=24cebae4-a9f1-4543-9f7b-60b111b2f3cb | submitter=gitlab-reporter
2024.07.09 13:34:39 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Extract report | status=SUCCESS | time=434ms
2024.07.09 13:34:39 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Persist scanner context | status=SUCCESS | time=5ms
2024.07.09 13:34:39 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Propagate analysis warnings from scanner report | status=SUCCESS | time=3ms
2024.07.09 13:34:39 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Generate analysis UUID | status=SUCCESS | time=0ms
2024.07.09 13:34:39 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Load analysis metadata | status=SUCCESS | time=4ms
2024.07.09 13:34:39 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Initialize | status=SUCCESS | time=4ms
2024.07.09 13:34:39 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Build tree of components | components=56 | status=SUCCESS | time=107ms
2024.07.09 13:34:39 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Validate project | status=SUCCESS | time=5ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Load quality profiles | status=SUCCESS | time=1951ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Checks executed before computation of measures | status=SUCCESS | time=215ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Generate SQ Upgrade analysis events | status=SUCCESS | time=3ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Load file hashes and statuses | status=SUCCESS | time=2ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Load Quality gate | status=SUCCESS | time=5ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Load new code period | status=SUCCESS | time=0ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Detect file moves | status=SUCCESS | time=0ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Detect file moves in Pull Request scope | reportFiles=27 | dbFiles=3852 | movedFiles=0 | addedFiles=27 | status=SUCCESS | time=87ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Load duplications | duplications=683 | status=SUCCESS | time=93ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Compute cross project duplications | status=SUCCESS | time=0ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Compute size measures | status=SUCCESS | time=1ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Compute new coverage | status=SUCCESS | time=1ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Compute coverage measures | status=SUCCESS | time=142ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Compute comment measures | status=SUCCESS | time=0ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Compute duplication measures | status=SUCCESS | time=59ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Compute size measures on new code | status=SUCCESS | time=0ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Compute language distribution | status=SUCCESS | time=0ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Compute test measures | status=SUCCESS | time=0ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Compute complexity measures | status=SUCCESS | time=0ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Load measure computers | status=SUCCESS | time=0ms
2024.07.09 13:34:41 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Compute Quality Profile status | status=SUCCESS | time=10ms
2024.07.09 13:34:42 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Execute component visitors | status=SUCCESS | time=812ms
2024.07.09 13:34:42 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Checks executed after computation of measures | status=SUCCESS | time=11ms
2024.07.09 13:34:42 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Compute pull request fixed issues measure | status=SUCCESS | time=0ms
2024.07.09 13:34:42 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Compute Quality Gate measures | status=SUCCESS | time=0ms
2024.07.09 13:34:42 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Compute Quality profile measures | status=SUCCESS | time=0ms
2024.07.09 13:34:42 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Generate Quality profile events | status=SUCCESS | time=9ms
2024.07.09 13:34:42 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Generate Quality gate events | status=SUCCESS | time=0ms
2024.07.09 13:34:42 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Generate Issue Detection events | status=SUCCESS | time=8ms
2024.07.09 13:34:42 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Check upgrade possibility for not analyzed code files. | status=SUCCESS | time=0ms
2024.07.09 13:34:42 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Persist scanner analysis cache | status=SUCCESS | time=0ms
2024.07.09 13:34:42 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Persist components | status=SUCCESS | time=18ms
2024.07.09 13:34:42 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Persist analysis | status=SUCCESS | time=2ms
2024.07.09 13:34:42 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Persist analysis properties | status=SUCCESS | time=5ms
2024.07.09 13:34:42 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Persist measures | inserts=56 | status=SUCCESS | time=13ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Persist live measures | insertsOrUpdates=3343 | status=SUCCESS | time=462ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Persist duplication data | insertsOrUpdates=0 | status=SUCCESS | time=0ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Persist new ad hoc Rules | status=SUCCESS | time=0ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Persist issues | cacheSize=4.7 kB | inserts=6 | updates=0 | merged=0 | status=SUCCESS | time=6ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Delete issue changes | changes=0 | status=SUCCESS | time=0ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Persist project links | status=SUCCESS | time=0ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Persist events | status=SUCCESS | time=2ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Persist sources | status=SUCCESS | time=67ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Persist cross project duplications | status=SUCCESS | time=0ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Enable analysis | status=SUCCESS | time=3ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Persist Fixed issues in Pull Request | status=SUCCESS | time=3ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Update last usage date of quality profiles | status=SUCCESS | time=4ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Purge db | status=SUCCESS | time=27ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Load changed issues for indexing | status=SUCCESS | time=0ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Index analysis | status=SUCCESS | time=25ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Update need issue sync for branch | status=SUCCESS | time=1ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Compute total Project ncloc | status=SUCCESS | time=8ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Publishing taint vulnerabilities and security hotspots events | status=SUCCESS | time=1ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Send issue notifications | status=SUCCESS | time=0ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Publish task results | status=SUCCESS | time=0ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.s.ComputationStepExecutor] Trigger refresh of Portfolios and Applications | status=SUCCESS | time=0ms
2024.07.09 13:34:43 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Webhooks | globalWebhooks=0 | projectWebhooks=0 | status=SUCCESS | time=2ms
2024.07.09 13:34:45 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Pull Request decoration | status=SUCCESS | time=2094ms
2024.07.09 13:34:45 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Report branch Quality Gate status to devops platforms | status=SUCCESS | time=0ms
2024.07.09 13:34:45 INFO  ce[24cebae4-a9f1-4543-9f7b-60b111b2f3cb][o.s.c.t.CeWorkerImpl] Executed task | project=xxx | type=REPORT | pullRequest=374 | id=24cebae4-a9f1-4543-9f7b-60b111b2f3cb | submitter=gitlab-reporter | status=SUCCESS | time=6988ms

access.log

10.244.1.46 - - [09/Jul/2024:13:34:36 +0000] "GET /api/ce/task?id=24cebae4-a9f1-4543-9f7b-60b111b2f3cb HTTP/1.1" 200 187 "-" "ScannerCLI/5.0.1.3006" "5824072c-b5eb-4797-861d-bf3f8bd08b53" 7
10.244.1.46 - - [09/Jul/2024:13:34:41 +0000] "GET /api/ce/task?id=24cebae4-a9f1-4543-9f7b-60b111b2f3cb HTTP/1.1" 200 216 "-" "ScannerCLI/5.0.1.3006" "c0391aa1-78a9-4006-9348-52ddd21e9cfc" 12

Is is possible to force sonar-scanner to try again after a timeout? This solution seems the most obvious but I can’t find any argument or environment variable for it, failing the whole job because of a simple timeout is wasteful on resources and time of the developer.

Hi,

It seems the timed-out request doesn’t actually appear in your access.log. There are 2 successful calls, that appear in both the analysis log and the access log. And then the third call from the scanner doesn’t show up in the access log, right?

If that’s the case, then something in your infrastructure seems to be eating the request before it can reach SonarQube. Since this happens ~ a third of the time, I would talk to your network folks.

Not the scanner, no. But since this is happening in a post-analysis step, it might be possible to script a retry on your side.

 
HTH,
Ann