java.io.IOException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • {code} ERROR: Failed to upload files java.io.IOException: put Destination [bucketName=build, objectName=package-803.tar.gz]: com.amazonaws.services.s3.model.AmazonS3Exception: AWS authentication requires a valid Date or x-amz-date header (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: D99D949393A2563E), S3 Extended Request ID: hYQQbXJACOUu+iWyoHYwRycCvR2e0oRgjG2syW3l/rjjXjzxiae9gvHtzVGO6N11 at hudson.plugins.s3.S3Profile.upload(S3Profile.java:152) at hudson.plugins.s3.S3BucketPublisher.perform(S3BucketPublisher.java:174) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Build step 'Publish artifacts to S3 Bucket' changed build result to UNSTABLE {code} relates to: https://github.com/aws/aws-sdk-java/issues/484 https://github.com/aws/aws-sdk-java/issues/444 solution seems to be related to JodaTime package version dependency of the AWS SDK that was fixed with version 1.10.1 while plugin version 0.7 in Jenkins uses AWS SDK version 1.9.6.
    via by Roman Blachman,
  • {code} ERROR: Failed to upload files java.io.IOException: put Destination [bucketName=build, objectName=package-803.tar.gz]: com.amazonaws.services.s3.model.AmazonS3Exception: AWS authentication requires a valid Date or x-amz-date header (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: D99D949393A2563E), S3 Extended Request ID: hYQQbXJACOUu+iWyoHYwRycCvR2e0oRgjG2syW3l/rjjXjzxiae9gvHtzVGO6N11 at hudson.plugins.s3.S3Profile.upload(S3Profile.java:152) at hudson.plugins.s3.S3BucketPublisher.perform(S3BucketPublisher.java:174) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Build step 'Publish artifacts to S3 Bucket' changed build result to UNSTABLE {code} relates to: https://github.com/aws/aws-sdk-java/issues/484 https://github.com/aws/aws-sdk-java/issues/444 solution seems to be related to JodaTime package version dependency of the AWS SDK that was fixed with version 1.10.1 while plugin version 0.7 in Jenkins uses AWS SDK version 1.9.6.
    via by Roman Blachman,
  • 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
    via by Theral Mackey,
  • 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.
    via by Alexander Fortin,
  • 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}
    via by Joshua K,
  • Uploading to a EU bucket fails using the new version of S3 plugin (v0.4) with the error: ERROR: Failed to upload files java.io.IOException: put Destination [bucketName=xxxxxxxxxxxx, objectName=xxxxxxxxxxxx]: 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 at hudson.plugins.s3.S3Profile.upload(S3Profile.java:85) at hudson.plugins.s3.S3BucketPublisher.perform(S3BucketPublisher.java:143) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726) at hudson.model.Run.execute(Run.java:1618) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:247) Build step 'Publish artifacts to S3 Bucket' changed build result to UNSTABLE It seems that this happen when you access the wrong amazon endpoint. I've solved it temporarily for our setup by doing a: client.setEndpoint("s3-eu-west-1.amazonaws.com"); both places where AmazonS3Client is initialized in the S3 plugin (we only have EU buckets). There probably exist some easy way of querying for the correct endpoint for a more general solution.
    via by Stian Eikeland,
  • 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}
    via by Joshua K,
  • Uploading to a EU bucket fails using the new version of S3 plugin (v0.4) with the error: ERROR: Failed to upload files java.io.IOException: put Destination [bucketName=xxxxxxxxxxxx, objectName=xxxxxxxxxxxx]: 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 at hudson.plugins.s3.S3Profile.upload(S3Profile.java:85) at hudson.plugins.s3.S3BucketPublisher.perform(S3BucketPublisher.java:143) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726) at hudson.model.Run.execute(Run.java:1618) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:247) Build step 'Publish artifacts to S3 Bucket' changed build result to UNSTABLE It seems that this happen when you access the wrong amazon endpoint. I've solved it temporarily for our setup by doing a: client.setEndpoint("s3-eu-west-1.amazonaws.com"); both places where AmazonS3Client is initialized in the S3 plugin (we only have EU buckets). There probably exist some easy way of querying for the correct endpoint for a more general solution.
    via by Stian Eikeland,
    • java.io.IOException: put Destination [bucketName=build, objectName=package-803.tar.gz]: com.amazonaws.services.s3.model.AmazonS3Exception: AWS authentication requires a valid Date or x-amz-date header (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: D99D949393A2563E), S3 Extended Request ID: hYQQbXJACOUu+iWyoHYwRycCvR2e0oRgjG2syW3l/rjjXjzxiae9gvHtzVGO6N11 at hudson.plugins.s3.S3Profile.upload(S3Profile.java:152) at hudson.plugins.s3.S3BucketPublisher.perform(S3BucketPublisher.java:174) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408)
    No Bugmate found.