Sonarqube : ERROR: Failed to delete temp folder / ERROR: Caused by: timeout / ERROR: Caused by: Socket closed

ERROR: Failed to delete temp folder
java.nio.file.DirectoryNotEmptyException: C:\devwork\Dev\Codenet\.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.impl.utils.DefaultTempFolder$DeleteRecursivelyFileVisit
or.postVisitDirectory(DefaultTempFolder.java:121)
        at org.sonar.api.impl.utils.DefaultTempFolder$DeleteRecursivelyFileVisit
or.postVisitDirectory(DefaultTempFolder.java:110)
        at java.nio.file.Files.walkFileTree(Unknown Source)
        at java.nio.file.Files.walkFileTree(Unknown Source)
        at org.sonar.api.impl.utils.DefaultTempFolder.clean(DefaultTempFolder.ja
va:97)
        at org.sonar.api.impl.utils.DefaultTempFolder.stop(DefaultTempFolder.jav
a:106)
        at org.sonar.scanner.analysis.AnalysisTempFolderProvider.stop(AnalysisTe
mpFolderProvider.java:61)
        at org.picocontainer.DefaultPicoContainer.stopAdapters(DefaultPicoContai
ner.java:1048)
        at org.picocontainer.DefaultPicoContainer.stop(DefaultPicoContainer.java
:803)
        at org.sonar.core.platform.ComponentContainer.stopComponents(ComponentCo
ntainer.java:165)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer
.java:124)
        at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContai
ner.java:141)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentC
ontainer.java:136)
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 7:49.695s
        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.exec
