使用ConnectException,Gradle任务测试失败:无法连接到服务器

时间:2016-06-13 16:22:17

标签: java gradle freebsd

当我在我的机器上运行gradle测试时,它运行正常,但是当我在我们的FreeBSD构建服务器上运行它时,它会因此异常而失败:

 :alerting:testPicked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
    org.gradle.messaging.remote.internal.ConnectException: Could not connect to server [4ddcef47-2985-48dd-b83e-9eab161fe8a3 port:12526, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]]. Tried addresses: [/0:0:0:0:0:0:0:1, /127.0.0
        at org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector.connect(TcpOutgoingConnector.java:68)
    at org.gradle.messaging.remote.internal.hub.MessageHubBackedClient.getConnection(MessageHubBackedClient.java:35)
    at org.gradle.process.internal.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:58)
    at org.gradle.process.internal.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:37)
    at org.gradle.process.internal.child.ImplementationClassLoaderWorker.execute(ImplementationClassLoaderWorker.java:87)
    at org.gradle.process.internal.child.ImplementationClassLoaderWorker.execute(ImplementationClassLoaderWorker.java:41)
    at org.gradle.process.internal.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:49)
    at org.gradle.process.internal.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:33)
    at jarjar.org.gradle.process.internal.launcher.GradleWorkerMain.run(GradleWorkerMain.java:69)
    at jarjar.org.gradle.process.internal.launcher.GradleWorkerMain.main(GradleWorkerMain.java:74)
    Caused by: java.net.SocketTimeoutException
    at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:118)
    at org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector.tryConnect(TcpOutgoingConnector.java:82)
    at org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector.connect(TcpOutgoingConnector.java:55)
    ... 9 more
    FAILED

我认为问题是被防火墙阻止环回(我们在监狱中运行),但是我可以ping它并通过环回连接到本地运行的其他服务。

你知道如何解决这个问题吗?

由于

0 个答案:

没有答案