Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-10076

post build deployment task fails with : Unbuffered entity enclosing request can not be repeated.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
      None

      Description

      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 :

      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
      

      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 :

      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"
      

      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.

        Issue Links

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          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

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - 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
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/2b8930c1d4f89a73526d647e4983d7b1c03c49ec
          Log:
          changelog for JENKINS-10076

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: changelog.html http://jenkins-ci.org/commit/jenkins/2b8930c1d4f89a73526d647e4983d7b1c03c49ec Log: changelog for JENKINS-10076
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Arnaud Hé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.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Arnaud Hé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.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          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

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - 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
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Arnaud Héritier
          Path:
          pom.xml
          http://jenkins-ci.org/commit/maven-plugin/d936c88b2ecd662569f9f3dc7f12a007608acab6
          Log:
          JENKINS-10076 : Use wagon-webdav-jackrabbit to avoid the error : Unbuffered entity enclosing request can not be repeated.

          Originally-Committed-As: 34e8a40434c4a9f3036b6160d9c69befdf7ec999

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Arnaud Héritier Path: pom.xml http://jenkins-ci.org/commit/maven-plugin/d936c88b2ecd662569f9f3dc7f12a007608acab6 Log: JENKINS-10076 : Use wagon-webdav-jackrabbit to avoid the error : Unbuffered entity enclosing request can not be repeated. Originally-Committed-As: 34e8a40434c4a9f3036b6160d9c69befdf7ec999

            People

            • Assignee:
              olamy olamy
              Reporter:
              aheritier Arnaud Héritier
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: