[GRADLE-3180] Cannot run tests with OpenShift: cannot open outgoing connection Created: 07/Oct/14  Updated: 12/Feb/15  Resolved: 11/Feb/15

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: 2.4-rc-1

Type: Bug
Reporter: Gradle Forums Assignee: Unassigned
Resolution: Fixed Votes: 1


 Description   

Cannot run tests with latest gradle nightly on OpenShift. TcpOutgoingConnector tries to open a random port, however OpenShift environments restrict access to single, specific port, via an environment variable.

See related issue: [1]https://issues.gradle.org/browse/GRAD...

Stack trace from the failure:

:testClasses UP-TO-DATE
:testorg.gradle.messaging.remote.internal.ConnectException: Could not connect to server [01104c45-0444-4e0c-917b-0d78784ce581 port:18892, addresses:[/127.0.0.1]]. Tried addresses: [/127.0.0.1].
at org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector.connect(TcpOutgoingConnector.java:62)
at org.gradle.messaging.remote.internal.hub.MessageHubBackedClient.getConnection(MessageHubBackedClient.java:35)
at org.gradle.process.internal.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:54)
at org.gradle.process.internal.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:35)
at org.gradle.process.internal.child.ImplementationClassLoaderWorker.execute(ImplementationClassLoaderWorker.java:85)
at org.gradle.process.internal.child.ImplementationClassLoaderWorker.execute(ImplementationClassLoaderWorker.java:41)
at org.gradle.process.internal.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:43)
at org.gradle.process.internal.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:32)
at org.gradle.process.internal.launcher.BootstrapClassLoaderWorker.call(BootstrapClassLoaderWorker.java:46)
at org.gradle.process.internal.launcher.BootstrapClassLoaderWorker.call(BootstrapClassLoaderWorker.java:32)
at jarjar.org.gradle.process.internal.launcher.GradleWorkerMain.run(GradleWorkerMain.java:32)
at jarjar.org.gradle.process.internal.launcher.GradleWorkerMain.main(GradleWorkerMain.java:37)
Caused by: java.net.ConnectException: Connection refused

Compilation passes successfully on the same environment.

TcpOutgoingConnector should use the same strategy/logic as the TcpIncomingConnector, detecting the OpenShift environment variable and setting the port number accordingly.
----------------------------------------------------------------------------------------
[1] https://issues.gradle.org/browse/GRADLE-2871



 Comments   
Comment by rurik [ 01/Feb/15 ]

I have the same problem

Generated at Wed Jun 30 12:42:05 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.