We are getting this below exception when we hit our URL by Java class (as we are using Let’s Encrypt certificate). javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
As our server is at Digital Ocean and we created a docker container there. Our application is running inside docker container. we checked SSL things at digital Ocean by using below command and it connects successfully. curl -k https://www.cwamessagingservice.com/ curl --insecure -v https://www.cwamessagingservice.com/ 2>&1 | awk 'BEGIN { cert=0 } /^* Server certificate:/ { cert=1 } /^*/ { if (cert) print }'
We also used SSLPoke class and we are not getting any exception
java SSLPoke www.cwamessagingservice.com 443 It gives us
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=cp1252
Successfully connected
Hi Juergen,
Thanks for quick response. We created one certificate with both domain names (non-www and www) and used that certificate, but still getting the same SSL Handshake issue.
Is there something which i am missing ?