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

Failed to reset the request input stream

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: s3-plugin
    • Labels:
      None
    • Environment:
      s3-plugin 0.9.2
    • Similar Issues:

      Description

      After upgrading the S3 plugin to version 0.9.2 we are seeing S3 uploads fail intermittently. Below is a stack trace (with some details redacted):

      ```
      Publish artifacts to S3 Bucket Using S3 profile: REDACTED
      Publish artifacts to S3 Bucket bucket=REDACTED, file=9fc530ed8ac7866e6cfcc5132c34614b1e5e6dbd region=us-east-1, upload from slave=false managed=false , server encryption false
      Publish artifacts to S3 Bucket bucket=REDACTED, file=master region=us-east-1, upload from slave=false managed=false , server encryption false
      ERROR: Failed to upload files
      java.io.IOException: Call fails for Destination [bucketName=REDACTED, objectName=REDACTED]: com.amazonaws.ResetException: Failed to reset the request input stream; If the request involves an input stream, the maximum stream buffer size can be configured via request.getRequestClientOptions().setReadLimit(int):: Failed after 1 tries.
      at hudson.plugins.s3.S3Profile.repeat(S3Profile.java:220)
      at hudson.plugins.s3.S3Profile.upload(S3Profile.java:145)
      at hudson.plugins.s3.S3BucketPublisher.perform(S3BucketPublisher.java:193)
      at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
      at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      at hudson.model.Build$BuildExecution.post2(Build.java:185)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
      at hudson.model.Run.execute(Run.java:1763)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:410)
      Caused by: com.amazonaws.ResetException: Failed to reset the request input stream; If the request involves an input stream, the maximum stream buffer size can be configured via request.getRequestClientOptions().setReadLimit(int)
      at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:755)
      at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:576)
      at com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:362)
      at com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:328)
      at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:307)
      at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3659)
      at com.amazonaws.services.s3.AmazonS3Client.doUploadPart(AmazonS3Client.java:2795)
      at com.amazonaws.services.s3.AmazonS3Client.uploadPart(AmazonS3Client.java:2780)
      at com.amazonaws.services.s3.transfer.internal.UploadCallable.uploadPartsInSeries(UploadCallable.java:255)
      at com.amazonaws.services.s3.transfer.internal.UploadCallable.uploadInParts(UploadCallable.java:189)
      at com.amazonaws.services.s3.transfer.internal.UploadCallable.call(UploadCallable.java:121)
      at com.amazonaws.services.s3.transfer.internal.UploadMonitor.call(UploadMonitor.java:139)
      at com.amazonaws.services.s3.transfer.internal.UploadMonitor.call(UploadMonitor.java:47)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.io.IOException: Resetting to invalid mark
      at java.io.BufferedInputStream.reset(BufferedInputStream.java:448)
      at com.amazonaws.internal.SdkBufferedInputStream.reset(SdkBufferedInputStream.java:106)
      at com.amazonaws.internal.SdkFilterInputStream.reset(SdkFilterInputStream.java:102)
      at com.amazonaws.event.ProgressInputStream.reset(ProgressInputStream.java:139)
      at com.amazonaws.internal.SdkFilterInputStream.reset(SdkFilterInputStream.java:102)
      at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:753)
      ... 16 more
      Build step 'Publish artifacts to S3 Bucket' changed build result to UNSTABLE
      ```

      The file being uploaded is a 450MB tarball.

        Attachments

          Activity

          Hide
          kcpublic Kevin Chen added a comment -

          Figured it out by going to the "Advanced" tab and uploading. Running jobs now. Crossing fingers.

          The only other issue is that the plugin version is "0.10.6-SNAPSHOT (private-ea6f0d94-jim)". I hope this doesn't interfere with us receiving future versions.

          Show
          kcpublic Kevin Chen added a comment - Figured it out by going to the "Advanced" tab and uploading. Running jobs now. Crossing fingers. The only other issue is that the plugin version is "0.10.6-SNAPSHOT (private-ea6f0d94-jim)". I hope this doesn't interfere with us receiving future versions.
          Hide
          kcpublic Kevin Chen added a comment -

          Installed it and ran a build. No errors and verified our S3 artifact got deployed.

          I hope the snapshot version above doesn't hinder us.

          Show
          kcpublic Kevin Chen added a comment - Installed it and ran a build. No errors and verified our S3 artifact got deployed. I hope the snapshot version above doesn't hinder us.
          Hide
          joshuaspence Joshua Spence added a comment -

          Ah sorry about that. I'm not a Java developer and I think that this was my first PR for a Java project too.

          Show
          joshuaspence Joshua Spence added a comment - Ah sorry about that. I'm not a Java developer and I think that this was my first PR for a Java project too.
          Hide
          joshuaspence Joshua Spence added a comment -

          Strangely, version 0.10.5 works fine for us on Jenkins 2.9.

          Show
          joshuaspence Joshua Spence added a comment - Strangely, version 0.10.5 works fine for us on Jenkins 2.9.
          Hide
          jimilian Alexander A added a comment -

          Solved in 0.10.5.1

          Show
          jimilian Alexander A added a comment - Solved in 0.10.5.1

            People

            • Assignee:
              jimilian Alexander A
              Reporter:
              joshuaspence Joshua Spence
            • Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: