我正在尝试使用mvn deploy
命令将大型zip文件(305 MB)部署到artifactory,但是我遇到了管道错误。我尝试通过浏览器的“部署”按钮上传相同的文件,它工作正常。
是否有可用于增加套接字超时的设置,或强制maven / artifactory等待包上传?
如何解决此问题的任何帮助表示赞赏。以下是日志条目和堆栈跟踪:
May 09, 2016 11:16:32 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://mvnrepo.dev.xyz.myorg.net:8080
May 09, 2016 11:17:02 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {}->http://mvnrepo.dev.xyz.myorg.net:8080: Broken pipe
May 09, 2016 11:17:02 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://mvnrepo.dev.xyz.myorg.net:8080
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact com.myorg.xyz.myapp:my-app-package:zip:0.1-svc20160509.151532-7 from/to xyz-service-snapshots (http://mvnrepo.dev.xyz.myorg.net:8080/artifactory/xyz-service-local): Broken pipe
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.put(BasicRepositoryConnector.java:274)
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:311)
... 26 more
Caused by: org.apache.maven.wagon.TransferFailedException: Broken pipe
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:662)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:557)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:539)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:533)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:513)
at org.eclipse.aether.transport.wagon.WagonTransporter$PutTaskRunner.run(WagonTransporter.java:644)
at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:427)
at org.eclipse.aether.transport.wagon.WagonTransporter.put(WagonTransporter.java:410)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$PutTaskRunner.runTask(BasicRepositoryConnector.java:510)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
... 28 more
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
at java.net.SocketOutputStream.write(SocketOutputStream.java:159)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.SessionOutputBufferImpl.streamWrite(SessionOutputBufferImpl.java:123)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.SessionOutputBufferImpl.flushBuffer(SessionOutputBufferImpl.java:135)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.SessionOutputBufferImpl.write(SessionOutputBufferImpl.java:164)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:115)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon$RequestEntityImplementation.writeTo(AbstractHttpClientWagon.java:204)
at org.apache.maven.wagon.providers.http.httpclient.impl.DefaultBHttpClientConnection.sendRequestEntity(DefaultBHttpClientConnection.java:155)
at org.apache.maven.wagon.providers.http.httpclient.impl.conn.CPoolProxy.sendRequestEntity(CPoolProxy.java:149)
at org.apache.maven.wagon.providers.http.httpclient.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:236)
答案 0 :(得分:0)
我认为这不是文件大小的问题。问题与Maven的配置有关。
您应该创建服务器存储库配置:
在/user.home/.m2/settings.xml
中:(使用Jenkins时为/var/lib/jenkins/.m2
)
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"
xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<server>
<id>central</id>
<username>your-artifactory-account</username>
<password>{rsB56BJcqoEHZqEZ0R1VR4TIspmODx1Ln8/PVvsgaGw=}</password>
</server>
<server>
<id>snapshots</id>
<username>your-artifactory-account</username>
<password>{rsB56BJcqoEHZqEZ0R1VR4TIspmODx1Ln8/PVvsgaGw=}</password>
</server>
</servers>
<profiles>
<profile>
<repositories>
<repository>
<id>central</id>
<snapshots>
<enabled>false</enabled>
</snapshots>
<name>app-releases</name>
<url>http://localhost:8081/artifactory/app-snapshots</url>
</repository>
<repository>
<id>snapshots</id>
<snapshots />
<name>app-snapshots</name>
<url>http://localhost:8081/artifactory/app-snapshots</url>
</repository>
</repositories>
</profile>
</profiles>
</settings>
Artifactory对密码进行加密,以安全可靠地访问Maven 存储库
为避免必须使用明文密码,Artifactory会加密 生成的settings.xml文件中的密码。例如,在 上面的示例代码中,我们可以看到admin用户名是 指定为明文,但密码已加密:
<username>admin</username> <password>\{DESede\}kFposSPUydYZf89Sy/o4wA==</password>
您可以从here处找到使用Maven进行密码加密的指南
使用-X
运行maven部署以启用Debug output
和检查过程。
答案 1 :(得分:0)
我设法通过将 Maven 版本从 3.5.2 降级到 3.0.4 来解决这个问题
Artifactory - 开源 7.12.6