Certbot renew fails not finding mod_ssl.so

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:
certbot renew

It produced this output:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Processing /usr/local/etc/letsencrypt/renewal/mecadtron.de.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Saving debug log to /var/log/letsencrypt/letsencrypt.log Unable to read ssl_module file; not disabling session tickets. Renewing an existing certificate for mecadtron.de and [www.mecadtron.de](http://www.mecadtron.de) Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems: Domain: mecadtron.de Type: connection Detail: 95.217.187.226: Fetching http://mecadtron.de/.well-known/acme-challenge/RlBQenTXFFhC0qT8wWoHx0YSchyo44XgKg4COYXzezM: Connection refused Domain: [www.mecadtron.de](http://www.mecadtron.de) Type: connection Detail: 95.217.187.226: Fetching http://www.mecadtron.de/.well-known/acme-challenge/00Won9vFVkPeaDN1nT6Eq3zYKmX_7CtqRnB_RioNbRk: Connection refused Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet. Error while running apachectl graceful. apache24 not running? (check /var/run/httpd.pid). Unable to restart apache using ['apachectl', 'graceful'] Encountered exception during recovery: certbot.errors.MisconfigurationError: Error while running apachectl graceful. apache24 not running? (check /var/run/httpd.pid). Failed to renew certificate mecadtron.de with error: Some challenges have failed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - All renewals failed. The following certificates could not be renewed: /usr/local/etc/letsencrypt/live/mecadtron.de/fullchain.pem (failure) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 renew failure(s), 0 parse failure(s) 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.

My web server is (include version):
apache 2.4.56 (FreeBSD
)
The operating system my web server runs on is (include version):
FreeBSD FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC amd64
My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know):
yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel):
no
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
1.22.0

The certbot renew used to work for years. There was no manual change in the configuration, rather than an upgrade of apache from 2.4.54.

In the cletsencrypt.log file I can see that the script tries to read the mod_ssl.so file from
/usr/local/etc/apache24/libexec/apache24/mod_ssl.so
rather than from
/usr/local/libexec/apache24/mod_ssl.so
where it resides. Where does this change come from and what information uses certbot to search for the file?

Does 252776 – security/py-certbot-apache: Looking in wrong location for Apache ssl_module look familiar to you?

4 Likes

Yes, this seems to be the same problem.
The question would be: why did work properly for me the last 3 years and now stopped although nothing has changed in the configuration? (The only thing changed is that I updated apache from 2.4.54 to 2.4.56. Is this the root cause?)
...and the even more interesting question would be: How can I fix the problem?

I'm not sure why it would stop working. I don't have any experience working with FreeBSD.

I guess you could symlink the path it is expecting to find, or you could try undo the patch that the FreeBSD maintainers are applying:

3 Likes

I symlinked the missing path. The scripts seems to run a lillte bit longer but stops later. apparently it cannot restart apache.
When I start apache manually the certificate for our first domain (.de) seems to work, but not our secondary (.com)

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