mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #580] Unable to renew Let's Encrypt certificates #487
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#487
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Cilusse on GitHub (Aug 25, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/580
Checklist
jc21/nginx-proxy-manager:latestdocker image? YesDescribe the bug
To Reproduce
office.mydomain.com> RenewExpected behavior
Certificate gets renewed
Console output
(First line is the first try to renew, second and third lines are the second try)
8/25/2020] [8:47:20 PM] [SSL ] › ℹ info Renewing Let'sEncrypt certificates for Cert #1: office.mydomain.com [8/25/2020] [8:47:58 PM] [SSL ] › ℹ info Renewing Let'sEncrypt certificates for Cert #1: office.mydomain.com [8/25/2020] [8:47:59 PM] [Express ] › ⚠ warning Command failed: /usr/bin/certbot renew --non-interactive --config "/etc/letsencrypt.ini" --cert-name "npm-1" --preferred-challenges "dns,http" --disable-hook-validationAfter a while, the first renewal process fails too and this is printed to the console
Attempting to renew cert (npm-1) from /etc/letsencrypt/renewal/npm-1.conf produced an unexpected error: Failed authorization procedure. office.mydomain.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from https://mydomain.com [IPv6]: "<html>\r\n<head><title>404 Not Found</title></head>\r\n<body>\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx</center>\r\n". Skipping. All renewal attempts failed. The following certs could not be renewed: /etc/letsencrypt/live/npm-1/fullchain.pem (failure) 1 renew failure(s), 0 parse failure(s)Operating System
Additional context
When the process fails (second console paste), it says
Invalid response from https://mydomain.com, shouldn't that behttps://office.mydomain.cominstead ? Also the [IPv6] address shown is the one ofmydomain.comand notoffice.mydomain.com, it looks like the process is trying to renew a different domain.EDIT: I managed to renew all my other certificates, some of them even CNAMEs back to the same
office.mydomain.comsubdomain, proving that the DNS and ports are correctly opened and configured. Just that one subdomain doesn't want to get renewed (and it is due for renewal because I received an notification email from certbot)@Cilusse commented on GitHub (Aug 25, 2020):
SOLUTION
Apparently, it is impossible to renew a certificate for a domain that doesn't have a proxy host currently active.
I added a proxy host for that domain, pointing to a random server in my network, and it worked.
Certbot was probably confused because Nginx Proxy Manager is configured in Settings > Default Site, to redirect any request that doesn't have a proxy host to
mydomain.com.Probably a technically correct behaviour, but unexpected to me nonetheless.
I hope this auto-resolution can possibly help others in the same situation.