I am using the latest gradle downloaded 20 mins ago. I ran the command
gradle -q test
on my java project
I get the following error
Could not dispatch message [EndOfStreamEvent]. Discarding message.
org.gradle.messaging.remote.internal.MessageIOException: Could not write message [EndOfStreamEvent] to '/127.0.0.1:57656'.
at org.gradle.messaging.remote.internal.inet.SocketConnection.dispatch(SocketConnection.java:108)
at org.gradle.messaging.remote.internal.DelegatingConnection.dispatch(DelegatingConnection.java:35)
at org.gradle.messaging.dispatch.FailureHandlingDispatch.dispatch(FailureHandlingDispatch.java:29)
at org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:132)
at org.gradle.messaging.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:33)
at org.gradle.messaging.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:72)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:33)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:72)
Can anyone please help.
-Narahari
We’d need more information to help. Is this with Gradle 1.2? Which OS? Can you share the project? Can you produce a debug log and post it as a private gist (https://gist.github.com)? Can you isolate a particular test that causes this problem? Is the problem always reproducible? Does it also occur on other machines?
This is Gradle gradle-1.3-20121031230018+0000-bin.zip
OS: Win7
My test case is only one and simple. The problem is reproducible inside Win7 Enterprise consistently.(both gradle-1.2 and gradle nightly)
I tried this inside a Arch Linux VM and I CANNOT reproduce the problem.
https://gist.github.com/0e32472457a542e61538
-N
Hello Gradle people,
We have kind of the same exceptions in one specific test since this morning in Gradle 1.2, find below a dump of the exceptions:
[10:22:43][:asn-esb-common:test] com.alcatel.asn.esb.common.util.LauncherTest [10:22:43][com.alcatel.asn.esb.common.util.LauncherTest] testConstructor [10:22:43][com.alcatel.asn.esb.common.util.LauncherTest] testProcess [10:22:43][testProcess] Test ignored: com.alcatel.asn.esb.common.util.LauncherTest.testProcess [10:22:43][com.alcatel.asn.esb.common.util.LauncherTest] testProcessOverrideContext [10:22:43][testProcessOverrideContext]
[Test Error Output] log4j:WARN No appenders could be found for logger (com.alcatel.asn.tools.util.commonlib.launcher.ResourceLoaderImpl).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. [10:22:43][:asn-esb-common:test] Failed to execute org.gradle.messaging.dispatch.AsyncReceive$1@1e22632. [10:22:43][:asn-esb-common:test] org.gradle.internal.UncheckedException: java.lang.InterruptedException [10:22:43][:asn-esb-common:test] at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:39) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.DelayedReceive.receive(DelayedReceive.java:66) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.AsyncReceive.receiveMessages(AsyncReceive.java:142) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.AsyncReceive.access$000(AsyncReceive.java:36) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.AsyncReceive$1.run(AsyncReceive.java:88) [10:22:43][:asn-esb-common:test] at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66) [10:22:43][:asn-esb-common:test] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [10:22:43][:asn-esb-common:test] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [10:22:43][:asn-esb-common:test] at java.lang.Thread.run(Thread.java:662) [10:22:43][:asn-esb-common:test] Caused by: java.lang.InterruptedException [10:22:43][:asn-esb-common:test] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:1961) [10:22:43][:asn-esb-common:test] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1996) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.DelayedReceive.receive(DelayedReceive.java:50) [10:22:43][:asn-esb-common:test] … 7 more [10:22:43][:asn-esb-common:test] Could not receive message from connection. Discarding connection. [10:22:43][:asn-esb-common:test] org.gradle.messaging.remote.internal.MessageIOException: Could not read message from ‘/0:0:0:0:0:0:0:1%1:41151’. [10:22:43][:asn-esb-common:test] at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(SocketConnection.java:81) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.remote.internal.DelegatingConnection.receive(DelegatingConnection.java:31) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.remote.internal.MessageHub$EndOfStreamConnection.receive(MessageHub.java:207) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.remote.internal.MessageHub$EndOfStreamConnection.receive(MessageHub.java:192) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.remote.internal.AsyncConnectionAdapter$ConnectionReceive.receive(AsyncConnectionAdapter.java:77) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.AsyncReceive.receiveMessages(AsyncReceive.java:142) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.AsyncReceive.access$000(AsyncReceive.java:36) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.AsyncReceive$1.run(AsyncReceive.java:88) [10:22:43][:asn-esb-common:test] at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66) [10:22:43][:asn-esb-common:test] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [10:22:43][:asn-esb-common:test] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [10:22:43][:asn-esb-common:test] at java.lang.Thread.run(Thread.java:662) [10:22:43][:asn-esb-common:test] Caused by: java.nio.channels.ClosedByInterruptException [10:22:43][:asn-esb-common:test] at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:184) [10:22:43][:asn-esb-common:test] at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:270) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.remote.internal.inet.SocketConnection$SocketInputStream.read(SocketConnection.java:160) [10:22:43][:asn-esb-common:test] at java.io.DataInputStream.read(DataInputStream.java:132) [10:22:43][:asn-esb-common:test] at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2265) [10:22:43][:asn-esb-common:test] at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2278) [10:22:43][:asn-esb-common:test] at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2749) [10:22:43][:asn-esb-common:test] at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:779) [10:22:43][:asn-esb-common:test] at java.io.ObjectInputStream.(ObjectInputStream.java:279) [10:22:43][:asn-esb-common:test] at org.gradle.internal.io.ClassLoaderObjectInputStream.(ClassLoaderObjectInputStream.java:27) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.remote.internal.Message$ExceptionReplacingObjectInputStream.(Message.java:151) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.remote.internal.Message.receive(Message.java:37) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.remote.internal.DefaultMessageSerializer.read(DefaultMessageSerializer.java:31) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(SocketConnection.java:76) [10:22:43][:asn-esb-common:test] … 11 more [10:22:43][:asn-esb-common:test] Failed to execute org.gradle.messaging.dispatch.AsyncDispatch$1@1e21f52. [10:22:43][:asn-esb-common:test] org.gradle.internal.UncheckedException: java.lang.InterruptedException [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:116) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:33) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:72) [10:22:43][:asn-esb-common:test] at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66) [10:22:43][:asn-esb-common:test] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [10:22:43][:asn-esb-common:test] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [10:22:43][:asn-esb-common:test] at java.lang.Thread.run(Thread.java:662) [10:22:43][:asn-esb-common:test] Caused by: java.lang.InterruptedException [10:22:43][:asn-esb-common:test] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:1961) [10:22:43][:asn-esb-common:test] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1996) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:114) [10:22:43][:asn-esb-common:test] … 6 more [10:22:43][:asn-esb-common:test] Failed to execute org.gradle.messaging.dispatch.AsyncReceive$1@39be68. [10:22:43][:asn-esb-common:test] org.gradle.internal.UncheckedException: java.lang.InterruptedException [10:22:43][:asn-esb-common:test] at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:39) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.DelayedReceive.receive(DelayedReceive.java:66) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.AsyncReceive.receiveMessages(AsyncReceive.java:142) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.AsyncReceive.access$000(AsyncReceive.java:36) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.AsyncReceive$1.run(AsyncReceive.java:88) [10:22:43][:asn-esb-common:test] at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66) [10:22:43][:asn-esb-common:test] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [10:22:43][:asn-esb-common:test] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [10:22:43][:asn-esb-common:test] at java.lang.Thread.run(Thread.java:662) [10:22:43][:asn-esb-common:test] Caused by: java.lang.InterruptedException [10:22:43][:asn-esb-common:test] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:1961) [10:22:43][:asn-esb-common:test] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1996) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.DelayedReceive.receive(DelayedReceive.java:50) [10:22:43][:asn-esb-common:test] … 7 more [10:22:43][:asn-esb-common:test] Failed to execute org.gradle.messaging.dispatch.AsyncReceive$1@d0deb5. [10:22:43][:asn-esb-common:test] org.gradle.internal.UncheckedException: java.lang.InterruptedException [10:22:43][:asn-esb-common:test] at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:39) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.DelayedReceive.receive(DelayedReceive.java:66) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.AsyncReceive.receiveMessages(AsyncReceive.java:142) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.AsyncReceive.access$000(AsyncReceive.java:36) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.AsyncReceive$1.run(AsyncReceive.java:88) [10:22:43][:asn-esb-common:test] at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66) [10:22:43][:asn-esb-common:test] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [10:22:43][:asn-esb-common:test] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [10:22:43][:asn-esb-common:test] at java.lang.Thread.run(Thread.java:662) [10:22:43][:asn-esb-common:test] Caused by: java.lang.InterruptedException [10:22:43][:asn-esb-common:test] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:1961) [10:22:43][:asn-esb-common:test] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1996) [10:22:43][:asn-esb-common:test] at org.gradle.messaging.dispatch.DelayedReceive.receive(DelayedReceive.java:50) [10:22:43][:asn-esb-common:test] … 7 more [10:23:26][:asn-esb-common:test] Process exited with code 137 [10:23:26][:asn-esb-common:test] Step Build (Gradle) interrupted
There have been a number of improvements since 1.2. Can you try with 1.4-rc-1?
Thanks for your answer,
Before going further 1.2, I will need to fix the use of extra properties in our build project and also TeamCity. I will put that on my task list soon.
Regards,
Jean-Pierre
Since dynamic properties are only deprecated, you can try whether 1.4-rc-1 solves the test problem without switching to extra properties.