Sonar Scanner 抛出 EOFException - 无法读取 HTTP 状态行
Sonar Scanner throws EOFException - can not read HTTP status line
当执行本地或基于 jenkins-server 的声纳扫描时,一段时间后(尝试分析某个文件大约 20 分钟)它会抛出以下错误:
00:45:31.439 INFO: 21/57 files analyzed
00:45:31.688 INFO: ------------------------------------------------------------------------
00:45:31.688 INFO: EXECUTION FAILURE
00:45:31.689 INFO: ------------------------------------------------------------------------
00:45:31.690 INFO: Total time: 21:53.981s
00:45:31.973 INFO: Final Memory: 36M/127M
00:45:31.974 INFO: ------------------------------------------------------------------------
00:45:31.975 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Error when executing blame for file local_path_to_file.java
at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:85)
at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:58)
at org.sonar.scanner.scm.ScmPublisher.publish(ScmPublisher.java:85)
at org.sonar.scanner.phases.PublishPhaseExecutor.afterSensors(PublishPhaseExecutor.java:60)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:90)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:180)
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:288)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:283)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:261)
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.execute(Batch.java:71)
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(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/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:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
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: org.tmatesoft.svn.core.SVNException: svn: E175002: can not read HTTP status line
svn: E175002: REPORT request failed on 'svn_path_to_file.java'
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:112)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:96)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:765)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:352)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:340)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:888)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:354)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:344)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getFileRevisionsImpl(DAVRepository.java:920)
at org.tmatesoft.svn.core.io.SVNRepository.getFileRevisions(SVNRepository.java:756)
at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteAnnotate.run(SvnRemoteAnnotate.java:109)
at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteAnnotate.run(SvnRemoteAnnotate.java:30)
at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
at org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:295)
at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:83)
... 31 more
Caused by: java.io.IOException: can not read HTTP status line
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:460)
... 45 more
Caused by: java.io.EOFException: can not read HTTP status line
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPParser.parseStatus(HTTPParser.java:45)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readHeader(HTTPConnection.java:263)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPRequest.dispatch(HTTPRequest.java:179)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:451)
SVN 用作存储库技术。我访问文件没有问题,既没有连接到 SonarQube 服务器,令牌以及项目名称和代码都经过验证。
我不知道为什么它会在那个特定文件上失败总是。
感谢任何帮助。
经过反复尝试,我注意到 SVN 存储库有些不稳定。即便如此,在 运行 使用 属性 sonar.scm.disabled=true 进行扫描后,允许 运行 正确地进行分析,除非它无法从存储库中获取某些元数据。我大胆猜测执行试图为声纳报告收集一些作者数据但失败了。启用 said 属性 启动扫描但没有一些信息,所以我想这是一种解决方法,而不是完整的解决方案。 SVN不稳定状态也可能影响它。
当执行本地或基于 jenkins-server 的声纳扫描时,一段时间后(尝试分析某个文件大约 20 分钟)它会抛出以下错误:
00:45:31.439 INFO: 21/57 files analyzed
00:45:31.688 INFO: ------------------------------------------------------------------------
00:45:31.688 INFO: EXECUTION FAILURE
00:45:31.689 INFO: ------------------------------------------------------------------------
00:45:31.690 INFO: Total time: 21:53.981s
00:45:31.973 INFO: Final Memory: 36M/127M
00:45:31.974 INFO: ------------------------------------------------------------------------
00:45:31.975 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Error when executing blame for file local_path_to_file.java
at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:85)
at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:58)
at org.sonar.scanner.scm.ScmPublisher.publish(ScmPublisher.java:85)
at org.sonar.scanner.phases.PublishPhaseExecutor.afterSensors(PublishPhaseExecutor.java:60)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:90)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:180)
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:288)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:283)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:261)
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.execute(Batch.java:71)
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(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/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:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
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: org.tmatesoft.svn.core.SVNException: svn: E175002: can not read HTTP status line
svn: E175002: REPORT request failed on 'svn_path_to_file.java'
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:112)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:96)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:765)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:352)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:340)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:888)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:354)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:344)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getFileRevisionsImpl(DAVRepository.java:920)
at org.tmatesoft.svn.core.io.SVNRepository.getFileRevisions(SVNRepository.java:756)
at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteAnnotate.run(SvnRemoteAnnotate.java:109)
at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteAnnotate.run(SvnRemoteAnnotate.java:30)
at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
at org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:295)
at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:83)
... 31 more
Caused by: java.io.IOException: can not read HTTP status line
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:460)
... 45 more
Caused by: java.io.EOFException: can not read HTTP status line
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPParser.parseStatus(HTTPParser.java:45)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readHeader(HTTPConnection.java:263)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPRequest.dispatch(HTTPRequest.java:179)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:451)
SVN 用作存储库技术。我访问文件没有问题,既没有连接到 SonarQube 服务器,令牌以及项目名称和代码都经过验证。
我不知道为什么它会在那个特定文件上失败总是。
感谢任何帮助。
经过反复尝试,我注意到 SVN 存储库有些不稳定。即便如此,在 运行 使用 属性 sonar.scm.disabled=true 进行扫描后,允许 运行 正确地进行分析,除非它无法从存储库中获取某些元数据。我大胆猜测执行试图为声纳报告收集一些作者数据但失败了。启用 said 属性 启动扫描但没有一些信息,所以我想这是一种解决方法,而不是完整的解决方案。 SVN不稳定状态也可能影响它。