I am using Nginx Proxy Manager in a Docker Container, which worked perfectly fine up until this point.
Whenever I try to create a new SSL for a new Host, I get this error:
CommandError: Saving debug log to /tmp/letsencrypt-log/letsencrypt.log
An unexpected error occurred:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='acme-v02.api.letsencrypt.org', port=443): Max retries exceeded with url: /directory (Caused by NameResolutionError(": Failed to resolve 'acme-v02.api.letsencrypt.org' ([Errno -3] Temporary failure in name resolution)"))
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/letsencrypt-log/letsencrypt.log or re-run Certbot with -v for more details.
at /app/lib/utils.js:16:13
at ChildProcess.exithandler (node:child_process:430:5)
at ChildProcess.emit (node:events:519:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5)
And I dont really know what to do? Not sure what other info to state here. But creating hosts and getting SSL certificates has always worked.
I even recreated the Nginx Docker Container with their docker compose, and now I unfortunately have no hosts running anymore, which is not ideal haha.
Please fix the DNS resolving capabilities of the container that's running your NPM. Or somewhere else within the NPM environment or perhaps your server.
This is not a Let's Encrypt or ACME specific issue, but a generic "I can't resolve hostnames using DNS" problem.
They were never broken, and I never changed anything. It worked fine until recently. Nothing of my DNS setting changes, and the server that runs the docker containers is able to do a dnslookup on the letsencrypt server.
If the host has internet connectivity, it doesn't mean the container does too. You need to check inside the container itself to see if it has internet access or if DNS is working.
Based on my experience with Docker, most likely your container is in bridge mode, and that mode needs specific NAT firewall rules to allow internet access. So it might happen that those NAT rules are gone on the host — the host still has internet, but not your container.
So, bottom line: check inside the container that it can resolve acme-v02.api.letsencrypt.org
I assumed you probably did, but I also like to assume the simplest and dumbest interpretation possible for everything. A lot of people never realize there are 2 repos, and all the relevant docs and configs are in that second "hidden" repo. Just wanted to make sure you knew about it.