Key: JENKINS-10076
URL: https://issues.jenkins-ci.org/browse/JENKINS-10076
Project: Jenkins
Issue Type: Bug
Components: maven2
Reporter: aheritier
Assignee: aheritier
Since few weeks my builds aren't deploying artifacts from Maven but from the jenkins post build tasks to fail faster if there is a build issue and to not publish an unless incomplete set of artifacts SNAPSHOTs in the remote repositories.
But since I use this I noticed various upload failures like this one :
{code}
Maven RedeployPublished use remote maven settings from : /home/swfhudson/.m2/settings.xml
[INFO] Deployment in dav:http://repository.exoplatform.org/content/repositories/exo-snapshots (id=repository.exoplatform.org,uniqueVersion=true)
Deploying the main artifact cs-2.1.6-SNAPSHOT.pom
[INFO] Deployment in dav:http://repository.exoplatform.org/content/repositories/exo-snapshots (id=repository.exoplatform.org,uniqueVersion=true)
Deploying the main artifact cs.packaging.module-2.1.6-SNAPSHOT.pom
Deploying the main artifact cs.packaging.module-2.1.6-SNAPSHOT.js
[INFO] Deployment in dav:http://repository.exoplatform.org/content/repositories/exo-snapshots (id=repository.exoplatform.org,uniqueVersion=true)
Deploying the main artifact cs.packaging.product-2.1.6-SNAPSHOT.pom
Deploying the main artifact cs.packaging.product-2.1.6-SNAPSHOT.js
[INFO] Deployment in dav:http://repository.exoplatform.org/content/repositories/exo-snapshots (id=repository.exoplatform.org,uniqueVersion=true)
Deploying the main artifact exo.cs.datamigration-2.1.6-SNAPSHOT.jar
Deploying the main artifact exo.cs.datamigration-2.1.6-SNAPSHOT-sources.jar
[INFO] Deployment in dav:http://repository.exoplatform.org/content/repositories/exo-snapshots (id=repository.exoplatform.org,uniqueVersion=true)
Deploying the main artifact exo.cs.datamigration-import-2.1.6-SNAPSHOT.jar
Deploying the main artifact exo.cs.datamigration-import-2.1.6-SNAPSHOT-sources.jar
[INFO] Deployment in dav:http://repository.exoplatform.org/content/repositories/exo-snapshots (id=repository.exoplatform.org,uniqueVersion=true)
Deploying the main artifact exo.cs.demo-2.1.6-SNAPSHOT.pom
[INFO] Deployment in dav:http://repository.exoplatform.org/content/repositories/exo-snapshots (id=repository.exoplatform.org,uniqueVersion=true)
Deploying the main artifact exo.cs.demo.cometd-war-2.1.6-SNAPSHOT.war
ERROR: Failed to deploy artifacts: Could not transfer artifact org.exoplatform.cs:exo.cs.demo.cometd-war:war:2.1.6-20110621.183004-8 from/to repository.exoplatform.org (dav:http://repository.exoplatform.org/content/repositories/exo-snapshots): PUT request for: org/exoplatform/cs/exo.cs.demo.cometd-war/2.1.6-SNAPSHOT/exo.cs.demo.cometd-war-2.1.6-20110621.183004-8.war to exo.cs.demo.cometd-war-2.1.6-SNAPSHOT.war failed
org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact org.exoplatform.cs:exo.cs.demo.cometd-war:war:2.1.6-20110621.183004-8 from/to repository.exoplatform.org (dav:http://repository.exoplatform.org/content/repositories/exo-snapshots): PUT request for: org/exoplatform/cs/exo.cs.demo.cometd-war/2.1.6-SNAPSHOT/exo.cs.demo.cometd-war-2.1.6-20110621.183004-8.war to exo.cs.demo.cometd-war-2.1.6-SNAPSHOT.war failed
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:148)
at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:146)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:664)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:639)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:895)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:586)
at hudson.model.Run.run(Run.java:1400)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:465)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:146)
Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact org.exoplatform.cs:exo.cs.demo.cometd-war:war:2.1.6-20110621.183004-8 from/to repository.exoplatform.org (dav:http://repository.exoplatform.org/content/repositories/exo-snapshots): PUT request for: org/exoplatform/cs/exo.cs.demo.cometd-war/2.1.6-SNAPSHOT/exo.cs.demo.cometd-war-2.1.6-20110621.183004-8.war to exo.cs.demo.cometd-war-2.1.6-SNAPSHOT.war failed
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:284)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
... 11 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact org.exoplatform.cs:exo.cs.demo.cometd-war:war:2.1.6-20110621.183004-8 from/to repository.exoplatform.org (dav:http://repository.exoplatform.org/content/repositories/exo-snapshots): PUT request for: org/exoplatform/cs/exo.cs.demo.cometd-war/2.1.6-SNAPSHOT/exo.cs.demo.cometd-war-2.1.6-20110621.183004-8.war to exo.cs.demo.cometd-war-2.1.6-SNAPSHOT.war failed
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:864)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:466)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:278)
... 14 more
Caused by: org.apache.maven.wagon.TransferFailedException: PUT request for: org/exoplatform/cs/exo.cs.demo.cometd-war/2.1.6-SNAPSHOT/exo.cs.demo.cometd-war-2.1.6-20110621.183004-8.war to exo.cs.demo.cometd-war-2.1.6-SNAPSHOT.war failed
at org.apache.maven.wagon.providers.webdav.WebDavWagon.put(WebDavWagon.java:343)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:825)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
... 15 more
Caused by: org.apache.commons.httpclient.ProtocolException: Unbuffered entity enclosing request can not be repeated.
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:487)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2110)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1088)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at org.apache.maven.wagon.providers.webdav.CorrectedWebdavResource.putMethod(CorrectedWebdavResource.java:157)
at org.apache.maven.wagon.providers.webdav.WebDavWagon.put(WebDavWagon.java:290)
... 17 more
[INFO] Deployment failed after 9 min 4 sec
{code}
Searching a little bit we can find this issue (http://jira.codehaus.org/browse/WAGON-108) where it is said that it could be related to the version of the wagon used and the httpcommons-client.
Digging in my server apache logs I can see that all uploads from jenkins are marked as :
{code}
127.0.0.1 - - [21/Jun/2011:20:30:37 +0200] "PUT /content/repositories/exo-snapshots/org/exoplatform/cs/exo.cs.demo.cometd-war/2.1.6-SNAPSHOT/exo.cs.demo.cometd-war-2.1.6-20110621.183004-8.war HTTP/1.1" 400 386 "-" "Jakarta Commons-HttpClient/3.1-rc1"
{code}
It is using {{"Jakarta Commons-HttpClient/3.1-rc1"}} while my maven builds are using the wagon org.apache.maven.wagon:wagon-webdav-jackrabbit:1.0-beta-7 which has a dependency to commons-httpclient:commons-httpclient:3.1
I never had this upload error when I deployed from Maven itself thus there is either a classloader issue or something badly implemented which doesn't use the wagon defined in the project pom.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
aheritier commented on JENKINS-10076:
-------------------------------------
The culprit from maven-plugin deps analyzis :
{code}
[INFO] +- org.jenkins-ci.main.maven:maven-agent:jar:1.2:compile
[INFO] | \- commons-httpclient:commons-httpclient:jar:3.1-rc1:compile
[INFO] | +- commons-logging:commons-logging:jar:1.0.4:compile
[INFO] | \- commons-codec:commons-codec:jar:1.2:compile
{code}
I don't yet know if we don't use at all the wagon I asked to used in my build (org.apache.maven.wagon:wagon-webdav-jackrabbit:1.0-beta-7) as I can see several wagon deps :
{code}
[INFO] +- org.apache.maven.wagon:wagon-http-lightweight:jar:1.0-beta-7:compile
[INFO] | \- org.apache.maven.wagon:wagon-http-shared:jar:1.0-beta-7:compile
[INFO] +- org.apache.maven.wagon:wagon-file:jar:1.0-beta-7:compile
[INFO] +- org.apache.maven.wagon:wagon-ftp:jar:1.0-beta-7:compile
[INFO] | \- commons-net:commons-net:jar:2.0:compile
[INFO] +- org.apache.maven.wagon:wagon-ssh:jar:1.0-beta-7:compile
[INFO] | +- com.jcraft:jsch:jar:0.1.38:compile
[INFO] | \- org.apache.maven.wagon:wagon-ssh-common:jar:1.0-beta-7:compile
[INFO] | \- org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-6:compile
[INFO] +- org.apache.maven.wagon:wagon-ssh-external:jar:1.0-beta-7:compile
[INFO] +- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-7:compile
{code}
Or if we use it but we have a classloader/deps issue which makes it use the wrong version of commons-httpclient
scm_issue_link commented on JENKINS-10076:
------------------------------------------
Code changed in jenkins
User: Olivier Lamy
Path:
changelog.html
http://jenkins-ci.org/commit/jenkins/2b8930c1d4f89a73526d647e4983d7b1c03c49ec
Log:
changelog for JENKINS-10076
aheritier commented on JENKINS-10076:
-------------------------------------
I confirm the fix done deployments (using webdav) are done using "Jakarta Commons-HttpClient/3.1" and no more the RC1.
I will deploy it in production to check that it solves the "Unbuffered entity enclosing request can not be repeated." error which for now occurs several times per day. We'll see the result tomorrow (hoping the master build isn't broken somewhere else :-) )
aheritier reassigned JENKINS-10076:
-----------------------------------
Assignee: olamy (was: aheritier)
> post build deployment task fails with : Unbuffered entity enclosing request can not be repeated.
> ------------------------------------------------------------------------------------------------
>
> Key: JENKINS-10076
> URL: https://issues.jenkins-ci.org/browse/JENKINS-10076
> Project: Jenkins
> Issue Type: Bug
> Components: maven2
> Reporter: aheritier
> Assignee: olamy
aheritier commented on JENKINS-10076:
-------------------------------------
a last question is that I don't know if it is better for webdav to use this wagon like nowadays :
{code}
<dependency>
<!-- commonly used wagon provider -->
<groupId>org.jvnet.hudson</groupId>
<artifactId>wagon-webdav</artifactId>
<version>1.0-beta-2-hudson-1</version>
<exclusions>
<exclusion>
<groupId>jdom</groupId>
<artifactId>jdom</artifactId>
</exclusion>
</exclusions>
</dependency>
{code}
or maybe we could come back to a more standard one :
{code}
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav-jackrabbit</artifactId>
<version>1.0-beta-7</version>
</dependency>
{code}
???
aheritier commented on JENKINS-10076:
-------------------------------------
Again the same error even with the usage of http client 3.1 final :
{code}
127.0.0.1 - - [23/Jun/2011:01:04:29 +0200] "PUT /content/repositories/exo-private-snapshots/org/exoplatform/platform/exo.platform.sample.acme-website.ear/3.0.6-SNAPSHOT/exo.platform.sample.acme-website.ear-3.0.6-20110622.230351-10.pom HTTP/1.1" 400 386 "-" "Jakarta Commons-HttpClient/3.1"
{code}
I will try on my instance to replace the webdav wagon org.jvnet.hudson:wagon-webdav:1.0-beta-2-hudson-1 by org.apache.maven.wagon:wagon-webdav-jackrabbit:1.0-beta-7
> post build deployment task fails with : Unbuffered entity enclosing request can not be repeated.
> ------------------------------------------------------------------------------------------------
>
> Key: JENKINS-10076
> URL: https://issues.jenkins-ci.org/browse/JENKINS-10076
> Project: Jenkins
> Issue Type: Bug
> Components: maven2
> Reporter: aheritier
> Assignee: olamy
aheritier commented on JENKINS-10076:
-------------------------------------
@olamy : please see : https://github.com/jenkinsci/jenkins/pull/177
> post build deployment task fails with : Unbuffered entity enclosing request can not be repeated.
> ------------------------------------------------------------------------------------------------
>
> Key: JENKINS-10076
> URL: https://issues.jenkins-ci.org/browse/JENKINS-10076
> Project: Jenkins
> Issue Type: Bug
> Components: maven2
> Reporter: aheritier
> Assignee: olamy
scm_issue_link resolved JENKINS-10076.
--------------------------------------
Resolution: Fixed
> post build deployment task fails with : Unbuffered entity enclosing request can not be repeated.
> ------------------------------------------------------------------------------------------------
>
> Key: JENKINS-10076
> URL: https://issues.jenkins-ci.org/browse/JENKINS-10076
> Project: Jenkins
> Issue Type: Bug
> Components: maven2
> Reporter: aheritier
> Assignee: olamy
scm_issue_link commented on JENKINS-10076:
------------------------------------------
Code changed in jenkins
User: Olivier Lamy
Path:
maven-plugin/pom.xml
http://jenkins-ci.org/commit/jenkins/2109e28d7ed8f00a97c952ac2d7191a93069e4fa
Log:
Merge pull request #177 from aheritier/JENKINS-10076
[FIXED JENKINS-10076] : Use wagon-webdav-jackrabbit to avoid the error : Unbuffer
Compare: https://github.com/jenkinsci/jenkins/compare/2b8930c...2109e28
> post build deployment task fails with : Unbuffered entity enclosing request can not be repeated.
> ------------------------------------------------------------------------------------------------
>
> Key: JENKINS-10076
> URL: https://issues.jenkins-ci.org/browse/JENKINS-10076
> Project: Jenkins
> Issue Type: Bug
> Components: maven2
> Reporter: aheritier
> Assignee: olamy
scm_issue_link commented on JENKINS-10076:
------------------------------------------
Code changed in jenkins
User: Arnaud HeĢritier
Path:
maven-plugin/pom.xml
http://jenkins-ci.org/commit/jenkins/34e8a40434c4a9f3036b6160d9c69befdf7ec999
Log:
JENKINS-10076 : Use wagon-webdav-jackrabbit to avoid the error : Unbuffered entity enclosing request can not be repeated.
> post build deployment task fails with : Unbuffered entity enclosing request can not be repeated.
> ------------------------------------------------------------------------------------------------
>
> Key: JENKINS-10076
> URL: https://issues.jenkins-ci.org/browse/JENKINS-10076
> Project: Jenkins
> Issue Type: Bug
> Components: maven2
> Reporter: aheritier
> Assignee: olamy
aheritier updated JENKINS-10076:
--------------------------------
Attachment: jenkins-memory-usage.png
My instance is stable since the update around 2AM. For now there is no memory consumption issue (which was the biggest risk)
> post build deployment task fails with : Unbuffered entity enclosing request can not be repeated.
> ------------------------------------------------------------------------------------------------
>
> Key: JENKINS-10076
> URL: https://issues.jenkins-ci.org/browse/JENKINS-10076
> Project: Jenkins
> Issue Type: Bug
> Components: maven2
> Reporter: aheritier
> Assignee: olamy
> Attachments: jenkins-memory-usage.png
scm_issue_link commented on JENKINS-10076:
------------------------------------------
Code changed in jenkins
User: Olivier Lamy
Path:
maven-plugin/pom.xml
http://jenkins-ci.org/commit/jenkins/2109e28d7ed8f00a97c952ac2d7191a93069e4fa
Log:
Merge pull request #177 from aheritier/JENKINS-10076
[FIXED JENKINS-10076] : Use wagon-webdav-jackrabbit to avoid the error : Unbuffer
> post build deployment task fails with : Unbuffered entity enclosing request can not be repeated.
> ------------------------------------------------------------------------------------------------
>
> Key: JENKINS-10076
> URL: https://issues.jenkins-ci.org/browse/JENKINS-10076
> Project: Jenkins
> Issue Type: Bug
> Components: maven2
> Reporter: aheritier
> Assignee: olamy
> Attachments: jenkins-memory-usage.png
scm_issue_link commented on JENKINS-10076:
------------------------------------------
Code changed in jenkins
User: Arnaud HeĢritier
Path:
maven-plugin/pom.xml
http://jenkins-ci.org/commit/jenkins/34e8a40434c4a9f3036b6160d9c69befdf7ec999
Log:
JENKINS-10076 : Use wagon-webdav-jackrabbit to avoid the error : Unbuffered entity enclosing request can not be repeated.
> post build deployment task fails with : Unbuffered entity enclosing request can not be repeated.
> ------------------------------------------------------------------------------------------------
>
> Key: JENKINS-10076
> URL: https://issues.jenkins-ci.org/browse/JENKINS-10076
> Project: Jenkins
> Issue Type: Bug
> Components: maven2
> Reporter: aheritier
> Assignee: olamy
> Attachments: jenkins-memory-usage.png
scm_issue_link commented on JENKINS-10076:
------------------------------------------
Code changed in jenkins
User: Olivier Lamy
Path:
changelog.html
http://jenkins-ci.org/commit/jenkins/2b8930c1d4f89a73526d647e4983d7b1c03c49ec
Log:
changelog for JENKINS-10076
> post build deployment task fails with : Unbuffered entity enclosing request can not be repeated.
> ------------------------------------------------------------------------------------------------
>
> Key: JENKINS-10076
> URL: https://issues.jenkins-ci.org/browse/JENKINS-10076
> Project: Jenkins
> Issue Type: Bug
> Components: maven2
> Reporter: aheritier
> Assignee: olamy
> Attachments: jenkins-memory-usage.png
scm_issue_link commented on JENKINS-10076:
------------------------------------------
Code changed in jenkins
User: Arnaud HeĢritier
Path:
maven-plugin/pom.xml
http://jenkins-ci.org/commit/jenkins/34e8a40434c4a9f3036b6160d9c69befdf7ec999
Log:
JENKINS-10076 : Use wagon-webdav-jackrabbit to avoid the error : Unbuffered entity enclosing request can not be repeated.
> post build deployment task fails with : Unbuffered entity enclosing request can not be repeated.
> ------------------------------------------------------------------------------------------------
>
> Key: JENKINS-10076
> URL: https://issues.jenkins-ci.org/browse/JENKINS-10076
> Project: Jenkins
> Issue Type: Bug
> Components: maven2
> Reporter: aheritier
> Assignee: olamy
> Attachments: jenkins-memory-usage.png
scm_issue_link commented on JENKINS-10076:
------------------------------------------
Code changed in jenkins
User: Olivier Lamy
Path:
changelog.html
http://jenkins-ci.org/commit/jenkins/2b8930c1d4f89a73526d647e4983d7b1c03c49ec
Log:
changelog for JENKINS-10076
> post build deployment task fails with : Unbuffered entity enclosing request can not be repeated.
> ------------------------------------------------------------------------------------------------
>
> Key: JENKINS-10076
> URL: https://issues.jenkins-ci.org/browse/JENKINS-10076
> Project: Jenkins
> Issue Type: Bug
> Components: maven2
> Reporter: aheritier
> Assignee: olamy
> Attachments: jenkins-memory-usage.png