我得到下面的错误,而执行代码使用gradle为一个特定的测试套件。不明白的原因。任何帮助感谢。
org.gradle.internal.remote.internal.MessageIOException: Could not write '/127.0.0.1:53644'.
at org.gradle.internal.remote.internal.inet.SocketConnection.flush(SocketConnection.java:121)
at org.gradle.internal.remote.internal.hub.MessageHub$ConnectionDispatch.run(MessageHub.java:300)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)at java.lang.Thread.run(Thread.java:748)
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:51)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:51)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
at org.gradle.internal.remote.internal.inet.SocketConnection$SocketOutputStream.writeWithNonBlockingRetry(SocketConnection.java:259)
at org.gradle.internal.remote.internal.inet.SocketConnection$SocketOutputStream.writeBufferToChannel(SocketConnection.java:247)
at org.gradle.internal.remote.internal.inet.SocketConnection$SocketOutputStream.flush(SocketConnection.java:241)
at org.gradle.internal.remote.internal.inet.SocketConnection.flush(SocketConnection.java:119)
2条答案
按热度按时间beq87vna1#
我在一个Dropwizard项目中使用gradle时也遇到了同样的错误。(和应用程序代码)已经被更改,因此它不再与测试config.yml匹配。当我修复测试config.yml时,问题消失了。2我还看到发生了这个错误(再次在一个Dropwizard项目的gradle版本中运行测试任务)。关闭docker容器修复了这个问题(不知道为什么,但这种情况至少发生了两次)。
fquxozlt2#
我通过添加两项内容解决了此问题:
1.将
id "org.flywaydb.enterprise.flyway" version "8.5.2"
转换为build.gradle
plugins
1.将
implementation 'mysql:mysql-connector-java:8.0.28'
转换为build.gradle
dependencies