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

Artifactory Plugin - Artifact resolution failed with a circular redirection exception

XMLWordPrintable

      Description : We are using the Resolved Artifacts feature in our Jenkins jobs. It failed on a redirection exception even if the procedure is working in a browser and wget. The redirection is on the same host/dns but through SSL.
      Server Setup : We are using an Apache reverse proxy to handle SSL traffic and docker requests. A permanent redirection is in place to move HTTP requests to SSL. The reverse proxy map to the internal port the Artifactory service.
      Version :

      • Artifactory PRO 4.1.3
      • Jenkins 1.631
      • Jenkins Artifactory Plugin 2.3.1

      Expected Behavior : Following the redirection without exception
      Repro Rate : 100%
      Repro Step :

      • Jenkins (Error)
        • Create a freestyle job
        • Enable Generic-Artifactory Integration
        • Choose an HTTPS server (or a server with a redirection 301)
        • Choose a repository
        • Add an artifact to be resolve : engine-snapshot:com/xxx/iweditor/1.0.0/iweditor-1.0.0.zip
        • Save and run the job
        • The build will fail with a CircularRedirectException wrapped in a ClientProtocolException
      • Wget (Working)
        • wget http://artifacts.xxx.com/artifactory/engine-snapshot/com/xxx/iweditor/1.0.0/iweditor-1.0.0.zip
        • --2015-10-28 14:55:52--  http://artifacts.xxx.com/artifactory/engine-snapshot/com/xxx/iweditor/1.0.0/iweditor-1.0.0.zip
          Resolving artifacts.xxx.com (artifacts.xxx.com)... 10.0.0.38
          Connecting to artifacts.xxx.com (artifacts.xxx.com)|10.0.0.38|:80... connected.
          HTTP request sent, awaiting response... 301 Moved Permanently
          Location: https://artifacts.xxx.com/artifactory/engine-snapshot/com/xxx/iweditor/1.0.0/iweditor-1.0.0.zip [following]
          --2015-10-28 14:55:52--  https://artifacts.xxx.com/artifactory/engine-snapshot/com/xxx/iweditor/1.0.0/iweditor-1.0.0.zip
          Connecting to artifacts.xxx.com (artifacts.xxx.com)|10.0.0.38|:443... connected.
          HTTP request sent, awaiting response... 200 OK
      • Browser (Chrome, FF and Fiddler)

      Build Log

      Beginning to resolve Build Info published dependencies.
      Resolving published dependencies with pattern engine-snapshot:com/xxx/iweditor/1.0.0/iweditor-*.zip
      Found 1 dependencies by doing a pattern search.
      Downloading 'http://artifacts.xxx.com/artifactory/engine-snapshot/com/xxx/iweditor/1.0.0/iweditor-1.0.0.zip' ...
      ERROR: null
      org.apache.http.client.ClientProtocolException
      	at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:886)
      	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
      	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
      	at org.jfrog.build.client.PreemptiveHttpClient.execute(PreemptiveHttpClient.java:88)
      	at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryDependenciesClient.execute(ArtifactoryDependenciesClient.java:185)
      	at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryDependenciesClient.downloadArtifact(ArtifactoryDependenciesClient.java:170)
      	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.downloadArtifact(DependenciesDownloaderHelper.java:80)
      	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.downloadDependencies(DependenciesDownloaderHelper.java:40)
      	at org.jfrog.hudson.generic.DependenciesDownloaderImpl.download(DependenciesDownloaderImpl.java:49)
      	at org.jfrog.build.extractor.clientConfiguration.util.DependenciesHelper.retrievePublishedDependencies(DependenciesHelper.java:52)
      	at org.jfrog.hudson.generic.GenericArtifactsResolver.retrievePublishedDependencies(GenericArtifactsResolver.java:56)
      	at org.jfrog.hudson.generic.ArtifactoryGenericConfigurator.setUp(ArtifactoryGenericConfigurator.java:263)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:156)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
      	at hudson.model.Run.execute(Run.java:1741)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:408)
      Caused by: org.apache.http.client.CircularRedirectException: Circular redirect to 'https://artifacts.xxx.com/artifactory/engine-snapshot/com/xxx/iweditor/1.0.0/iweditor-1.0.0.zip'
      	at org.apache.http.impl.client.DefaultRedirectStrategy.getLocationURI(DefaultRedirectStrategy.java:176)
      	at org.apache.http.impl.client.DefaultRedirectStrategy.getRedirect(DefaultRedirectStrategy.java:220)
      	at org.apache.http.impl.client.DefaultRequestDirector.handleResponse(DefaultRequestDirector.java:1084)
      	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:515)
      	at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882)
      	... 17 more
      

            eyalbe Eyal Ben Moshe
            jcharest Jérémie Charest
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: