To fix these errors, please make sure that your domain name was
entered correctly and the DNS A record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you’re using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
If you add a file ( such as “test” with plain acsii text “success” in it ) to {webroot}/.well-known/acme-challenge/test can you reach it in a general browser from the internet ( not one specifically whitelisted ) at site.co.uk/.well-known/acme-challenge/test ?
Can you place a test file in {webroot}/.well-known/acme-challenge on that account please ( at the moment I get redirected to https, then redirected to www. but then I get a 404, file not found)
going back to your original post, there seem to be 2 things, which may or not be connected.
Initially, you say that it works when run on the command line, and fails when run as a cron. This strikes me as either a permissions of path / environment variable issue.
Your second post is about the DNS issue … there was a DNS issue yesterday at the letsencrypt side. Was this just a temporary issue whilst you were testing ? and possibly no longer an issue ?
Here is a section that I thought was interesting.
2016-07-03 06:00:05,860:INFO:certbot.renewal:Cert is due for renewal, auto-renewing…
2016-07-03 06:00:05,878:DEBUG:certbot.plugins.selection:Requested authenticator apache and installer apache
2016-07-03 06:00:05,940:DEBUG:certbot.plugins.disco:No installation (PluginEntryPoint#apache):
Traceback (most recent call last):
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/plugins/disco.py”, line 105, in prepare
self._initialized.prepare()
File “/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot_apache/configurator.py”, line 161, in prepare
raise errors.NoInstallationError
NoInstallationError
So from what I gather for some reason it thinks Apache isn’t installed when the cron job runs.
The cron job is running as root, so it shouldn’t be any permission issues.
Ok, so no longer just happening when run as a cron for you. From the original post you say “If I run /opt/letsencrypt/letsencrypt-auto renew in the CLI the renewal works just fine.”
Can you ensure you are using the latest version of certbot, with verbose mode, and paste the log please ( it may be easier to paste it in pastebin.com )