简体   繁体   中英

Strange SSL error using docker and spring cloud

I have a strange problem using feign client in a spring cloud environment.

I use the feign client to connect to an external HTTPS url for a REST call. The problem is,that every night, server stops docker service to make a backup of volumes. After this,in the morning, i get

feign.RetryableException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target executing POST
  1. I thought that is about the certificate, so the first step was to import certificate with keytool into docker container java cacerts file (openjdk-8). (worked after restart of container but still got error in the morning)

  2. I was still losing the certificate during night so i created a persistent volume for the store(same result).

  3. I realized on a dev server that even without importing the certificate into container, i don't get the error anymore after restart of the docker container(just a docker restart {container} and nothing more).

So, each morning after restarting the container, everything runs smoothly.If i don't restart, i get the error. I would like to understand what is happening there so i am open to ideas. Thanks!

I had the same error, caused by root certificate version (unipass in my case). Check if you have the same root certificate as the client. Bring them to the same version (if they differ), and the error will disappear.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM