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

Presigned url has the wrong region when running from a different one

XMLWordPrintable

      testing the big-file example the unarchive fails because the region selected is wrong, my EC2 instance and bucket are in us-west-2, but the request is made for us-east-1

            stage('Unarchive') {
              unarchive mapping: ["${file}": 'CentOS-7-x86_64-DVD-1505-01-unarchived.iso']
            }
      
      hudson.remoting.ProxyException: org.jclouds.aws.AWSResponseException: request GET https://my-bucket.s3.amazonaws.com/?prefix=cmm02/artifacts/big-file/3/artifacts/ HTTP/1.1 failed with code 400, error: AWSError{requestId='489396EF7035020C', requestToken='XXXXXXX=', code='AuthorizationHeaderMalformed', message='The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-west-2'', context='{Region=us-west-2, HostId=XXXXXXX=}'}
      	at org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:75)
      	at org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
      	at org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:140)
      	at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:109)
      	at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
      	at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
      	at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
      	at org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(DelegatesToInvocationFunction.java:156)
      	at org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(DelegatesToInvocationFunction.java:123)
      	at com.sun.proxy.$Proxy131.listBucket(Unknown Source)
      	at org.jclouds.s3.blobstore.S3BlobStore.list(S3BlobStore.java:175)
      	at io.jenkins.plugins.artifact_manager_s3.JCloudsBlobStore$PageSetIterable.advanceList(JCloudsBlobStore.java:321)
      	at io.jenkins.plugins.artifact_manager_s3.JCloudsBlobStore$PageSetIterable.<init>(JCloudsBlobStore.java:285)
      	at io.jenkins.plugins.artifact_manager_s3.JCloudsBlobStore.listStorageMetadata(JCloudsBlobStore.java:191)
      	at io.jenkins.plugins.artifact_manager_s3.JCloudsBlobStore.run(JCloudsBlobStore.java:365)
      	at jenkins.util.VirtualFile.list(VirtualFile.java:195)
      	at jenkins.util.VirtualFile.list(VirtualFile.java:178)
      	at org.jenkinsci.plugins.workflow.steps.ArtifactUnarchiverStepExecution.run(ArtifactUnarchiverStepExecution.java:45)
      	at org.jenkinsci.plugins.workflow.steps.ArtifactUnarchiverStepExecution.run(ArtifactUnarchiverStepExecution.java:20)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49)
      	at hudson.security.ACL.impersonate(ACL.java:290)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	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)
      

            ifernandezcalvo Ivan Fernandez Calvo
            ifernandezcalvo Ivan Fernandez Calvo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: