Error - SonarQube Scanner execution: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succedeed?

SonarQube 6.7.6
Jenkins 2.121.3
SonarQube Scanner 2.8
sonar-maven-plugin 3.4.0.905
#bug:fault

We have a daily scheduled Jenkins Freestyle job to build a maven 3 application consisting of 20 modules. It can also be run manually.
The job takes ~ 1.75 - 2 hrs to build, then the scan occurs. The logs are 1.3M lines, so not posting it here.
There is essentially no difference bewteen a successful scan and the following failure below, which occurs regular, especially when triggered manually.
Scanner step failure can occur in as little as 3 minutes.
There are no relevant entries in the sonar server logs. There are ~ 50 successful scans per day. This has been failing consistntly for a week.

Other responses to “Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succedeed?” have not been applicable.
Where do we go from here ?

Thanks.

$ /build/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQubeRunner/bin/sonar-scanner
	-Dsonar.host.url=http://sonarqube:9000
	-Dproject.settings=/build/workspace/<job>/<path>/<module>/sonar-project.properties
	-Dsonar.projectBaseDir=/build/workspace/<job>
INFO: Scanner configuration file: /build/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQubeRunner/conf/sonar-scanner.properties
INFO: Project root configuration file: /build/workspace/<job>/<path>/<module>/sonar-project.properties
INFO: SonarQube Scanner 2.8
INFO: Java 1.8.0_221 Oracle Corporation (64-bit)
INFO: Linux 2.6.32-754.17.1.el6.x86_64 amd64
INFO: SONAR_SCANNER_OPTS=-noverify
INFO: User cache: /builds/sonar/cache
INFO: Publish mode
INFO: Load global settings
INFO: Load global settings 
INFO: Server id: A71B7D59-17ff5f025aa1c5d
INFO: User cache: /builds/sonar/cache
INFO: Load plugins index
INFO: Load plugins index 
INFO: SonarQube server 6.7.6
INFO: Default locale: "en_CA", source code encoding: "ISO-8859-3"
INFO: Process project properties
INFO: Load project repositories
INFO: Load project repositories 
INFO: Load quality profiles
INFO: Load quality profiles 
INFO: Load active rules
INFO: Load active rules 
INFO: Load metrics repository
INFO: Load metrics repository 
INFO: Project key: <project.key>

INFO: SCM Publisher is disabled
INFO: 437 files had no CPD blocks
INFO: Calculating CPD for 1698 files
INFO: CPD calculation finished
INFO: Analysis report generated in 3455ms, dir size=47 MB
INFO: Analysis reports compressed in 5134ms, zip size=15 MB
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 5:23.616s
INFO: Final Memory: 98M/3047M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Fail to request http://sonarqube:9000/api/ce/submit?projectKey=<project.key>&projectName=<project.name>
	at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:190)
	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.ScannerWsClient.call(ScannerWsClient.java:73)
	at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:189)
	at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:135)
	at org.sonar.scanner.phases.PublishPhaseExecutor.publishReportJob(PublishPhaseExecutor.java:73)
	at org.sonar.scanner.phases.PublishPhaseExecutor.executeOnRoot(PublishPhaseExecutor.java:55)
	at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:93)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:177)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:291)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:286)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:264)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
	at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
	at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
	at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
	at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:111)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
	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:233)
	at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
	at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:74)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.net.SocketTimeoutException: timeout
	at okio.Okio$4.newTimeoutException(Okio.java:227)
	at okio.AsyncTimeout.exit(AsyncTimeout.java:284)
	at okio.AsyncTimeout$1.write(AsyncTimeout.java:183)
	at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:171)
	at okio.RealBufferedSink.write(RealBufferedSink.java:41)
	at okhttp3.internal.http1.Http1Codec$FixedLengthSink.write(Http1Codec.java:286)
	at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:171)
	at okio.RealBufferedSink.writeAll(RealBufferedSink.java:99)
	at okhttp3.RequestBody$3.writeTo(RequestBody.java:118)
	at okhttp3.MultipartBody.writeOrCountBytes(MultipartBody.java:171)
	at okhttp3.MultipartBody.writeTo(MultipartBody.java:113)
	at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:62)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
	at org.sonarqube.ws.client.OkHttpClientBuilder.addHeaders(OkHttpClientBuilder.java:207)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
	at okhttp3.RealCall.execute(RealCall.java:69)
	at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:188)
	... 35 more
Caused by: java.net.SocketException: Socket closed
	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:118)
	at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
	at okio.Okio$1.write(Okio.java:78)
	at okio.AsyncTimeout$1.write(AsyncTimeout.java:179)
	... 62 more
ERROR: 
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succedeed?
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succedeed?
ERROR: SonarQube scanner exited with non-zero code: 1
`

Hi,

The warnings about being unable to locate ‘report-task.txt’ aren’t the main problem. The main problem is this:

You’re getting a timeout when the analysis report is being uploaded to the server. Typically this means you’re going through some sort of proxy or firewall that’s messing with the call. Can you check with your network folks?

 
Ann

Hi Iaw/Anyone who knows this.

How you are tracking successful scans per day. Is there any way to trcak the number of scans. be it successful or failed.

Hi @samyak,

In addition to resurrecting this old thread, you’ve also created a new one with the same question. I’ll respond there and consider this one closed.

 
Ann