Swag container certbot command not found

Is anyone seeing this behavior from the latest swag container:

OS Suse Leap 15.4
Docker version: 20.10.23-ce

log message:

http validation is selected
Retrieving EAB from ZeroSSL
Generating new certificate
/etc/s6-overlay/s6-rc.d/init-certbot-config/run: line 317: certbot: command not found
ERROR: Cert does not exist! Please see the validation error above. The issue may be due to incorrect dns or port forwarding settings. Please fix your settings and recreate the container

This was working earlier today, made a change to remove a subdomain and started getting this message.

1 Like

Exactly the same here: changed a subdomain to another one, pulled the latest image (2.6.0) and got the exact same error.

Switched back to image version 2.5.0 and got it working.

i have the same error. i have swag running on an OMV server.

cronjob running on Mon Jun 26 08:41:39 CEST 2023
Running certbot renew
/app/le-renew.sh: line 9: certbot: command not found

are you using portainer to deploy your containers on OMV? if yes, see the link above your post. If not, share your docker compose (not portainer compose) and full container logs.

1 Like

Thank you! Yes, I use Portainer. But I will probably stop using it now. It is convenient, but unfortunately there are often small and big problems. And apparently I can’t fix the error either? I am still relatively new to Docker…

Figured out my issue was due to an underlying filesystem being used being mounted as ro. Didn’t notice until I stepped through the entire dmesg log. Fixed that and the container came up without issue.

Great news, glad you got it sorted!

I had the same issue today. Suddenly I could not reach my services, because the SSL certificates were not valid anymore. I had exactly the same message in the log files:

"/app/le-renew.sh: line 9: certbot: command not found"

I searched the filesystem for certbot and found it:

/lsiopy/bin/certbot

This folder is not in the $PATH and therefore the renew command did not work. Running

root@letsencrypt:/#/lsiopy/bin/certbot renew

fixed the issue for now. All my certificates where renewed. Somebody needs to fix this!

somebody needed to take 2min to read above their post, since the answer was already provided. We have nothing to do with portainer or synology, our only supported method to deploy a container are docker run, docker compose, and our unraid templates. Note, we do not mean “docker compose” in some ui, we mean pure docker compose as provided by docker.

The post is something like “we dont fix it”. It is okay, but not very helpful.

I added the following to the PATH ENV variable:

:/lsiopy/bin

My PATH-Enviroment variable now looks as the following:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/lsiopy/bin

This works for me. But I dont understand why do we need this on portainer… anybody knowlege about it?

1 Like

The why is already linked here Swag container certbot command not found - #10 by aptalca. TLDR, portainer treat variables poorly on updates.

1 Like