org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to retrieve remote metadata org.example:my-artifact:5-SNAPSHOT/maven-metadata.xml: Could not transfer metadata org.example:my-artifact:5-SNAPSHOT/maven-metadata.xml from/to example-snapshots (https://archiva.example.org/repository/example-snapshots): hostname in certificate didn't match: <archiva.example.org> != <example.com> OR <example.com> OR <www.example.com>

Google Groups | chee...@gmx.net (JIRA) | 2 months ago
  1. 0

    [JIRA] (JENKINS-38738) Maven plugin does not use SNI with SSL maven repos

    Google Groups | 2 months ago | chee...@gmx.net (JIRA)
    org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to retrieve remote metadata org.example:my-artifact:5-SNAPSHOT/maven-metadata.xml: Could not transfer metadata org.example:my-artifact:5-SNAPSHOT/maven-metadata.xml from/to example-snapshots (https://archiva.example.org/repository/example-snapshots): hostname in certificate didn't match: <archiva.example.org> != <example.com> OR <example.com> OR <www.example.com>
  2. 0

    Dropbox bundle failing to start/authenticate in v1.3

    GitHub | 3 years ago | openhab-migration
    javax.net.ssl.SSLException: hostname in certificate didn't match: <api.dropbox.com/108.160.162.54> != <*.dropbox.com>
  3. 0

    Indirect Apache HttpClient and javax.net.ssl.SSLException: hostname in certificate didn't match

    Stack Overflow | 3 years ago | Radek S
    javax.net.ssl.SSLException: hostname in certificate didn't match: &lt;172.16.2.152> !=
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    SSLException when server cert uses SAN (Subject Alternative Name)

    Stack Overflow | 6 years ago | Alex Wise
    javax.net.ssl.SSLException: hostname in certificate didn't match: &lt;mtvniph1-f.akamaihd.net&gt; != &lt;a248.e.akamai.net&gt;
  6. 0

    Find or initialize the keystore needed to solve "hostname in certificate didn't match"

    Stack Overflow | 2 years ago | Atl LED
    javax.net.ssl.SSLException: hostname in certificate didn't match error. It's our hope to patch this temporarily while we write the replacement. I've read several SO questions on the mater (eg 1, 2, 3, 4) and it seemed like Will Sargent's solution was the best choice. Unfortunately I'm going into the server with utterly no documentation or returned email from the group that set it up (luckily none of the Java was obfuscated per policy). I looked for any keystore files (searching for "keystore" in the file name or .jks files), but I didn't find any. Which lead me think that I needed to make a new one and initialize it prior to calling the webClient.getPage. So far I have been able to make the .jks file just fine, it's just it doesn't change the hostname match error. Is there a way to see what keystore if any is being used by a servlet, and what its location happens to be? Alternatively, what is the proper way to make a new one and have it be used/initialized? Additional Details There are a few things about this that are odd to me. The main one is I don't understand why the hostname wouldn't be correct. The site being pulled is https://www.ncbi.nlm.nih.gov/account/ which if you navigate to it in a browser certainly pulls the correct certificate. I'm wondering if it's because the WebClient(BrowserVersion.FIREFOX_17) is set to the archaic FIREFOX_17. Should I just change that from 17 to 31? There are plenty of things that could be upgraded, but as we're going to start from scratch to have documentation, I want to change as little as possible on the old instance to hopefully keep it running for a few more months. The FIREFOX version installed on the server isn't close to current ether (not that it's used), but I was thinking changing the BrowserVersion just changed how the reply was formatted. Here is the code, ending on the line throwing the error: private Vector updateRDLpubs(Vector orderList, DataSource dataSource) throws Exception { Vector removeList = new Vector(); Vector historyList = new Vector(); try { SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy"); Calendar cal = Calendar.getInstance(); cal.add(5, -5); Date days5Back = cal.getTime(); WebClient webClient = new WebClient(BrowserVersion.FIREFOX_17); webClient.setThrowExceptionOnFailingStatusCode(false); HtmlPage page = (HtmlPage)webClient.getPage("https://www.ncbi.nlm.nih.gov/account/"); And here is the stack trace on the error: at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:227)

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.net.ssl.SSLException

      hostname in certificate didn't match: &lt;archiva.example.org&gt; != &lt;example.com&gt; OR &lt;example.com&gt; OR &lt;www.example.com&gt;

      at org.apache.http.conn.ssl.AbstractVerifier.verify()
    2. Apache HttpClient
      SSLSocketFactory.connectSocket
      1. org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:227)
      2. org.apache.http.conn.ssl.BrowserCompatHostnameVerifier.verify(BrowserCompatHostnameVerifier.java:54)
      3. org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:147)
      4. org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
      5. org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:437)
      5 frames
    3. org.apache.maven
      ConfigurableSSLSocketFactoryDecorator.connectSocket
      1. org.apache.maven.wagon.shared.http4.ConfigurableSSLSocketFactoryDecorator.connectSocket(ConfigurableSSLSocketFactoryDecorator.java:64)
      1 frame
    4. Apache HttpClient
      AbstractHttpClient.execute
      1. org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
      2. org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
      3. org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643)
      4. org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
      5. org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
      6. org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
      6 frames
    5. org.apache.maven
      AbstractHttpClientWagon.fillInputData
      1. org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:746)
      2. org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:886)
      2 frames
    6. Maven
      StreamWagon.get
      1. org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
      2. org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
      3. org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
      3 frames
    7. Aether Connector Wagon
      WagonRepositoryConnector$GetTask.run
      1. org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:660)
      1 frame
    8. Aether Utilities
      RunnableErrorForwarder$1.run
      1. org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
      1 frame
    9. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      3. java.lang.Thread.run(Thread.java:745)
      3 frames