Hey all, I’ve been having some issues with Gradle this evening.
Whenever I try running a JUnit suite, the debug logging shows pulling up a listener (which I assume is to spawn a new JVM process for communication), beginning the test execution, and then eventually timing out with these lines:
Attempting to connect to [fa0a0d6c-a049-4e24-8e34-970411abc47f port:52044, addresses:[/0:0:0:0:0:0:0:1%lo, /127.0.0.1]].
10:42:54.802 [QUIET] [system.out] 10:42:54.802 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Trying to connect to address /0:0:0:0:0:0:0:1%lo.
10:43:02.369 [QUIET] [system.out] 10:43:02.369 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Cannot connect to address /0:0:0:0:0:0:0:1%lo, skipping.
10:43:02.370 [QUIET] [system.out] 10:43:02.370 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Trying to connect to address /127.0.0.1.
10:43:02.371 [QUIET] [system.out] 10:43:02.370 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Cannot connect to address /127.0.0.1, skipping.
10:43:02.375 [QUIET] [system.out] 10:43:02.371 [DEBUG] [org.gradle.process.internal.child.ActionExecutionWorker] Stopping client connection.
10:43:02.380 [ERROR] [system.err] 10:43:02.377 [ERROR] [system.err] org.gradle.messaging.remote.internal.ConnectException: Could not connect to server [032d8737-5833-4936-bd8b-bdc327a23314 port:47199, addresses:[/0:0:0:0:0:0:0:1%lo, /127.0.0.1]]. Tried addresses: [/0:0:0:0:0:0:0:1%lo, /127.0.0.1].
I’ve searched quite hard before coming here, and I have read the documentation in an attempt to debug this part of the Test runner, but I have not had much luck. Any sort of pointer is greatly appreciated, full logs below:
10:42:53.568 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpIncomingConnector] Listening on [fa0a0d6c-a049-4e24-8e34-970411abc47f port:52044, addresses:[/0:0:0:0:0:0:0:1%lo, /127.0.0.1]].
10:42:53.568 [DEBUG] [org.gradle.process.internal.DefaultWorkerProcessFactory] Creating Gradle Test Executor 2
10:42:53.568 [DEBUG] [org.gradle.process.internal.DefaultWorkerProcessFactory] Using application classpath
10:42:53.577 [DEBUG] [org.gradle.process.internal.child.WorkerProcessClassPathProvider] Using worker process classpath: [/home/removed/.gradle/caches/2.2.1/workerMain/gradle-worker.jar]
10:42:53.578 [DEBUG] [org.gradle.process.internal.child.ApplicationClassesInSystemClassLoaderWorkerFactory] Writing an application classpath to child process' standard input.
10:42:53.579 [INFO] [org.gradle.process.internal.DefaultExecHandle] Starting process 'Gradle Test Executor 2'. Working directory: Command: /usr/lib/jvm/java-8-openjdk/bin/java -Djava.security.manager=jarjar.org.gradle.process.internal.child.BootstrapSecurityManager -Xss16m -javaagent:build/tmp/expandedArchives/org.jacoco.agent-0.7.1.201405082137.jar_5nj08kktrvjeto1w3avxknm4q/jacocoagent.jar=destfile=build/jacoco/test.exec,append=true,dumponexit=true,output=file,jmx=false -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -ea -cp /home/removed/.gradle/caches/2.2.1/workerMain/gradle-worker.jar jarjar.org.gradle.process.internal.launcher.GradleWorkerMain 'Gradle Test Executor 2'
10:42:53.579 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Environment for process 'Gradle Test Executor 2': {PATH=/home/removed/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:}
10:42:53.579 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTING
10:42:53.580 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Waiting until process started: Gradle Test Executor 2.
10:42:53.584 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTED
10:42:53.585 [DEBUG] [org.gradle.process.internal.ExecHandleRunner] waiting until streams are handled...
10:42:53.585 [INFO] [org.gradle.process.internal.DefaultExecHandle] Successfully started process 'Gradle Test Executor 2'
10:42:54.801 [QUIET] [system.out] 10:42:54.799 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Attempting to connect to [fa0a0d6c-a049-4e24-8e34-970411abc47f port:52044, addresses:[/0:0:0:0:0:0:0:1%lo, /127.0.0.1]].
10:42:54.802 [QUIET] [system.out] 10:42:54.802 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Trying to connect to address /0:0:0:0:0:0:0:1%lo.
10:43:02.369 [QUIET] [system.out] 10:43:02.369 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Cannot connect to address /0:0:0:0:0:0:0:1%lo, skipping.
10:43:02.370 [QUIET] [system.out] 10:43:02.370 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Trying to connect to address /127.0.0.1.
10:43:02.371 [QUIET] [system.out] 10:43:02.370 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Cannot connect to address /127.0.0.1, skipping.
10:43:02.375 [QUIET] [system.out] 10:43:02.371 [DEBUG] [org.gradle.process.internal.child.ActionExecutionWorker] Stopping client connection.
10:43:02.380 [ERROR] [system.err] 10:43:02.377 [ERROR] [system.err] org.gradle.messaging.remote.internal.ConnectException: Could not connect to server [032d8737-5833-4936-bd8b-bdc327a23314 port:47199, addresses:[/0:0:0:0:0:0:0:1%lo, /127.0.0.1]]. Tried addresses: [/0:0:0:0:0:0:0:1%lo, /127.0.0.1].
10:43:02.380 [ERROR] [system.err] 10:43:02.380 [ERROR] [system.err]
at org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector.connect(TcpOutgoingConnector.java:62)
10:43:02.382 [ERROR] [system.err] 10:43:02.382 [ERROR] [system.err]
at org.gradle.messaging.remote.internal.hub.MessageHubBackedClient.getConnection(MessageHubBackedClient.java:35)
10:43:02.385 [ERROR] [system.err] 10:43:02.384 [ERROR] [system.err]
at org.gradle.process.internal.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:54)
10:43:02.387 [ERROR] [system.err] 10:43:02.387 [ERROR] [system.err]
at org.gradle.process.internal.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:35)
10:43:02.388 [ERROR] [system.err] 10:43:02.388 [ERROR] [system.err]
at org.gradle.process.internal.child.ImplementationClassLoaderWorker.execute(ImplementationClassLoaderWorker.java:85)
10:43:02.390 [ERROR] [system.err] 10:43:02.390 [ERROR] [system.err]
at org.gradle.process.internal.child.ImplementationClassLoaderWorker.execute(ImplementationClassLoaderWorker.java:41)
10:43:02.391 [ERROR] [system.err] 10:43:02.390 [ERROR] [system.err]
at org.gradle.process.internal.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:43)
10:43:02.391 [ERROR] [system.err] 10:43:02.391 [ERROR] [system.err]
at org.gradle.process.internal.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:32)
10:43:02.392 [ERROR] [system.err] 10:43:02.392 [ERROR] [system.err]
at org.gradle.process.internal.launcher.BootstrapClassLoaderWorker.call(BootstrapClassLoaderWorker.java:46)
10:43:02.393 [ERROR] [system.err] 10:43:02.393 [ERROR] [system.err]
at org.gradle.process.internal.launcher.BootstrapClassLoaderWorker.call(BootstrapClassLoaderWorker.java:32)
10:43:02.395 [ERROR] [system.err] 10:43:02.394 [ERROR] [system.err]
at jarjar.org.gradle.process.internal.launcher.GradleWorkerMain.run(GradleWorkerMain.java:32)
10:43:02.395 [ERROR] [system.err] 10:43:02.395 [ERROR] [system.err]
at jarjar.org.gradle.process.internal.launcher.GradleWorkerMain.main(GradleWorkerMain.java:37)
10:43:02.397 [ERROR] [system.err] 10:43:02.396 [ERROR] [system.err] Caused by: java.net.ConnectException: Connection refused
10:43:02.398 [ERROR] [system.err] 10:43:02.398 [ERROR] [system.err]
at sun.nio.ch.Net.connect0(Native Method)
10:43:02.400 [ERROR] [system.err] 10:43:02.399 [ERROR] [system.err]
at sun.nio.ch.Net.connect(Net.java:457)
10:43:02.402 [ERROR] [system.err] 10:43:02.401 [ERROR] [system.err]
at sun.nio.ch.Net.connect(Net.java:449)
10:43:02.404 [ERROR] [system.err] 10:43:02.403 [ERROR] [system.err]
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:647)
10:43:02.405 [ERROR] [system.err] 10:43:02.404 [ERROR] [system.err]
at java.nio.channels.SocketChannel.open(SocketChannel.java:189)
10:43:02.406 [ERROR] [system.err] 10:43:02.406 [ERROR] [system.err]
at org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector.connect(TcpOutgoingConnector.java:53)
10:43:02.407 [ERROR] [system.err] 10:43:02.407 [ERROR] [system.err]
... 11 more
10:43:02.428 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
EDIT: I want to add that I am running ‘’’./gradlew test’’’ to reproduce