ERROR: Caused by: timeout on new install

scanner
msbuild

(Dustin Ewers) #1

I’m new to SonarQube. I’d like to evaluate this product, but it won’t even run a basic scan on a moderate sized .NET project. Every time I try to run a scan, it fails on the final posting of the results to the server. I’ve tried reinstalling, different editions, removing projects from the analysis, and increasing the timeout value. None of these things did the trick.

Steps I took :

  1. Downloaded community edition from your site

  2. Unzipped onto a hard drive

  3. Ran the server \bin\windows-x86-64\StartSonar.bat

  4. Went to localhost:9000, set a new key / project

  5. Ran the project using the documented commands plus extra timeout time.

     SonarScanner.MSBuild.exe begin /k:"BFY" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="47a29331929227c6b4c0bee333ebf11bcb4fb5a5" /d:sonar.ws.timeout="6000"
    
     MsBuild.exe /t:Rebuild
    
     SonarScanner.MSBuild.exe end /d:sonar.login="47a29331929227c6b4c0bee333ebf11bcb4fb5a5"
    

This results in the following:

What else can I try to get this working?


(Brian Cipollone) #2

Hi Dustin,

Does this issue happen consistently on each scan? Do the results of the scan get posted to SonarQube? The exception points to the issue of another process not releasing lock on temp directory.

If you delete the folder manually – does the issue come back on the next scan? Is there any sort of virus scan or other process that could be interfering with the deletion?

Cheers.

Brian


(Dustin Ewers) #3

Happens every time and the results do not get posted. Honestly, if I had results, I wouldn’t care. The temp folder gets deleted, but it takes a few extra seconds.


(Brian Cipollone) #4

Dustin,

Is it possible to upload a copy of the entire scan log (with the -X debug option enabled) rather than just a screenshot?

Thanks in advance.

Brian


(Dustin Ewers) #5

I re-reran it with the debug and verbose features enabled and here’s what I got. This was just copy/pasted from the command prompt, but if you know where I can find detailed logs, I can find those too.


12:15:55.354 DEBUG: Detection of duplications for C:/Code/BFY/Src/BFY.Admin.Web/src/app/investments/plan-fund-details/plan-fund-details.component.ts
12:15:55.355 DEBUG: Detection of duplications for C:/Code/BFY/Src/BFY.Admin.Web/src/app/common/components/table/table.service.ts
12:15:55.356 DEBUG: Detection of duplications for C:/Code/BFY/Src/BFY.Admin.Web/src/app/common/components/accordion/accordion-content/accordion-content.component.ts
12:15:55.357 DEBUG: Detection of duplications for C:/Code/BFY/Src/BFY.Admin.Web/src/app/validators/equal-to/equal-to.validator.spec.ts
12:15:55.358 DEBUG: Detection of duplications for C:/Code/BFY/Src/BFY.Admin.Web/src/app/plan-details/transactions/transactions.component.spec.ts
12:15:55.359 DEBUG: Detection of duplications for C:/Code/BFY/Src/BFY.Admin.Web/src/app/common/alert/message/message.component.ts
12:15:55.360 DEBUG: Detection of duplications for C:/Code/BFY/Src/BFY.Admin.Web/src/app/app-routing.module.ts
12:15:55.363 DEBUG: Detection of duplications for C:/Code/BFY/Src/BFY.Admin.Web/src/app/layout/header/plan-settings/advisor/rollover-start-retirement/rollover-start-retirement.component.ts
12:15:55.363 DEBUG: Detection of duplications for C:/Code/BFY/Src/BFY.Admin.Web/src/app/investments/plan-fund-details/plan-fund-details.component.spec.ts
12:15:55.365 INFO: CPD calculation finished
12:16:01.650 INFO: Analysis report generated in 4480ms, dir size=5 MB
12:16:07.704 INFO: Analysis reports compressed in 6053ms, zip size=2 MB
12:16:07.704 INFO: Analysis report generated in c:\Code\BFY\Src.sonarqube\out.sonar\scanner-report
12:16:07.704 DEBUG: Upload report
12:18:12.895 ERROR: Failed to delete temp folder
java.nio.file.DirectoryNotEmptyException: c:\Code\BFY\Src.sonarqube\out.sonar.sonartmp
at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)
at java.nio.file.Files.deleteIfExists(Unknown Source)
at org.sonar.api.utils.internal.DefaultTempFolder$DeleteRecursivelyFileVisitor.postVisitDirectory(DefaultTempFolder.java:121)
at org.sonar.api.utils.internal.DefaultTempFolder$DeleteRecursivelyFileVisitor.postVisitDirectory(DefaultTempFolder.java:110)
at java.nio.file.Files.walkFileTree(Unknown Source)
at java.nio.file.Files.walkFileTree(Unknown Source)
at org.sonar.api.utils.internal.DefaultTempFolder.clean(DefaultTempFolder.java:97)
at org.sonar.api.utils.internal.DefaultTempFolder.stop(DefaultTempFolder.java:106)
at org.sonar.scanner.analysis.AnalysisTempFolderProvider.stop(AnalysisTempFolderProvider.java:61)
at org.picocontainer.DefaultPicoContainer.stopAdapters(DefaultPicoContainer.java:1048)
at org.picocontainer.DefaultPicoContainer.stop(DefaultPicoContainer.java:803)
at org.sonar.core.platform.ComponentContainer.stopComponents(ComponentContainer.java:165)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:124)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:82)
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.executeTask(GlobalContainer.java:131)
at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at 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:171)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:128)
at org.sonarsource.scanner.cli.Main.execute(Main.java:111)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)

12:18:13.002 INFO: ------------------------------------------------------------------------
12:18:13.002 INFO: EXECUTION FAILURE
12:18:13.002 INFO: ------------------------------------------------------------------------
12:18:13.003 INFO: Total time: 7:46.231s
12:18:13.116 ERROR: Error during SonarQube Scanner execution
12:18:13.116 INFO: Final Memory: 19M/438M
12:18:13.116 INFO: ------------------------------------------------------------------------
java.lang.IllegalStateException: Fail to request http://localhost:9000/api/ce/submit?projectKey=BFY
at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:201)
at org.sonarqube.ws.client.HttpConnector.post(HttpConnector.java:156)
at org.sonarqube.ws.client.HttpConnector.call(HttpConnector.java:115)
at org.sonar.scanner.bootstrap.ScannerWsClient.call(ScannerWsClient.java:75)
at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:194)
at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:140)
at org.sonar.scanner.phases.PublishPhaseExecutor.executeOnRoot(PublishPhaseExecutor.java:49)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:79)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:164)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:319)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:314)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:288)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:82)
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.executeTask(GlobalContainer.java:131)
at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at 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:171)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:128)
at org.sonarsource.scanner.cli.Main.execute(Main.java:111)
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:227)
at okio.AsyncTimeout.exit(AsyncTimeout.java:274)
at okio.AsyncTimeout$1.write(AsyncTimeout.java:185)
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:199)
… 34 more
Process returned exit code 1
The SonarQube Scanner did not complete successfully
12:18:13.297 Creating a summary markdown file…
12:18:13.3 Post-processing failed. Exit code: 1