I have a problem in Nginx when applying a security certificate to a duckdns.org domain; I have tried several times but I keep getting the message "internal error"
The error that appears in the Nginx logs is the following:
[3/15/2024] [4:05:37 PM] [Global ] › ⬤ debug CMD: certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-32" --agree-tos --authenticator webroot --email "xxxxxxx@gmail.com" --preferred-challenges "dns,http" --domains "xxxxxxxx.duckdns.org"
[3/15/2024] [4:05:48 PM] [Nginx ] › ⬤ debug Deleting file: /data/nginx/temp/letsencrypt_32.conf
[3/15/2024] [4:05:48 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;"
[3/15/2024] [4:05:48 PM] [Nginx ] › info Reloading Nginx
[3/15/2024] [4:05:48 PM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -s reload
[3/15/2024] [4:05:48 PM] [Express ] › warning 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("<urllib3.connection.HTTPSConnection object at 0x7fa55cd93ed0>: 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.
Can someone help me solve this problem, the ports on my router are open correctly but the error keeps appearing and I don't know how to solve it. Thank you so much!!
I can view the webs indicated above without any problem.
I explain to you in more detail; I have a minipc with docker installed and from there I manage the containers with portainer. One of the containers is pi-hole for which I use the static IP of the mini PC as the primary DNS server so that it filters all the advertising.
But I don't know what the problem is due to, the router ports are wide open...
I have tried again to create the security certificate and then assign it to a duckdns domain and it still gives me an error
This is the error that appears when trying to create the Letsencrypt certificate:
CommandError: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/certbot-dns-duckdns/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/certbot-dns-duckdns/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/certbot-dns-duckdns/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/certbot-dns-duckdns/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/certbot-dns-duckdns/
ERROR: Could not find a version that satisfies the requirement certbot-dns-duckdns~=0.9 (from versions: none)
ERROR: No matching distribution found for certbot-dns-duckdns~=0.9
at /app/lib/utils.js:16:13
at ChildProcess.exithandler (node:child_process:430:5)
at ChildProcess.emit (node:events:518:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5)
Can someone help me solve this problem, I don't know how to solve it...
That is a failure of your DNS resolver. The NPM system you are using is difficult to debug. Your problem is probably a wrong configuration of that. You might try asking on the NPM support forum. (nginx is great, NPM not so much).
Start by reviewing the output of those two commands. Just saying "I can view the webs" is not enough for us to know what to say. If you have NPM running Certbot in a container be sure to run those commands in the same container.
We are not the NPM support forum. Maybe someone else here will help you with the DNS setup but I would only refer you to the NPM forum
My only other advice is you may need to choose a different product. If this becomes too difficult for you to manage you should find something that suits your skills better. Maybe a hosting service that takes care of most of the technical parts to allow you to focus on your content or whatever you plan.