简体   繁体   中英

Renewed my SSL certificate but getting UNABLE_TO_VERIFY_LEAF_SIGNATURE in nodejs on AWS EC2 server

I have a nodejs/express api on a AWS EC2 server with a ssl certificate that is generated with Let's encrypt every 3 months. Auto renewal isn't on and we let it exipre before trying to renew but after renewing it we are getting an error saying:

Unable to verify the first certificate

or

UNABLE_TO_VERIFY_LEAF_SIGNATURE

depending on what we are testing with.

We are using Certbot for renewing with the following command (and not $ certbot renew ) :

$ sudo certbot certonly --dns-route53 -d *.example.com -d example.com --server https://acme-v02.api.letsencrypt.org/directory

Certificates are generated as expected with an expiration date 3 months from now.

Any ideas on what's going on ? I've tried most of the things I could find on SO and elsewhere but nothing worked.

PS Servers and I don't go along very well :/ (I do mobile app dev) so assume that I don't know anything when replying :D

Solution was quite easy, just needed to use the fullchain.pem file (and reboot your server if applicable).

Sidenote:

If someone on your team tells you that they've tested a solution and that it didn't work, don't just blindly trust them but test it yourself if all other possible solutions didn't work...(have lost 1+ day because someone thought they did test with the fullchain.pem (or did it wrongly)

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