Skip to content

HTTPClient and SNI support. Causes Atrifactory plugin to fail on vaild SSL cert #44

@nightwolfzor

Description

@nightwolfzor

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.

Need to update Apache HTTPClient/HttpComponents to 4.3.2+. I would recommend 4.3.5.

This issue means that nothing can be deployed to Artifactory!!! The problem lies in this library.

See also: https://issues.jenkins-ci.org/browse/JENKINS-26403

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions