It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Cert is due for renewal, auto-renewing...
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for bitstorm.org
http-01 challenge for www.bitstorm.org
Waiting for verification...
Challenge failed for domain bitstorm.org
Challenge failed for domain www.bitstorm.org
http-01 challenge for bitstorm.org
http-01 challenge for www.bitstorm.org
Cleaning up challenges
Some challenges have failed.
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
My web server is (include version):
Server version: Apache/2.4.41 (Ubuntu)
The operating system my web server runs on is (include version):
Ubuntu 20.04.1 LTS
I can login to a root shell on my machine (yes or no, or I don't know):
yes
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
certbot 0.40.0
Installed apache plugin: python3-certbot-apache
Strange thing is, sudo certbot plugins returns apache plugin, but logfile says:
2020-10-04 11:42:56,728:INFO:certbot.renewal:Cert is due for renewal, auto-renewing...
2020-10-04 11:42:56,728:INFO:certbot.renewal:Non-interactive renewal: random delay of 459.2428117522985 seconds
2020-10-04 11:50:36,068:DEBUG:certbot.plugins.selection:Requested authenticator apache and installer apache
2020-10-04 11:50:36,068:DEBUG:certbot.plugins.selection:No candidate plugin
2020-10-04 11:50:36,068:DEBUG:certbot.plugins.selection:No candidate plugin
2020-10-04 11:50:36,068:DEBUG:certbot.plugins.selection:Selected authenticator None and installer None
2020-10-04 11:50:36,068:INFO:certbot.main:Could not choose appropriate plugin: The requested apache plugin does not appear to be installed
2020-10-04 11:50:36,069:WARNING:certbot.renewal:Attempting to renew cert (bitstorm) from /etc/letsencrypt/renewal/bitstorm.conf produced an unexpected error: The requested apache plugin does not appear to be installed. Skipping.
It looks like this is a second issue, besides the first issue @JuergenAuer already addressed. The latter part of your post looks like it was started from a cronjob? Because it says "Non-interactive renewal". Could it be that certbot runs in a different environment?
EDIT: Without knowing anything else, I would say you might benefit from replacing your current certbot with the latest version from snaps.
[replace here means to properly apt remove the existing certbot and components first]
The output of /var/log/letsencrypt/letsencrypt.log is the same as mentioned earlier. So the same command that prints the existence of the apache plugin writes a log about missing the apache plugin.
I'm doubting that very much. Are you checking the correct log file? Because the log file in your first post showed a renewal attempt. That would never be in a certbot plugins command.