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

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

    Details

    • Similar Issues:

      Description

      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)
      

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Carlos Sanchez
            Path:
            src/main/java/io/jenkins/plugins/artifact_manager_s3/JCloudsArtifactManager.java
            http://jenkins-ci.org/commit/artifact-manager-s3-plugin/83fa8293cbedf76accb9ae2142dec57e87bd9169
            Log:
            JENKINS-51402 Presigned url has the wrong region

            when running from a different one

            *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

            Functionality will be removed from GitHub.com on January 31st, 2019.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Carlos Sanchez Path: src/main/java/io/jenkins/plugins/artifact_manager_s3/JCloudsArtifactManager.java http://jenkins-ci.org/commit/artifact-manager-s3-plugin/83fa8293cbedf76accb9ae2142dec57e87bd9169 Log: JENKINS-51402 Presigned url has the wrong region when running from a different one * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Carlos Sanchez
            Path:
            src/main/java/io/jenkins/plugins/artifact_manager_s3/JCloudsArtifactManager.java
            http://jenkins-ci.org/commit/artifact-manager-s3-plugin/478e2e7778db19c48ef0a19742a72ed45a418c4c
            Log:
            JENKINS-51402 setFollowRedirects is not necessary

            *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

            Functionality will be removed from GitHub.com on January 31st, 2019.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Carlos Sanchez Path: src/main/java/io/jenkins/plugins/artifact_manager_s3/JCloudsArtifactManager.java http://jenkins-ci.org/commit/artifact-manager-s3-plugin/478e2e7778db19c48ef0a19742a72ed45a418c4c Log: JENKINS-51402 setFollowRedirects is not necessary * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ivan Fernandez Calvo
            Path:
            README.md
            src/main/java/io/jenkins/plugins/artifact_manager_s3/S3BlobStore.java
            http://jenkins-ci.org/commit/artifact-manager-s3-plugin/333330c5cfbad0ff4e421f7e19db6ca13d6bbfcf
            Log:
            JENKINS-51402 Presigned url has the wrong region (#29)

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

            *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

            Functionality will be removed from GitHub.com on January 31st, 2019.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ivan Fernandez Calvo Path: README.md src/main/java/io/jenkins/plugins/artifact_manager_s3/S3BlobStore.java http://jenkins-ci.org/commit/artifact-manager-s3-plugin/333330c5cfbad0ff4e421f7e19db6ca13d6bbfcf Log: JENKINS-51402 Presigned url has the wrong region (#29) Presigned url has the wrong region when running from a different one * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: