My domain is: work.delaat.net
I ran this command: from launchd for automated renewal: certbot renew
It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Cert is due for renewal, auto-renewing…
Non-interactive renewal: random delay of 57 seconds
Plugins selected: Authenticator apache, Installer apache
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for ipv4.worku.delaat.net
http-01 challenge for ipv6.worku.delaat.net
http-01 challenge for catch.work.delaat.net
http-01 challenge for work.delaat.net
http-01 challenge for worku.delaat.net
http-01 challenge for ipv6.work.delaat.net
http-01 challenge for ipv4.work.delaat.net
Cleaning up challenges
Attempting to renew cert (work.delaat.net-0001) from /etc/letsencrypt/renewal/work.delaat.net-0001.conf produced an unexpected error: Unable to find a virtual host listening on port 80 which is currently needed for Certbot to prove to the CA that you control your domain. Please add a virtual host for port 80… Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/work.delaat.net-0001/fullchain.pem (failure)
1 renew failure(s), 0 parse failure(s)
My web server is (include version): under homebrew apache: Server version: Apache/2.4.39 (Unix)
The operating system my web server runs on is (include version): MacOSX 10.14.6
My hosting provider, if applicable, is:do it myself on mac at home and at university
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):
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you’re using Certbot): certbot 0.36.0
Additional info:
The strange thing is that if I do the renew typing “sudo certbot renew” all goes fine.
For the automated renewal I created a plist
You can find that on https://delaat.net/setup
that I load with:
sudo launchctl load /Library/LaunchDaemons/com.letsencrypt.renew.plist
In an earlier try I got this from the debug log file:
2019-06-11 08:49:04,662:DEBUG:acme.client:Storing nonce: hlfmebzGmcAMbx_O93TXP2XEx3Codru6fQfmjQyFQtg
2019-06-11 08:49:04,663:INFO:certbot.auth_handler:Performing the following challenges:
2019-06-11 08:49:04,663:INFO:certbot.auth_handler:http-01 challenge for ipv6.ehw.delaat.net
2019-06-11 08:49:04,663:INFO:certbot.auth_handler:http-01 challenge for ehw.delaat.net
2019-06-11 08:49:04,664:INFO:certbot.auth_handler:http-01 challenge for eh.delaat.net
2019-06-11 08:49:04,664:INFO:certbot.auth_handler:http-01 challenge for catch.eh.delaat.net
2019-06-11 08:49:04,664:INFO:certbot.auth_handler:http-01 challenge for ipv6.eh.delaat.net
2019-06-11 08:49:04,687:DEBUG:certbot.error_handler:Encountered exception:
Traceback (most recent call last):
File “/usr/local/Cellar/certbot/0.35.0/libexec/lib/python3.7/site-packages/certbot/auth_handler.py”, line 69, in handle_authorizations
resps = self.auth.perform(achalls)
File “/usr/local/Cellar/certbot/0.35.0/libexec/lib/python3.7/site-packages/certbot_apache/configurator.py”, line 2264, in perform
http_response = http_doer.perform()
File “/usr/local/Cellar/certbot/0.35.0/libexec/lib/python3.7/site-packages/certbot_apache/http_01.py”, line 75, in perform
self._mod_config()
File “/usr/local/Cellar/certbot/0.35.0/libexec/lib/python3.7/site-packages/certbot_apache/http_01.py”, line 110, in _mod_config
for vh in self._relevant_vhosts():
File “/usr/local/Cellar/certbot/0.35.0/libexec/lib/python3.7/site-packages/certbot_apache/http_01.py”, line 165, in _relevant_vhosts
" {0}.".format(http01_port))
certbot.errors.PluginError: Unable to find a virtual host listening on port 80 which is currently needed for Certbot to prove to the CA that you control your domain. Please add a virtual host for port 80.
So why can it find vhosts in the cli mode but not when invoked via a launchd.
Best regards,
Cees