jlesage / docker-nginx-proxy-manager

Docker container for Nginx Proxy Manager
MIT License
785 stars 178 forks source link

Another instance of Certbot is already running #196

Open TheZoker opened 3 years ago

TheZoker commented 3 years ago

When I try to get a new certificate or renew a old one, I get an "Internal error": image

In the logs I have the following error:

[7/20/2021] [11:11:09 PM] [Express  ] › ⚠  warning   Command failed: certbot certonly --non-interactive --config "/etc/letsencrypt.ini" --cert-name "npm-23" --agree-tos --email "mail@mydomain.com" --preferred-challenges "dns,http" --domains "sub.mydomain.com" 
Another instance of Certbot is already running.

How can I solve this? Why is there another instance of certbot running?

Thanks!

jlesage commented 3 years ago

This should be a temporary error. Your other certificates are probably renewing in background ?

TheZoker commented 3 years ago

Hmm after reinstalling everything the error was gone back then, but it now happens again.

This user seems to have a similar issue: https://github.com/jlesage/docker-nginx-proxy-manager/issues/217

Do you have any idea how I can fix this?

jlesage commented 2 years ago

So is this a temporary error ? For example, are you able to create a certificate if you wait few hours ?

TheZoker commented 2 years ago

No once I get this error, I was not able to get a new certificate anymore. Only reinstallation worked

jlesage commented 2 years ago

Do you know how to reproduce this ? If not, the next time the problem occurs, could you run the following commands and provide their output:

docker exec <container name> ps
docker exec <container name> find /config
TheZoker commented 2 years ago

No unfortunately I don't know when/why it happens.

But as soon as it occurs again, I will run these commands and let you know the results! Thanks

timovp commented 2 years ago

I fixed this by doing the following: enter docker console running ps and seeing two (appearing the same) sh ./cert_cleanup processes image killed both with kill PID and then creating a new certificate worked :-) Hope this helps in finding what happened!

TheZoker commented 2 years ago

So today I had this issue again and actually the hint of @timovp did the trick.

I run ps and this was the output: image

After killing one of process with kill PID it worked again