在Docker中构建时Nexus ClosedChannelException

时间:2019-08-22 14:21:42

标签: maven docker

我有一个多阶段dockerfile,该文件使用内部公司关系(中央+内部开发人员的代理镜像)构建maven项目

当我建立图像时

Caused by: org.apache.maven.wagon.providers.http.httpclient.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 10,142,404; received: 6,684,672)

并查看我看到的联系日志

jvm 1    | 2019-08-22 15:22:30 WARN  [p401103507-7566] - org.sonatype.nexus.content.internal.ContentServlet - org.eclipse.jetty.io.EofException, caused by: java.nio.channels.ClosedChannelException [client=REDACTED,ua=Apache-Maven/3.6.1 (Java 1.8.0_222; Linux 4.15.0-54-generic),req=GET http://REDACTED/content/groups/public/com/typesafe/akka/akka-distributed-data_2.12/2.5.12/akka-distributed-data_2.12-2.5.12.jar]
jvm 1    | 2019-08-22 15:22:30 ERROR [p401103507-7566] - org.sonatype.nexus.web.internal.ErrorPageFilter - Internal error
jvm 1    | org.eclipse.jetty.io.EofException: null
jvm 1    |  at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:914)
jvm 1    |  at org.eclipse.jetty.http.AbstractGenerator.blockForOutput(AbstractGenerator.java:528)
jvm 1    |  at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:170)
jvm 1    |  at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:107)
jvm 1    |  at org.sonatype.nexus.util.io.StreamSupport.copy(StreamSupport.java:59)
...
jvm 1    |  at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
jvm 1    |  at java.lang.Thread.run(Thread.java:748)
jvm 1    |  Suppressed: org.eclipse.jetty.io.EofException: null
jvm 1    |      at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:914)
jvm 1    |      at org.eclipse.jetty.server.AbstractHttpConnection.flushResponse(AbstractHttpConnection.java:686)
jvm 1    |      at org.eclipse.jetty.server.AbstractHttpConnection$Output.close(AbstractHttpConnection.java:1108)
jvm 1    |      at org.sonatype.nexus.web.WebUtils.sendContent(WebUtils.java:107)
...
jvm 1    |      at org.sonatype.nexus.web.internal.HeaderPatternFilter.doFilter(HeaderPatternFilter.java:96)
jvm 1    |      at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
jvm 1    |      ... 33 common frames omitted
jvm 1    |  Caused by: java.nio.channels.ClosedChannelException: null
jvm 1    |      at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:272)
jvm 1    |      at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:461)
jvm 1    |      at org.eclipse.jetty.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:310)
jvm 1    |      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:404)
jvm 1    |      at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:853)
jvm 1    |      ... 91 common frames omitted
jvm 1    | Caused by: java.nio.channels.ClosedChannelException: null
jvm 1    |  at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:272)
jvm 1    |  at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:461)
jvm 1    |  at org.eclipse.jetty.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:310)
jvm 1    |  at org.eclipse.jetty.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:404)
jvm 1    |  at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:853)

但是在我的机器上构建相同的项目却成功了。

其他一些有趣的信息:

  • Nexus Repository Manager OSS 2.14.13-01
  • Dockerfile基本的maven:3-jdk-8
  • 没有适用于Nexus的反向代理
  • 在Ubuntu 18.04 LTS中构建

任何人都知道如何解决此问题?

0 个答案:

没有答案