java.io.IOException: put Destination [bucketName=xxxx, objectName=yyyy_master-471_2014-06-05_17-45-08/yyyy_dist-Linux-x86_64.tgz]: com.amazonaws.AmazonClientException: Encountered an exception and couldn't reset the stream to retry

Jenkins JIRA | Joshua K | 3 years ago
  1. 0

    We often see this in our builds, usually a rebuild fixes it. Could the S3 plugin retry a couple times if it receives an error? {code} 00:04:27.998 Publish artifacts to S3 Bucket Using S3 profile: xxxx 00:04:28.070 Publish artifacts to S3 Bucket bucket=xxxxx/yyyyy_master-471_2014-06-05_17-45-08, file=yyyyy_dist-Linux-x86_64.tgz region = US_EAST_1 00:05:40.909 ERROR: Failed to upload files 00:05:40.910 java.io.IOException: put Destination [bucketName=xxxx, objectName=yyyy_master-471_2014-06-05_17-45-08/yyyy_dist-Linux-x86_64.tgz]: com.amazonaws.AmazonClientException: Encountered an exception and couldn't reset the stream to retry 00:05:40.910 at hudson.plugins.s3.S3Profile.upload(S3Profile.java:90) 00:05:40.910 at hudson.plugins.s3.S3BucketPublisher.perform(S3BucketPublisher.java:144) 00:05:40.910 at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32) 00:05:40.910 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) 00:05:40.910 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) 00:05:40.910 at hudson.model.Build$BuildExecution.post2(Build.java:183) 00:05:40.910 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:725) 00:05:40.910 at hudson.model.Run.execute(Run.java:1701) 00:05:40.910 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 00:05:40.910 at hudson.model.ResourceController.execute(ResourceController.java:88) 00:05:40.910 at hudson.model.Executor.run(Executor.java:231) 00:05:40.910 Build step 'Publish artifacts to S3 Bucket' changed build result to UNSTABLE {code}

    Jenkins JIRA | 3 years ago | Joshua K
    java.io.IOException: put Destination [bucketName=xxxx, objectName=yyyy_master-471_2014-06-05_17-45-08/yyyy_dist-Linux-x86_64.tgz]: com.amazonaws.AmazonClientException: Encountered an exception and couldn't reset the stream to retry
  2. 0

    We often see this in our builds, usually a rebuild fixes it. Could the S3 plugin retry a couple times if it receives an error? {code} 00:04:27.998 Publish artifacts to S3 Bucket Using S3 profile: xxxx 00:04:28.070 Publish artifacts to S3 Bucket bucket=xxxxx/yyyyy_master-471_2014-06-05_17-45-08, file=yyyyy_dist-Linux-x86_64.tgz region = US_EAST_1 00:05:40.909 ERROR: Failed to upload files 00:05:40.910 java.io.IOException: put Destination [bucketName=xxxx, objectName=yyyy_master-471_2014-06-05_17-45-08/yyyy_dist-Linux-x86_64.tgz]: com.amazonaws.AmazonClientException: Encountered an exception and couldn't reset the stream to retry 00:05:40.910 at hudson.plugins.s3.S3Profile.upload(S3Profile.java:90) 00:05:40.910 at hudson.plugins.s3.S3BucketPublisher.perform(S3BucketPublisher.java:144) 00:05:40.910 at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32) 00:05:40.910 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) 00:05:40.910 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) 00:05:40.910 at hudson.model.Build$BuildExecution.post2(Build.java:183) 00:05:40.910 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:725) 00:05:40.910 at hudson.model.Run.execute(Run.java:1701) 00:05:40.910 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 00:05:40.910 at hudson.model.ResourceController.execute(ResourceController.java:88) 00:05:40.910 at hudson.model.Executor.run(Executor.java:231) 00:05:40.910 Build step 'Publish artifacts to S3 Bucket' changed build result to UNSTABLE {code}

    Jenkins JIRA | 3 years ago | Joshua K
    java.io.IOException: put Destination [bucketName=xxxx, objectName=yyyy_master-471_2014-06-05_17-45-08/yyyy_dist-Linux-x86_64.tgz]: com.amazonaws.AmazonClientException: Encountered an exception and couldn't reset the stream to retry
  3. 0

    [JENKINS-18839] S3 plugin fails to upload to EU region (wrong endpoint) - Jenkins JIRA

    jenkins-ci.org | 1 year ago
    java.io.IOException: put Destination : Status Code: 301, AWS Service: Amazon S3, AWS Request ID: B731FD3EB3E36D68, AWS Error Code: PermanentRedirect, AWS Error Message: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint., S3 Extended Request ID: 1ayMHpR5YBq9DtqzPnBq5NdFR0Jn6kRbeaqrUPD4Ur+oUcL2vQlCiGbJSxjr9KXi
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    We use the S3 plugin in both a newer Jenkins install (v1.471, waiting for some important stuff to clear before we update it to 1.474) and a few older Hudson builds. The current Jenkins w/S3 (v0.3) works for a while, then all our builds stop uploading to S3 with an "Access Denied" error from Amazon. The builds on the older Hudson/S3 still work to the same bucket, and our credentials still work when I test with s3fs on the same machine. Error from Jenkins build console of one failure (buckets and filenames changed to xxxxx): Archiving artifacts Publish artifacts to S3 Bucket Using S3 profile: builds2 Publish artifacts to S3 Bucket bucket=xxxxxxx/store, file=xxxxxxx.latest.apk ERROR: Failed to upload files java.io.IOException: put Destination [bucketName=xxxxxxxxx, objectName=xxxxxxx/store/xxxxxxxxxxx.latest.apk]: Status Code: 403, AWS Request ID: 85F9CB0156BF7CF6, AWS Error Code: AccessDenied, AWS Error Message: Access Denied, S3 Extended Request ID: swP7ylP4SQNW3o9uP3alhBO/VZthqvuFxWiZ2Pn54mqhSHk2uEtSrIlhPXlJLPUM at hudson.plugins.s3.S3Profile.upload(S3Profile.java:82) at hudson.plugins.s3.S3BucketPublisher.perform(S3BucketPublisher.java:119) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:692) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:639) at hudson.model.Run.execute(Run.java:1509) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) Build step 'Publish artifacts to S3 Bucket' changed build result to UNSTABLE

    Jenkins JIRA | 4 years ago | Theral Mackey
    java.io.IOException: put Destination [bucketName=xxxxxxxxx, objectName=xxxxxxx/store/xxxxxxxxxxx.latest.apk]: Status Code: 403, AWS Request ID: 85F9CB0156BF7CF6, AWS Error Code: AccessDenied, AWS Error Message: Access Denied, S3 Extended Request ID: swP7ylP4SQNW3o9uP3alhBO/VZthqvuFxWiZ2Pn54mqhSHk2uEtSrIlhPXlJLPUM
  6. 0

    Upload broke with this error: Publish artifacts to S3 Bucket Using S3 profile: jenkins Publish artifacts to S3 Bucket bucket=deploy.***.com, file=www-site.tar.gz ERROR: Failed to upload files java.io.IOException: put Destination [bucketName=deploy.***.com, objectName=www-site.tar.gz]: com.amazonaws.AmazonClientException: Unable to execute HTTP request: Input stream cannot be reset as 5365760 bytes have been written, exceeding the available buffer size of 131072 at hudson.plugins.s3.S3Profile.upload(S3Profile.java:82) at hudson.plugins.s3.S3BucketPublisher.perform(S3BucketPublisher.java:119) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:807) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:782) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:729) at hudson.model.Run.execute(Run.java:1541) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) Build step 'Publish artifacts to S3 Bucket' changed build result to UNSTABLE Artifact size hasn't changed so I don't think could be client related. Here a related discussion on AWS forum: https://forums.aws.amazon.com/thread.jspa?threadID=66753 It would be nice to be able to tweak the retry number, or at least have a fixed value for that and not fail at the first try.

    Jenkins JIRA | 4 years ago | Alexander Fortin
    java.io.IOException: put Destination [bucketName=deploy.***.com, objectName=www-site.tar.gz]: com.amazonaws.AmazonClientException: Unable to execute HTTP request: Input stream cannot be reset as 5365760 bytes have been written, exceeding the available buffer size of 131072

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.IOException

      put Destination [bucketName=xxxx, objectName=yyyy_master-471_2014-06-05_17-45-08/yyyy_dist-Linux-x86_64.tgz]: com.amazonaws.AmazonClientException: Encountered an exception and couldn't reset the stream to retry

      at hudson.plugins.s3.S3Profile.upload()
    2. hudson.plugins.s3
      S3BucketPublisher.perform
      1. hudson.plugins.s3.S3Profile.upload(S3Profile.java:90)
      2. hudson.plugins.s3.S3BucketPublisher.perform(S3BucketPublisher.java:144)
      2 frames
    3. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
      4. hudson.model.Build$BuildExecution.post2(Build.java:183)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:725)
      6. hudson.model.Run.execute(Run.java:1701)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      8. hudson.model.ResourceController.execute(ResourceController.java:88)
      9. hudson.model.Executor.run(Executor.java:231)
      9 frames