1

我们将 Sonar 设置为在单独的服务器上运行。确实如此,并且客户端应用程序(声纳运行器)可以成功连接到它。但是,运行中断,但出现以下异常:

Runner configuration file: C:\Program Files (x86)\sonar-runner-1.3\bin\..\conf\sonar-runner.properties
Project configuration file: C:\project\subproject\sonar-project.properties
Runner version: 1.3
Java version: 1.6.0_33, vendor: Sun Microsystems Inc.
OS name: "Windows 7", version: "6.1", arch: "x86"
Server: http://<serverip>:80
Work directory: C:\project\subproject\.sonar
Total time: 1:30.902s
Final Memory: 0M/15M
Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException: org.sonar.batch.bootstrapper.BootstrapException: Fail to download the file: http://<serverip>:80/batch/guava-10.0.1.jar
        at org.sonar.batch.bootstrapper.Bootstrapper.downloadBatchFiles(Bootstrapper.java:164)
        at org.sonar.batch.bootstrapper.Bootstrapper.createClassLoader(Bootstrapper.java:87)
        at org.sonar.runner.Runner.createClassLoader(Runner.java:155)
        at org.sonar.runner.Runner.execute(Runner.java:78)
        at org.sonar.runner.Main.main(Main.java:61)
Caused by: org.sonar.batch.bootstrapper.BootstrapException: Fail to download the file: http://<serverip>:80/batch/guava-10.0.1.jar
        at org.sonar.batch.bootstrapper.Bootstrapper.remoteContentToFile(Bootstrapper.java:113)
        at org.sonar.batch.bootstrapper.Bootstrapper.downloadBatchFiles(Bootstrapper.java:159)
        ... 4 more
Caused by: java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(Unknown Source)
        at java.io.BufferedInputStream.fill(Unknown Source)
        at java.io.BufferedInputStream.read1(Unknown Source)
        at java.io.BufferedInputStream.read(Unknown Source)
        at sun.net.www.http.ChunkedInputStream.readAheadBlocking(Unknown Source)

        at sun.net.www.http.ChunkedInputStream.readAhead(Unknown Source)
        at sun.net.www.http.ChunkedInputStream.read(Unknown Source)
        at java.io.FilterInputStream.read(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source)
        at org.sonar.batch.bootstrapper.BootstrapperIOUtils.copyLarge(BootstrapperIOUtils.java:63)
        at org.sonar.batch.bootstrapper.Bootstrapper.remoteContentToFile(Bootstrapper.java:109)
        ... 5 more

我可以用普通浏览器重现这个。检索文件会打开下载管理器,但是,文件最终下载最多需要 5 分钟(它只有 1.5 兆)。由 sonar-runner 或使用浏览器检索的其他文件没有此问题。

声纳测井似乎不知道有问题。下载不会记录在 sonar.log 文件中,无论是成功的还是不成功的。syslog 不包含任何问题提示。

4

2 回答 2

4

sonar+php 插件和 eset 智能安全有类似的问题。必须在过滤协议部分禁用对 127.0.0.1 的过滤。它随机发生在不同的罐子上。它发生在太阳能蚂蚁任务和太阳能跑步者身上

于 2012-10-25T20:58:16.693 回答
0

因此,解决方案不是服务器上的问题,而是客户端问题。Kaspersky Endpoint Security 似乎有一个错误/功能,它需要扫描通过网络传输的所有内容,并且不知何故,这个 JAR 文件在文件被扫描时触发了数分钟的延迟。

于 2012-07-31T06:38:12.743 回答