Nginx: [emerg] open() "/etc/letsencrypt/le_http_01_cert_challenge.conf" failed (2: No such file or directory) in /etc/nginx/nginx.conf:12

I had to unplug my server in the middle of a TLS certification renewal and now I’m getting this error, I’m not sure what I can do to fix it…

Waiting for verification...
Cleaning up challenges
nginx: [emerg] open() "/etc/letsencrypt/le_http_01_cert_challenge.conf" failed (2: No such file or directory) in /etc/nginx/nginx.conf:12
Encountered exception during recovery:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/certbot/", line 108, in _call_registered
  File "/usr/lib/python3/dist-packages/certbot/", line 323, in _cleanup_challenges
  File "/usr/lib/python3/dist-packages/certbot_nginx/", line 1090, in cleanup
  File "/usr/lib/python3/dist-packages/certbot_nginx/", line 881, in restart
    nginx_restart(self.conf('ctl'), self.nginx_conf)
  File "/usr/lib/python3/dist-packages/certbot_nginx/", line 1141, in nginx_restart
    "nginx restart failed:\n%s\n%s" % (,
certbot.errors.MisconfigurationError: nginx restart failed:
Using default addresses 80 and [::]:80 ipv6only=on for authentication.
nginx: [warn] conflicting server name "" on, ignored
nginx: [warn] conflicting server name "" on [::]:80, ignored
Waiting for verification...
1 Like

Hi @martinszeltins

checking that domain: is for sale

Looks like you aren’t the domain owner, so you can’t create a certificate.

1 Like

@JuergenAuer I didn’t want to expose my actual domain, so I used an example domain instead.

You should probably correct any errors in your nginx config. I assume certbot wrote something there and it stayed there after you powered the machine back on. There should be lockfiles too…

certbot --nginx rollback can be an option

@9peppe I tried the rollback and it showed this…

Error while running nginx -c /etc/nginx/nginx.conf -t.

nginx: [emerg] open() "/etc/letsencrypt/le_http_01_cert_challenge.conf" failed (2: No such file or directory) in /etc/nginx/nginx.conf:12
nginx: configuration file /etc/nginx/nginx.conf test failed

edit this file, comment out the offending lines.

1 Like

@9peppe Thanks, I removed the include lines from /etc/nginx/nginx.conf that it couldn’t find and it seems like it solved the problem, it’s working now!

1 Like

there can be other similar leftovers, check your config

1 Like

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