mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 01:45:54 +03:00
[GH-ISSUE #1816] Renew now on SSL Certificates page gives internal error #1340
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#1340
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 @gent99 on GitHub (Jan 27, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1816
I'm on v2.9.15 and have a problem with "renew now" on SSL Certificates tab. I get internal error. Tried with different certs for different proxy hosts. Need more info, then please tell me where to find the needed logs.
@H4nSolo commented on GitHub (Jan 28, 2022):
Here ist my Log about the Error:
@PavelkaDavid commented on GitHub (Jan 29, 2022):
Hi, I have been solving this too. I don't know why, but some of my certificates cannot be renewed as it outputs "Connection refused" for acme-challenge as shown on the picture.
If this happens, than after each restart of NPM there is stuck processes as shown on the next image, that results in "Another instance of Certbot is already running."
If you kill these processes, than you can create new certificate for these domains and it will work as it should (renew will not work). Then go to your host and assign the new certificate to it. Than you can delete the old one.
After these changes is done, you can try to restart your NPM and see if there is still that processes. If not, than you are OK and you can ensure yourself by issuing renew.
Hope this helps and I am looking forward for this to be fixed. I don't know what cause this, but it happends on all of my 4 NPM installs for only some domains.
@gent99 commented on GitHub (Jan 31, 2022):
where can i find those logs?
in npm/data/logs i find
letsencrypt-requests_access.log
letsencrypt-requests_error.log
letsencrypt-requests.log
but they don't show me any errors like in your posts
@PavelkaDavid commented on GitHub (Feb 1, 2022):
I have found this log here: /var/log/letsencrypt/letsencrypt.log
@Gh0stRocket commented on GitHub (Feb 6, 2022):
Hi,
I have created a bash script which will fix the error. It creates symbolic links for all required files and optionally deletes the old *.pem files. For me it fixed the problem:
Just go to your
/etc/letsencrypt/livedirectory, create a script and paste the content below.touch /etc/letsencrypt/live/fix.shMake it exectuable:
chmod +x /etc/letsencrypt/live/fix.shAnd run it:
cd /etc/letsencrypt/live/ && ./fix.shAt the end of the script you will be asked if you want to delete the old files which are no longer needed.
After running the script restart your nginxproxymanager instance.
@cptskippy commented on GitHub (Mar 24, 2022):
For anyone experiencing this issue, I was able to fix my setup using the following steps:
After doing the above steps for each of my Proxy Hosts, they can be renewed from the GUI. I'm not sure if Auto-renew will work but I guess I'll find out in a couple months.
I don't know what caused the problem or if it will come back but at least for now it appears to be working.
@Waldorf3 commented on GitHub (Sep 15, 2022):
This just create an "Internal error", no new cert.
@TheFreeman commented on GitHub (Oct 25, 2022):
The same on my side.
Any new suggestions?
@abdros commented on GitHub (Apr 10, 2023):
I had the same issue and solved it by adding a DNS CAA record for the HOST.MYDOMAIN.TLD and setting letsencrypt.org as an authorized certificate provider (I use EasyDNS).
What made me think of this was an email that letsencrypt had sent some time ago regarding this soon-to-come requirement from DNS providers.
Nginx Proxy Manager v2.7.1
Hope this helps others.
@AlmightyJojo commented on GitHub (Jun 10, 2023):
npm 2.10.1. Out of nowhere expired certs + symlink error on npm startup. Internal error in GUI. Godaddy DNS challenge cert
Gh0stRocket script did indeed fix renewal and all existing proxy hosts updated. Whew.
What's not clear is fix symlink creation is permanent fix or not. Believe it is...This renewal issue with either npm / certbot really could use some attention.
@github-actions[bot] commented on GitHub (Feb 25, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@Palmdale95 commented on GitHub (Mar 16, 2024):
For me the issue is still there:
Failed to renew certificate npm-1 with error: Some challenges have failed.
Failed to renew certificate npm-2 with error: Some challenges have failed.
Failed to renew certificate npm-3 with error: Some challenges have failed.
Failed to renew certificate npm-4 with error: Some challenges have failed.
All renewals failed. The following certificates could not be renewed:
/etc/letsencrypt/live/npm-1/fullchain.pem (failure)
/etc/letsencrypt/live/npm-2/fullchain.pem (failure)
/etc/letsencrypt/live/npm-3/fullchain.pem (failure)
/etc/letsencrypt/live/npm-4/fullchain.pem (failure)
4 renew failure(s), 0 parse failure(s)
@deMathias commented on GitHub (Jul 3, 2024):
I just get internal error in NPM gui when trying to renew wildcard cert (*.domain.ltd)
@Reetryyy commented on GitHub (Aug 12, 2024):
I encountered the same issue when trying to renew certificates using the NPM GUI. Removing the certificate that failed to renew and requesting new ones resolved the problem for me.
@timguy99 commented on GitHub (Oct 25, 2024):
Same issue for me but following these steps seemed to work. Be nice to see this fixed though so we don't have to do things manually.
@justanotherdude48 commented on GitHub (Nov 19, 2024):
I'm seeing this issue still. I need to pull the logs... which I will do shortly. The suggested fix still produced an 'internal error'. In fact, trying to renew the cert and following these instructions above has made it where I'm not longer able to connect to the site due to 'SSL_ERROR_UNRECOGNIZED_NAME_ALERT'
I had to go back and manually assign the old cert to get it up again.
I deleted the working cert and attempted to manually create a new one. Received the following error in the gui.
Error: Command failed: certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-6" --agree-tos --authenticator webroot --email "xxxxxxxxxxx" --preferred-challenges "dns,http" --domains "xxxxxxxxx"
Saving debug log to /tmp/letsencrypt-log/letsencrypt.log
Some challenges have failed.
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.
@Palmdale95 commented on GitHub (Nov 19, 2024):
Every 2-3 month the same procedure for all hosts. It just does not work automatically. I'am really evaluating to give zoraxy a try because this is really annoying.
@justanotherdude48 commented on GitHub (Nov 19, 2024):
Interestingly enough this started working, but I can't tell you why.
I was running certbot -v renew commands in CLI from the docker container and it was throwing errors like....:
"Certbot failed to authenticate some domains "
"Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded from the internet."
So i verified the DNS records again, my port forwarding, etc. Everything seemed good. I basically kept fiddling with nginx until suddenly the renew button from the site settings itself just worked all of a sudden. A previous reboot hadn't helped either. Its a mystery
@joanjgm commented on GitHub (Dec 1, 2024):
This Fixed it! Thanks!
@FloStar3000 commented on GitHub (Dec 23, 2024):
Be careful when running this script! It made my NGINX proxy manager container crash upon restart!
Please read the script and understand what it does before running it.
It did not work for me in the first place and because most of my
archive/npm-xxfolders did not havechain1.pem,privkey1.pemetc. but for some reason, it started withchain2.pemetc. in most of the folders. You need to update the script so it does not point to thechain1.pemetc. but to one that exists or create the links manually, as i did for one folder. If there are symlinks in the live folder that point to a non existing file, proxy manager refuses to start.After dealing with that, it fixed my issue, thanks!
@KiddRedd commented on GitHub (Dec 24, 2024):
Experienced this last year and just yesterday. I was able to renew OTHER certificates, and request for new certificates (without challenge). But three particular ones kept giving "Internal Error". I figure to look inside the docker container and didn't see anything out of the ordinary...
The problem is resolved by deleting the old certificate and requesting a new one. No changes were made to the docker instance, the DNS of the domain or changes to my network configuration. Just happens out of nowhere, lol.
@bisand commented on GitHub (Jan 20, 2025):
I also struggled with this, but fixed it with a bash script slightly different from the one created by @Gh0stRocket (Thanks!). The script reads all the *.pem files from the folder structure inside the /etc/letsencrypt/archive folder and creates the same folder structure inside the /etc/letsencrypt/live folder, containing a symbolic link to the latest version of the corresponding archive *.pem file. (See example at the bottom)
The script will take a backup of all npm-* folders inside /etc/letsencrypt/live folder and then delete the same folders. The backup file is called live.tar.gz and is placed inside the parent directory.
Just go to your /etc/letsencrypt/live directory, create a script and paste the content below.
Make it exectuable:
And run it:
./fix.sh script
Example content of one of the npm-* folders after running the script:
@leonbohmann commented on GitHub (Feb 18, 2025):
For me the root of the issue is the "Force SSL" switch. Lets Encrypt seems to rely on HTTP requests to find the ACME. So when choosing to force SSL the automatic renew does not work because HTTP is not allowed.
Still, every couple of months I have to renew my certificates by disabling the Force SSL option, renewing the certificate manually in the "SSL Certificates" Tab an then enabling the option again.
Thinking about switching to Traefik. I did the renewing a couple of times now and it gets annoying.
@gent99 commented on GitHub (Feb 19, 2025):
@leonbohmann HTTP has to be allowed for the npm Server's IP from the outside and not for the proxy hosts. NPM is contacting ACME and not the proxy hosts. So Force SSL option is irrelevant in this case.
@leonbohmann commented on GitHub (Feb 19, 2025):
Interesting. As soon as I disable the Force SSL the renew works for me. What might be the issue then?
@Palmdale95 commented on GitHub (Feb 19, 2025):
Ok, so if I understand correctly then this should normaly work, if set for the npm?
@gent99 commented on GitHub (Feb 19, 2025):
If "npm" means one of your proxy hosts and not npm itself, yes.
@Palmdale95 commented on GitHub (Feb 19, 2025):
ok. I have this set for every proxy host.
@leonbohmann commented on GitHub (Feb 25, 2025):
Nice, if I enable HTTP/2 Support it works for me
I dont need to.disable the force ssl.
Thank you!
@BadWolf97 commented on GitHub (Apr 9, 2025):
I can confirm that trying to renew the certificate with "Force SSL" fails (according to the access.log, the request is Sent to the underlaying service)
If I disable the Option, the renewal process works fine.
Version v2.12.3
@ftoledo commented on GitHub (May 12, 2025):
any news to fix this bus at docker level image?
@ftoledo commented on GitHub (May 12, 2025):
I confirm too that disabling Force SSL from Gui let it work.
@W1BTR commented on GitHub (Sep 4, 2025):
Would love to have automatic renewal working again, as that's one of the big goals of npm - anyone figured out a way to accomplish this?
@iChifau commented on GitHub (Jan 24, 2026):
Whats the update on this?
@4fd81048-Brian commented on GitHub (Feb 1, 2026):
NPM 2.13.6 and my certificates started expiring. Turning off Force SSL for each proxy host allowed them to renew.