NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
23.42k stars 2.72k forks source link

No module named certbot #3701

Open milkywayfarer opened 7 months ago

milkywayfarer commented 7 months ago

Checklist

Describe the bug Any of the attempts to renew or create Let's Encrypt certificates is met with the error No module named 'certbot'. Everything worked before then suddenly stopped after a restart. Docker image was not modified in any way, I'm running vanilla.

Nginx Proxy Manager Version v2.11.1

To Reproduce Steps to reproduce the behavior:

  1. Go to NPM and create a proxy host, request a certificate for it
  2. Go to Kubernetes log and see an error:
[4/15/2024] [7:44:58 AM] [SSL      ] › ℹ  info      Renewing Let'sEncrypt certificates for Cert #3: domain
[4/15/2024] [7:44:58 AM] [SSL      ] › ℹ  info      Command: certbot renew --force-renewal --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-3" --preferred-challenges "dns,http" --no-random-sleep-on-renew --disable-hook-validation 
[4/15/2024] [7:44:58 AM] [Global   ] › ⬤  debug     CMD: certbot renew --force-renewal --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-3" --preferred-challenges "dns,http" --no-random-sleep-on-renew --disable-hook-validation 
[4/15/2024] [7:44:58 AM] [SSL      ] › ✖  error     Traceback (most recent call last):
File "/opt/certbot/bin/certbot", line 5, in <module>
from certbot.main import main
ModuleNotFoundError: No module named 'certbot'
2024-04-15T12:44:58.775440460+05:00
[4/15/2024] [7:44:58 AM] [SSL      ] › ℹ  info      Completed SSL cert renew process
[4/15/2024] [7:49:05 AM] [Nginx    ] › ⬤  debug     Deleting file: /data/nginx/default_host/site.conf
[4/15/2024] [7:49:05 AM] [Nginx    ] › ⬤  debug     Could not delete file: {
"errno": -2,
"code": "ENOENT",
"syscall": "unlink",
"path": "/data/nginx/default_host/site.conf"
}
[4/15/2024] [7:49:05 AM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -t -g "error_log off;"
[4/15/2024] [7:49:05 AM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -t -g "error_log off;"
[4/15/2024] [7:49:05 AM] [Nginx    ] › ℹ  info      Reloading Nginx

Expected behavior

Expect it to work again without needing to install certbot by hand.

Operating System FreeBSD/Docker

milkywayfarer commented 7 months ago

UPD: Fixed by running this set of instructions on the running container. I believe I do not need to do this myself :)

thebigbone commented 7 months ago

I am running the same version and I haven't had any issues with certbot (ubuntu server). Could it be a BSD problem?

github-actions[bot] commented 1 month ago

Issue is now considered stale. If you want to keep it open, please comment :+1: