My domain is: barbour.io
I ran this command: certbot renew
It produced this output:
[karl@barbour-io ~]$ sudo certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log
-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/hynes.barbour.io.conf
-------------------------------------------------------------------------------
Cert is due for renewal, auto-renewing...
Error while running nginx -c /etc/nginx/nginx.conf -t.
nginx: [emerg] BIO_new_file("/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed
Could not choose appropriate plugin: The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] BIO_new_file("/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(\'/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt\',\'r\') error:2006D080:BIO routines:BIO_new_file:no such file)\nnginx: configuration file /etc/nginx/nginx.conf test failed\n',)
Attempting to renew cert (hynes.barbour.io) from /etc/letsencrypt/renewal/hynes.barbour.io.conf produced an unexpected error: The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] BIO_new_file("/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(\'/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt\',\'r\') error:2006D080:BIO routines:BIO_new_file:no such file)\nnginx: configuration file /etc/nginx/nginx.conf test failed\n',). Skipping.
-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/ip.barbour.io.conf
-------------------------------------------------------------------------------
Cert is due for renewal, auto-renewing...
Error while running nginx -c /etc/nginx/nginx.conf -t.
nginx: [emerg] BIO_new_file("/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed
Could not choose appropriate plugin: The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] BIO_new_file("/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(\'/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt\',\'r\') error:2006D080:BIO routines:BIO_new_file:no such file)\nnginx: configuration file /etc/nginx/nginx.conf test failed\n',)
Attempting to renew cert (ip.barbour.io) from /etc/letsencrypt/renewal/ip.barbour.io.conf produced an unexpected error: The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] BIO_new_file("/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(\'/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt\',\'r\') error:2006D080:BIO routines:BIO_new_file:no such file)\nnginx: configuration file /etc/nginx/nginx.conf test failed\n',). Skipping.
-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/ts.barbour.io.conf
-------------------------------------------------------------------------------
Cert is due for renewal, auto-renewing...
Error while running nginx -c /etc/nginx/nginx.conf -t.
nginx: [emerg] BIO_new_file("/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed
Could not choose appropriate plugin: The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] BIO_new_file("/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(\'/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt\',\'r\') error:2006D080:BIO routines:BIO_new_file:no such file)\nnginx: configuration file /etc/nginx/nginx.conf test failed\n',)
Attempting to renew cert (ts.barbour.io) from /etc/letsencrypt/renewal/ts.barbour.io.conf produced an unexpected error: The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] BIO_new_file("/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(\'/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt\',\'r\') error:2006D080:BIO routines:BIO_new_file:no such file)\nnginx: configuration file /etc/nginx/nginx.conf test failed\n',). Skipping.
-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/barbour.io.conf
-------------------------------------------------------------------------------
Cert is due for renewal, auto-renewing...
Error while running nginx -c /etc/nginx/nginx.conf -t.
nginx: [emerg] BIO_new_file("/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed
Could not choose appropriate plugin: The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] BIO_new_file("/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(\'/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt\',\'r\') error:2006D080:BIO routines:BIO_new_file:no such file)\nnginx: configuration file /etc/nginx/nginx.conf test failed\n',)
Attempting to renew cert (barbour.io) from /etc/letsencrypt/renewal/barbour.io.conf produced an unexpected error: The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] BIO_new_file("/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(\'/var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt\',\'r\') error:2006D080:BIO routines:BIO_new_file:no such file)\nnginx: configuration file /etc/nginx/nginx.conf test failed\n',). Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/hynes.barbour.io/fullchain.pem (failure)
/etc/letsencrypt/live/ip.barbour.io/fullchain.pem (failure)
/etc/letsencrypt/live/ts.barbour.io/fullchain.pem (failure)
/etc/letsencrypt/live/barbour.io/fullchain.pem (failure)
-------------------------------------------------------------------------------
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/hynes.barbour.io/fullchain.pem (failure)
/etc/letsencrypt/live/ip.barbour.io/fullchain.pem (failure)
/etc/letsencrypt/live/ts.barbour.io/fullchain.pem (failure)
/etc/letsencrypt/live/barbour.io/fullchain.pem (failure)
-------------------------------------------------------------------------------
4 renew failure(s), 0 parse failure(s)
My web server is (include version): nginx version: nginx/1.12.1 (Ubuntu)
The operating system my web server runs on is (include version): Ubuntu 17.10
My hosting provider, if applicable, is: digitalocean
I can login to a root shell on my machine: yes
I’m using a control panel to manage my site: no
As you can see from the output, I am missing a file in /var/lib/letsencrypt/cDnQNtCiVpE8cnsSaHNow9PKxV4l4oUvf-_dt8eZAkk.crt
This is, in fact, true:
[root@barbour-io letsencrypt]# ls /var/lib/letsencrypt/*.crt
/var/lib/letsencrypt/G9P1nEdzjCa8pRhQjLy7kXNWYUKb-K-51dk1XmhAEms.crt /var/lib/letsencrypt/mw2w3-Zq6J4By9a3Y2l31SHi4TK2srrphYfqh2mI74A.crt
How do I resolve the error, please?