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

          joshuaspence Joshua Spence created issue -
          jimilian Alexander A made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          kcpublic Kevin Chen made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          kcpublic Kevin Chen made changes -
          Priority Major [ 3 ] Blocker [ 1 ]
          jimilian Alexander A made changes -
          Attachment s3.hpi [ 33112 ]
          jimilian Alexander A made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 170274 ] JNJira + In-Review [ 198827 ]

            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: