Skip to content

Error renewing and re-adding SSL Certificates #2233

@mandilpradhan

Description

@mandilpradhan

Hello folks.

I'm experiencing a bizarre situation with the Let's Encrypt SSL Certificates on my NGINX Proxy Manager. It is installed on a Ubuntu VM (on Docker / Portainer using JC21 compose file) on my Proxmox server, and I am using DNS Challenge with a Cloudflare API to try to add the certificates. Ports 80 and 443 are forwarded and my services are reachable from outside my network.

  1. The certificates did not auto-renew like it was supposed to when it expired. (screenshot 1)
  2. I tried to manually renew them, but it failed with a simple "Internal Error" message. Nothing else. (screenshot 2)
  3. When I deleted the certs and tried to re-add again, it gave me an error (screenshot 3) with the following error message:
Error: Command failed: certbot certonly --config "/etc/letsencrypt.ini" --cert-name "npm-6" --agree-tos --email "[email protected]" --domains "*.mydomain.net" --authenticator dns-cloudflare --dns-cloudflare-credentials "/etc/letsencrypt/credentials/credentials-6"
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Missing command line flag or config entry for this setting:
Please choose an account
Choices: ['c28983dcd32f@2022-06-07T04:34:33Z (781b)', 'c749392dabf7@2022-03-23T09:49:55Z (8a24)']
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

    at ChildProcess.exithandler (node:child_process:399:12)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

Full logs for the error listed on # 3: https://pastebin.com/V5eQugEN

  1. I removed the existing install of NGINX Proxy Manager and fired up a fresh install, and was able to add SSL certs for both MYDOMAIN.NET as well as *.MYDOMAIN.NET without any issues. (screenshot 4)
  2. However, when I removed the SSL certs mentioned above and re-add them again to the same installation (screenshot 5), I got this error message:
Error: Command failed: /usr/sbin/nginx -t -g "error_log off;"
nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/npm-1/fullchain.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/npm-1/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

    at ChildProcess.exithandler (node:child_process:399:12)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

Full logs for the error listed on # 5 : https://pastebin.com/8Th8sCJn

Any help on this would be much appreciated!

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions