Ubuntu 18.04 - certbot-auto renew fails

I had setup a mailserver and webserver on ubuntu 18.04 and get my certificate with certbot (certbot-auto). All works fine, but the auto renrew fails anytime.
I read the other topics, but this errors or solutions don’t help me, because i don’t have the paths or have other errors or so.

The error is:
###############
Attempting to renew cert (mail.XXXXXXXXX.eu) from /etc/letsencrypt/renewal/mail.eichner-regensburg.eu.conf produced an unexpected error: The nginx plugin is not working; there may be problems with your existing configuration.
The error was: NoInstallationError(“Could not find a usable ‘nginx’ binary. Ensure nginx exists, the binary is executable, and your PATH is set correctly.”,). Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/mail.XXXXXXXXXXXXX.eu/fullchain.pem (failure)
1 renew failure(s), 0 parse failure(s)

The command in “crontab -e” is:
@daily /opt/certbot-auto renew --quiet --no-self-upgrade --force-renewal && systemctl reload postfix dovecot nginx

[There is no line with 'Path= ’ or so in creontab]

My web server is (include version):
nginx version: nginx/1.14.0 (Ubuntu)

The operating system my web server runs on is (include version):
Description: Ubuntu 18.04.3 LTS

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):

certbot 0.23.0

The path of certbot-auto is “/opt/”. When i run certbot-auto --version, i get “command not found” but there is certbot-auto in /opt… (this is additional error i think).

How can i get the “auto renew” running.

I’m from germany. Hope my english is ok.

Thanks.

grep PATH /etc/crontab
command -v nginx

I found the solution.

There was an additional cron job in /etc/cron.d/certbot (i think automated created). I’m uncommented this cron job and now there is only my job in crontab (crontab -e):
@daily /opt/certbot-auto renew --quiet --no-self-upgrade && systemctl reload postfix dovecot nginx

Actually i don’t see any errors in /var/mail/root (like before), because there is actually no file called “root” in this folder as before. So i think all is ok.

But thanks for your reply.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.