Sudo certbot certonly --apache error + jq: error (at <stdin>:0): Cannot iterate over null (null)

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., so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: and

I ran this command: sudo certbot certonly --apache

It produced this output: jq: error (at :0): Cannot iterate over null (null)

My web server is (include version):
Server version: Apache/2.4.29 (Ubuntu)
Server built: 2018-10-03T14:41:08

The operating system my web server runs on is (include version): Ubuntu 18.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 -v
jq: error (at :0): Cannot iterate over null (null)

I installed SSL Certificate for … it was OK (last month).
Now there is another virtual host running on the server - . I need to create certificate for this domain also. Now whenever I run sudo certbot certonly --apache … it says jq: error (at :0): Cannot iterate over null (null)

Please help.

1 Like

Seems similar to this post:

If so, please provide the following before making any changes:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic

$ snap version
snap    2.34.2+18.04
snapd   2.34.2+18.04
series  16
ubuntu  18.04
kernel  4.15.0-32-generic

$ sudo certbot --nginx
jq: error (at <stdin>:0): Cannot iterate over null (null)

Hey, I really appreciate you posting those details, thanks.

We still haven’t released a fix for this yet, but for now, you can fix this by upgrading snapd to the latest version available in Ubuntu 18.04 (currently 2.45):

sudo apt update && sudo apt install --only-upgrade snapd

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