ute(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(Iso
latedLauncherProxy.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.j
ava: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)

ERROR: Error during SonarQube Scanner execution
ERROR: Fail to request http://10.202.117.103:9000/api/ce/submit?projectKey=eprop
erttax_dev
ERROR: Caused by: timeout
ERROR: Caused by: Socket closed
ERROR:
INFO: Final Memory: 19M/535M
INFO: ------------------------------------------------------------------------
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:"C:\Program Files (x86)\
HPE\Unified Functional Testing\bin\java_shared\classes\jasmine.jar"
The SonarQube Scanner did not complete successfully
18:08:31.629  Creating a summary markdown file...
18:08:31.643  Post-processing failed. Exit code: 1

C:\devwork\Dev\Codenet>

Dont know where I went wrong, tried many times but always getting the same error. I didnt get support from my team as well as they are not able to find the solution.

A zip file (scanner-report1702312463320915358) has been created under “C:\devwork\Dev\Codenet.sonarqube\out.sonar.sonartmp”, everything seems fine but still something is wrong, could anyone please me in this.

Hi,

Welcome to the community!

It’s usually best to start with the first error. In this case, that’s the inability to delete the tmp folder. You’re on Windows, so at a guess you have either a virus scanner and/or some other “helpful” process that’s locking permissions to this file during the analysis, thus causing this error. We advise people not to run virus scanners on the analysis machines for just this reason.

My recommendations:

  • manually delete the file (directory?) in question
  • find and kill the process that locked it

 
:woman_shrugging:
Ann

Hey Ann,

I was dying to see your comment, and finally i got you here.

  • manually delete the file (directory?) in question

    • Yes, I tried and I am able to delete that folder manually.
  • find and kill the process that locked it

    • I was checking in the Task Manager for the process, but I observed there were 5 java process running at when it failed so 1 java was closed automatically and remining 4 were there. And it was java.exe

if you want anything else, i will try to get those things, i am fedup with the same error last 10 days.

Hi,

Is this the part where I gnaw my leg off to escape? :joy:

So I think you’re saying that the file was locked by a Java process - at a guess the previous analysis that didn’t release the file handle? (For the record, I think this is a Java thing, rather than specifically an analysis/SonarQube thing.)

 
Ann

Hey Ann,

I gave the execution again after modifying the sonar-scanner.properties file with below content, earlier i was not passing the #sonar.path.data and sonar.path.temp. Here I didnt the error for timeout and socket closed -

#Configure here general information about the environment, such as SonarQube server connection details for example
#No information about specific project should appear here

#----- Default SonarQube server
#sonar.host.url=http://10.202.117.103:9000
#sonar.path.data=C:\SonarQube\Bin\sonarqube-8.0\data
sonar.path.temp=C:\SonarQube\Bin\sonarqube-8.0\temp

#----- Default source code encoding
#sonar.sourceEncoding=UTF-8

I tried with below changes also, because temp folder location is the below one, but no luck. Same Failed to delete Temp Folder -

sonar.path.temp=C:\devwork\Dev\Codenet.sonarqube\out.sonar.sonartmp


Still I am getting the failed to delete temp folder, this is failure reason -

erlight/Controls/UpdateTaskManagers.xaml.cs
02:33:31.171 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/BusinessObjects/AddressBook/AddressBookOverviewSection.cs
02:33:31.174 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/BusinessObjects/Subjects/Appeal/AppealExpense.cs
02:33:31.180 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Controls/ctlAssetListCombo.xaml.cs
02:33:31.185 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/BusinessObjects/ModulePermissions.cs
02:33:31.187 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/BusinessObjects/DataSection/SectionFieldMetaData.cs
02:33:31.189 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Subjects/Responsibility/AssignToControl.xaml.cs
02:33:31.193 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Subjects/AssessmentNotice/RDE_AssessmentNoticeContainter.xaml.cs
02:33:31.195 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Controls/GridOptions.xaml.cs
02:33:31.198 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/BusinessObjects/AppealAudit/AppealAuditContactsSection.cs
02:33:31.199 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/BusinessObjects/Subjects/Parcel/ParcelValue.cs
02:33:31.203 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Controls/CreateNote.xaml.cs
02:33:31.205 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Controls/ConfirmWithCheck.xaml.cs
02:33:31.207 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/etaxCombo/Properties/AssemblyInfo.cs
02:33:31.208 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/MessagingProvider/IPopup.cs
02:33:31.210 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/BusinessObjects/Property/Property.cs
02:33:31.219 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Controls/UseCodeLookup.xaml.cs
02:33:31.221 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/BusinessObjects/Allocation/AllocationOccuapantSection.cs
02:33:31.224 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/BusinessObjects/Parcel/ParcelMiscellaneousSection.cs
02:33:31.226 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Subjects/DocumentProcessing/RDE_DocumentSearchControl.xaml.cs
02:33:31.228 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Sections/AssetManager/AssetDetailInventory.xaml.cs
02:33:31.231 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Subjects/Task/TaskAssignTool.xaml.cs
02:33:31.237 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Subjects/TaxBill/TaxRecoveryRecalcOptions.xaml.cs
02:33:31.239 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/BusinessObjects/AppealAudit/AppealAuditParcelSection.cs
02:33:31.242 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Sections/AssetManager/LocationsRemove.xaml.cs
02:33:31.245 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/BusinessObjects/TaxBill/TaxBillOverviewSection.cs
02:33:31.252 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Controls/WaitCursor.xaml.cs
02:33:31.255 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/BusinessObjects/View/View.cs
02:33:31.260 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/BusinessObjects/Subjects/TaxBill/TaxBillSummary.cs
02:33:31.279 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/BusinessObjects/Returns/Return.cs
02:33:31.282 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/BusinessObjects/BlueFilters/ViewBlueFilters.cs
02:33:31.285 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Controls/History.xaml.cs
02:33:31.288 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/BusinessObjects/Workflow/ValidationInfoFactory.cs
02:33:31.290 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Subjects/TaxManagerDetail/Returns.xaml.cs
02:33:31.291 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/BusinessObjects/Interfaces.cs
02:33:31.293 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/BusinessObjects/Workflow/DocumentSearchSection.cs
02:33:31.296 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Sections/AssetManager/AssetDetailLeasedProperty.xaml.cs
02:33:31.298 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/BusinessObjects/Locations/LocationComboLookups.cs
02:33:31.300 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/BusinessObjects/Asset.cs
02:33:31.328 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/BusinessObjects/COA/UpdateCOA.cs
02:33:31.330 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/SessionManager.cs
02:33:31.333 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/ePropertyTaxWrapper/BusinessObjects/Locations/LocationDetail.cs
02:33:31.335 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Controls/ParcelChange.xaml.cs
02:33:31.337 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/OPTSilverlight/Controls/OPTDatePicker.cs
02:33:31.343 DEBUG: Detection of duplications for C:/devwork/Dev/Codenet/MessagingProvider/Utilities.cs
02:33:31.348 INFO: CPD Executor CPD calculation finished (done) | time=3022ms02:33:31.640 DEBUG: 'OPTWebAPI/MessageHandlers/TokenHandler.cs' generated metadata with charset 'UTF-8'
02:33:31.725 DEBUG: 'OPTWebAPI/Global.asax.cs' generated metadata with charset 'UTF-8'
02:33:31.772 DEBUG: 'OPTWebAPI/Utility/FindContainers.cs' generated metadata with charset 'UTF-8'
02:33:31.806 DEBUG: 'OPTWebAPI/Controllers/UserWasUpdatedCallbackController.cs'generated metadata with charset 'UTF-8'
02:33:31.875 DEBUG: 'OPTWebAPI/Utility/UserWasUpdated.cs' generated metadata wih charset 'UTF-8'
02:33:31.938 DEBUG: 'OPTWebAPI/Controllers/GetContainerItemsByContainerIDsController.cs' generated metadata with charset 'UTF-8'
02:33:32.001 DEBUG: 'OPTWebAPI/Utility/ValidateClient.cs' generated metadata with charset 'UTF-8'
02:33:32.093 DEBUG: 'OPTWebAPI/Controllers/GetCountOfRemainingUserLicensesController.cs' generated metadata with charset 'UTF-8'
02:33:32.453 DEBUG: 'OPTWebAPI/TestData/TestData.cs' generated metadata with charset 'UTF-8'
02:33:32.573 DEBUG: 'OPTWebAPI/Utility/General.cs' generated metadata with charset 'UTF-8'
02:33:33.319 DEBUG: 'OPTWebAPI/App_Start/WebApiConfig.cs' generated metadata with charset 'UTF-8'
02:33:33.525 DEBUG: 'OPTWebAPI/Utility/FindRemainingUserLicenses.cs' generated metadata with charset 'UTF-8'
02:33:33.638 DEBUG: 'OPTWebAPI/Properties/AssemblyInfo.cs' generated metadata with charset 'UTF-8'
02:33:33.657 DEBUG: 'OPTWebAPI/Utility/PingStsConfiguration.cs' generated metadata with charset 'UTF-8'
02:33:48.220 INFO: Analysis report generated in 15193ms, dir size=25 MB02:34:01.317 INFO: Analysis report compressed in 13096ms, zip size=6 MB
02:34:01.317 INFO: Analysis report generated in C:\devwork\Dev\Codenet\sonarqube\out\.sonar\scanner-report
02:34:01.317 DEBUG: Upload report
02:34:31.953 ERROR: Failed to delete temp folder 
java.nio.file.DirectoryNotEmptyException: C:\devwork\Dev\Codenet\.sonarqube\out\.sonar\.sonartmp 
		at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:271) 
		at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
02:34:31.958 INFO: ------------------------------------------------------------------------
        at java.base/java.nio.file.Files.deleteIfExists(Files.java:1180)
        at org.sonar.api.impl.utils.DefaultTempFolder$DeleteRecursivelyFileVisitor.postVisitDirectory(DefaultTempFolder.java:121)
        at org.sonar.api.impl.utils.DefaultTempFolder$DeleteRecursivelyFileVisitor.postVisitDirectory(DefaultTempFolder.java:110)
02:34:31.958 INFO: EXECUTION FAILURE at java.base/java.nio.file.Files.walkFileTree(Files.java:2742) 
		at java.base/java.nio.file.Files.walkFileTree(Files.java:2796)
02:34:31.958 INFO: ------------------------------------------------------------------------
02:34:31.959 INFO: Total time: 5:53.250s at org.sonar.api.impl.utils.DefaultTempFolder.clean(DefaultTempFolder.java:97) 

		at org.sonar.api.impl.utils.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.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(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:185)
        at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)
        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)

02:34:32.070 ERROR: Error during SonarQube Scanner executionjava.lang.IllegalStateException: Fail to request http://10.202.117.103:9000/api/ce/submit?projectKey=eproperttax_dev
        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:192)
02:34:32.070 INFO: Final Memory: 13M/47M
02:34:32.070 INFO: ------------------------------------------------------------------------
        at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:141)
        at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:354)
        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(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:185)
        at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)
        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(SocketOutputStream.java:113)
        at java.base/java.net.SocketOutputStream.write(SocketOutputStream.java:150)
        at okio.Okio$1.write(Okio.java:79)
        at okio.AsyncTimeout$1.write(AsyncTimeout.java:180)
        ... 54 more
Process returned exit code 1
The SonarQube Scanner did not complete successfully
02:34:32.18  Post-processing failed. Exit code: 1

C:\devwork\Dev\Codenet>

Hello Ann,

could you please help me in this…

Hi,

I think the problem is caused by the 30s timeout when uploading the report to the server. However, I don’t know why there would be a 30s timeout.

Hello @dmeneses

Could you please tell me where I can increase this time…?

I tried to increase but seems i am giving in some wrong file and it caused timeout.

seeking help in this, now able to troubleshoot, every time getting same error that “unable to delete sonartmp folder”.

Hello,

Could you please suggest anything so that it can delete sonartmp folder.

Hi @znujs, perhaps you need to modify permissions for that .sonartmp folder or even the .sonarqube parent directory. Can you try chmod -R 0755 .sonartmp to grant rwx for user, r-x for group, and r-x for all users?

I saw this hint here: https://stackoverflow.com/questions/51491191/sonarqube-is-throwing-directorynotemptyexception-during-the-report-analysis

Joe