adoptium / containers

Repo containing the dockerfiles and scripts to produce the official eclipse-temurin containers.
https://hub.docker.com/_/eclipse-temurin/
Apache License 2.0
206 stars 91 forks source link

[Bug]: SSL Error #401

Closed sravula84 closed 11 months ago

sravula84 commented 1 year ago

Please add the exact image (with tag) that you are using

eclispe-temurin:jdk17-jammy

Please add the version of Docker you are running

Docker version 24.0.1, build 6802122

What happened?

"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target". ClientConnectionId:9a1c4ac2-9682-4f17-8233-07dcdc6e4ead

using amd64/eclipse-temurin:17.0.7_7-jdk-jammy and below is the docker files steps

COPY resources/cacerts /opt/java/openjdk/lib/security/

Copying cacerts specific to Prosper needed by apt-get/curl to talk to Prosper servers

RUN ROOT_CERT_ADDR="https://artifactory.per.com/artifactory/packages/cacerts/RootCA.cer" && \ curl -LfsSo /usr/local/share/ca-certificates/rRootCA.cer "${ROOT_CERT_ADDR}" && \ chmod 644 /usr/local/share/ca-certificates/RootCA.cer && \ INTERMEDIATE_CERT_ADDR="https://artifactory.per.com/artifactory/packages/cacerts/IssuingCA.cer" && \ curl -LfsSo /usr/local/share/ca-certificates/IssuingCA.cer "${INTERMEDIATE_CERT_ADDR}" && \ chmod 644 /usr/local/share/ca-certificates/IssuingCA.cer

Run utility that will incorporate the new certs

RUN update-ca-certificates

error log

threw exception; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

Relevant log output

threw exception; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"
karianna commented 1 year ago

@sravula84 Does this work with images provided by other OpenJDK vendors?

tinder-ryantrontz commented 11 months ago

Also, is this issue possibly solved by #392?

karianna commented 11 months ago

392 is the solution to this and well be ready for the next PSU (Oct).