Help...!....Error when executing blame for file

Hi all,

I am having an error while running sonar scanner. It’s been occurring since yesterday but before that there is no issue while running sonar scanner analysis. It occurred suddenly. I didn’t change any configurations. I have integrated SonarQube analysis with TeamCity. I am using SVN as code repository.

Here are my additional arguments when I am running sonar analysis.
-Dsonar.scm.provider=svn -Dsonar.svn.username=user -Dsonar.svn.password.secured=password

Log

INFO: EXECUTION FAILURE
13:28:04   INFO: ------------------------------------------------------------------------
13:28:04   INFO: Total time: 38:56.079s
13:28:05   INFO: Final Memory: 33M/120M
13:28:05   ERROR: Error during SonarScanner execution
13:28:05   INFO: ------------------------------------------------------------------------
13:28:05   java.lang.IllegalStateException: Error when executing blame for file path/file.java
13:28:05     at org.sonar.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:93)
13:28:05     at org.sonar.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:60)
13:28:05     at org.sonar.scanner.scm.ScmPublisher.publish(ScmPublisher.java:84)
13:28:05     at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:354)
13:28:05     at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
13:28:05     at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
13:28:05     at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:136)
13:28:05     at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
13:28:05     at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
13:28:05     at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
13:28:05     at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
13:28:05     at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
13:28:05     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:28:05     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
13:28:05     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
13:28:05     at java.base/java.lang.reflect.Method.invoke(Method.java:566)
13:28:05     at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
13:28:05     at com.sun.proxy.$Proxy0.execute(Unknown Source)
13:28:05     at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
13:28:05     at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
13:28:05     at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
13:28:05     at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
13:28:05     at org.sonarsource.scanner.cli.Main.main(Main.java:61)
13:28:05   Caused by: org.tmatesoft.svn.core.SVNException: svn: E175002: Connection reset
13:28:05   svn: E175002: REPORT request failed on 'path/file.java'
13:28:05     at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:112)
13:28:05     at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:96)
13:28:05     at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:765)
13:28:05     at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:352)
13:28:05     at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:340)
13:28:05     at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:914)
13:28:05     at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:364)
13:28:05     at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:354)
13:28:05     at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getFileRevisionsImpl(DAVRepository.java:936)
13:28:05     at org.tmatesoft.svn.core.io.SVNRepository.getFileRevisions(SVNRepository.java:763)
13:28:05     at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteAnnotate.run(SvnRemoteAnnotate.java:109)
13:28:05     at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteAnnotate.run(SvnRemoteAnnotate.java:30)
13:28:05     at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
13:28:05     at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)
13:28:05     at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
13:28:05     at org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:295)
13:28:05     at org.sonar.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:86)
13:28:05     ... 22 more
13:28:05   Caused by: java.net.SocketException: Connection reset
13:28:05     at java.base/java.net.SocketInputStream.read(SocketInputStream.java:186)
13:28:05     at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
13:28:05     at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:478)
13:28:05     at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:472)
13:28:05     at java.base/sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(SSLSocketInputRecord.java:70)
13:28:05     at java.base/sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1328)
13:28:05     at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:971)
13:28:05     at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
13:28:05     at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:271)
13:28:05     at org.tmatesoft.svn.core.internal.util.ChunkedInputStream.readCRLF(ChunkedInputStream.java:85)
13:28:05     at org.tmatesoft.svn.core.internal.util.ChunkedInputStream.nextChunk(ChunkedInputStream.java:95)
13:28:05     at org.tmatesoft.svn.core.internal.util.ChunkedInputStream.read(ChunkedInputStream.java:69)
13:28:05     at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
13:28:05     at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
13:28:05     at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
13:28:05     at java.base/java.io.InputStreamReader.read(InputStreamReader.java:181)
13:28:05     at org.tmatesoft.svn.core.internal.io.dav.http.XMLReader.read(XMLReader.java:39)
13:28:05     at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1699)
13:28:05     at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanLiteral(XMLEntityScanner.java:1137)
13:28:05     at java.xml/com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue(XMLScanner.java:980)
13:28:05     at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(XMLNSDocumentScannerImpl.java:447)
13:28:05     at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:250)
13:28:05     at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2710)
13:28:05     at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
13:28:05     at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
13:28:05     at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534)
13:28:05     at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
13:28:05     at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
13:28:05     at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
13:28:05     at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
13:28:05     at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
13:28:05     at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readData(HTTPConnection.java:898)
13:28:05     at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readData(HTTPConnection.java:863)
13:28:05     at org.tmatesoft.svn.core.internal.io.dav.http.HTTPRequest.dispatch(HTTPRequest.java:220)
13:28:05     at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:451)
13:28:05     ... 36 more
13:28:05   ERROR:
13:28:05   ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
13:28:05   Process exited with code 1
13:28:05   Process exited with code 1 (Step: SonarQube analysis (SonarQube Runner))
13:28:05   Step SonarQube analysis (SonarQube Runner) failed

I tried some solutions which is mentioned on websites but couldn’t solve it. I hope you guys help me to sort out this. Thanks.

Regards,
Khopi

Hey there.

It looks like your SVN server may be cutting off the connection – I would investigate whether anything has changed on the SVN side.

Hi @Colin,

Thank you for the reply. I didn’t do any changes so far. And there are some other pipelines with the same Sonar analysis configuration but code branch is different which are running fine. So, I don’t think that, SVN server has connectivity issue with Sonar scanner

Regards,
Khopi

Hi all,

This issue is fixed by adding this additional command line argument

-Dsonar.test.exclusions=path/target_file/

Here you can add the blame file path as target.

Regards,
Khopi

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.