Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-556

SNI Support when using Artifactory behind HTTPS

    Details

      Description

      When trying to deploy an artifact to artifactory behind HTTPS when there is more than one HTTPS site hosted on the same server/IP address the following error is thrown. This is because SNI support is needed.

      Need to update Apache HTTPClient/HttpComponents to 4.3.2+. I would recommend 4.3.5. See https://issues.apache.org/jira/browse/HTTPCLIENT-1119 for more info

      Issues raised here also;
      https://issues.jenkins-ci.org/browse/JENKINS-26403
      https://github.com/JFrogDev/build-info/issues/44 - this is where HttpClient is being used and needs to be upgraded

      This issue means that nothing can be deployed to Artifactory!!!

      Using versions;
      Jenkins = v1.585
      Jenkins Artifactory Plugin = v2.2.4
      Artifactory = v3.4.0

      Error:

      Deploying artifact: https://repo.build.coy.com/artifactory/cs-snapshot/au/com/coy/skynet/spark-fire_2.10/0.1.0-SNAPSHOT/spark-fire_2.10-0.1.0-SNAPSHOT-sources.jar
      ERROR: hostname in certificate didn't match: <repo.build.coy.com.au> != <docker.build.coy.com.au> OR <docker.build.coy.com.au> OR <www.docker.build.coy.com.au>
      javax.net.ssl.SSLException: hostname in certificate didn't match: <repo.build.coy.com.au> != <docker.build.coy.com.au> OR <docker.build.coy.com.au> OR <www.docker.build.coy.com.au>
      at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:227)
      at org.apache.http.conn.ssl.BrowserCompatHostnameVerifier.verify(BrowserCompatHostnameVerifier.java:54)
      at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:147)
      at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
      at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:437)
      at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
      at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
      at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643)
      at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
      at org.jfrog.build.client.PreemptiveHttpClient.execute(PreemptiveHttpClient.java:88)
      at org.jfrog.build.client.ArtifactoryHttpClient.execute(ArtifactoryHttpClient.java:193)
      at org.jfrog.build.client.ArtifactoryHttpClient.upload(ArtifactoryHttpClient.java:189)
      at org.jfrog.build.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:522)
      at org.jfrog.build.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:302)
      at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.deploy(GenericArtifactsDeployer.java:182)
      at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:154)
      at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:122)
      at hudson.FilePath.act(FilePath.java:918)
      at hudson.FilePath.act(FilePath.java:896)
      at org.jfrog.hudson.generic.GenericArtifactsDeployer.deploy(GenericArtifactsDeployer.java:82)
      at org.jfrog.hudson.generic.ArtifactoryGenericConfigurator$1.tearDown(ArtifactoryGenericConfigurator.java:276)
      at hudson.model.Build$BuildExecution.doRun(Build.java:171)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533)
      at hudson.model.Run.execute(Run.java:1759)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:89)
      at hudson.model.Executor.run(Executor.java:240)
      [WARNINGS] Skipping publisher since build result is FAILURE
      

      Here is an example fix for the similar issue in the StashNotifier plugin; https://github.com/jenkinsci/stashnotifier-plugin/pull/47/files

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                eyalbe Eyal Ben Moshe (Inactive)
                Reporter:
                nightwolfzor Night Wolf
              • Votes:
                3 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: