Auto renewal dry run failed - sequence item 2: expected string, NoneType found

Nginx / Ubuntu 14.04

When attempting a dry run of an auto renewal I get the following error:

Attempting to renew cert from /etc/letsencrypt/renewal/website.conf produced an unexpected error: sequence item 2: expected string, NoneType found. Skipping.

The conf file looks like this:

# renew_before_expiry = 30 days
version = 0.14.2
archive_dir = /etc/letsencrypt/archive/
cert = /etc/letsencrypt/live/
privkey = /etc/letsencrypt/live/
chain = /etc/letsencrypt/live/
fullchain = /etc/letsencrypt/live/

# Options used in the renewal process
authenticator = nginx
installer = nginx
account = 27898787c0c61990ca7d880fa11147de

Thanks in advance for any assistance…

Anyone? Still an issue for me

Hi @markdavies,

Maybe @schoen, @bmw or @erica could help here to debug the issue you are getting.

It should be great if you can provide them the following info.

1.- The version of certbot client you are using.

2.- The exact command you are executing, maybe adding --debug and -vvv and showing the screen output.

3.- The log created in /var/log/letsencrypt/letsencrypt.log

4.- The nginx conf for your domains.

I hope they can help you to resolve the issue.


It would also be good to know if you’ve created a cli.ini file (and, if so, what its contents are).

I got the same exception when called the following command:
./certbot-auto certonly --nginx --dry-run -d *domain-name*

Stack trace:
Exiting abnormally: Traceback (most recent call last): File "/home/poder/.local/share/letsencrypt/bin/letsencrypt", line 11, in <module> sys.exit(main()) File "/home/poder/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/", line 743, in main return config.func(config, plugins) File "/home/poder/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/", line 683, in certonly lineage = _get_and_save_cert(le_client, config, domains, certname, lineage) File "/home/poder/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/", line 82, in _get_and_save_cert lineage = le_client.obtain_and_enroll_certificate(domains, certname) File "/home/poder/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/", line 344, in obtain_and_enroll_certificate certr, chain, key, _ = self.obtain_certificate(domains) File "/home/poder/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/", line 313, in obtain_certificate self.config.allow_subset_of_names) File "/home/poder/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/", line 74, in get_authorizations resp = self._solve_challenges() File "/home/poder/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/", line 115, in _solve_challenges resp = self.auth.perform(self.achalls) File "/home/poder/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot_nginx/", line 809, in perform sni_response = chall_doer.perform() File "/home/poder/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot_nginx/", line 75, in perform"SNI Challenge", True) File "/home/poder/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot_nginx/", line 721, in save self.parser.filedump(ext='') File "/home/poder/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot_nginx/", line 239, in filedump out = nginxparser.dumps(tree) File "/home/poder/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot_nginx/", line 134, in dumps return str(RawNginxDumper(blocks.spaced)) File "/home/poder/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot_nginx/", line 98, in __str__ return ''.join(self) File "/home/poder/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot_nginx/", line 86, in __iter__ for line in self.__iter__([parameter]): # negate "for b0 in blocks" File "/home/poder/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot_nginx/", line 94, in __iter__ yield "".join(item) + semicolon TypeError: sequence item 2: expected string, NoneType found

Content of the item: ['ssl_certificate_key', ' ', None]

Version: 0.15.0

Without --dry-run the command ran flawlessly.

Sorry for the delayed response @tomako. We’ve been able to reproduce the problem and it will be fixed in our release at the beginning of next month. You can see the issue on our GitHub repo at

1 Like

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