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. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
Attempting to renew cert (happyhourmenu.ca) from /etc/letsencrypt/renewal/happyhourmenu.ca.conf produced an unexpected error: The nginx plugin is not working; there may be problems with your existing configuration.
The error was: NoInstallationError(). Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/happyhourmenu.ca/fullchain.pem (failure)
1 renew failure(s), 0 parse failure(s)
My web server is (include version): Nginx 1.10.3
The operating system my web server runs on is (include version): Ubuntu 16.04.4
My hosting provider, if applicable, is: DigitalOcean/self-hosted
I can login to a root shell on my machine (yes or no, or I don't know): Yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): No
The strange thing is that everything worked fine when I first installed the certificate, and the cron job has been auto-renewing it weekly since late July with no issues. This is the first time there's been a problem!
The following error was encountered:
[Errno 13] Permission denied: '/var/log/letsencrypt/.certbot.lock'
Either run as root, or set --config-dir, --work-dir, and --logs-dir to writeable paths.
I ran sudo /usr/bin/certbot renew got the following error:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Cert is due for renewal, auto-renewing...
Plugins selected: Authenticator nginx, Installer nginx
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Renewing an existing certificate
Performing the following challenges:
tls-sni-01 challenge for happyhourmenu.ca
nginx: [error] invalid PID number "" in "/run/nginx.pid"
Cleaning up challenges
nginx: [error] invalid PID number "" in "/run/nginx.pid"
Encountered exception during recovery
nginx restart failed:
b''
b''
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 124, in _sol ve_challenges
resp = self.auth.perform(all_achalls)
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 972, i n perform
self.restart()
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 787, i n restart
nginx_restart(self.conf('ctl'), self.nginx_conf)
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 1042, in nginx_restart
"nginx restart failed:\n%s\n%s" % (out.read(), err.read()))
certbot.errors.MisconfigurationError: nginx restart failed:
b''
b''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/certbot/error_handler.py", line 100, in _ca ll_registered
self.funcs-1
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 303, in _cle anup_challenges
self.auth.cleanup(achalls)
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 991, i n cleanup
self.restart()
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 787, i n restart
nginx_restart(self.conf('ctl'), self.nginx_conf)
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 1042, in nginx_restart
"nginx restart failed:\n%s\n%s" % (out.read(), err.read()))
certbot.errors.MisconfigurationError: nginx restart failed:
b''
b''
Attempting to renew cert (happyhourmenu.ca) from /etc/letsencrypt/renewal/happyhou rmenu.ca.conf produced an unexpected error: nginx restart failed:
b''
b''. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/happyhourmenu.ca/fullchain.pem (failure)
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/happyhourmenu.ca/fullchain.pem (failure)
Certbot can obtain and install HTTPS/TLS/SSL certificates. By default,
it will attempt to use a webserver both for obtaining and installing the
certificate.
certbot: error: unrecognized arguments: -preferred-challenges http
I think there was a typo in the command you provided; --preferred-challenges should have two dashes, correct? I tried sudo /usr/bin/certbot renew --nginx --preferred-challenges http and got this error:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Cert is due for renewal, auto-renewing...
Plugins selected: Authenticator nginx, Installer nginx
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for happyhourmenu.ca
Using default addresses 80 and [::]:80 ipv6only=on for authentication.
nginx: [error] invalid PID number "" in "/run/nginx.pid"
Cleaning up challenges
nginx: [error] invalid PID number "" in "/run/nginx.pid"
Encountered exception during recovery
nginx restart failed:
b''
b''
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 124, in _solve_challenges
resp = self.auth.perform(all_achalls)
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 972, in perform
self.restart()
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 787, in restart
nginx_restart(self.conf('ctl'), self.nginx_conf)
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 1042, in nginx_restart
"nginx restart failed:\n%s\n%s" % (out.read(), err.read()))
certbot.errors.MisconfigurationError: nginx restart failed:
b''
b''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/certbot/error_handler.py", line 100, in _call_registered
self.funcs-1
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 303, in _cleanup_challenges
self.auth.cleanup(achalls)
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 991, in cleanup
self.restart()
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 787, in restart
nginx_restart(self.conf('ctl'), self.nginx_conf)
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 1042, in nginx_restart
"nginx restart failed:\n%s\n%s" % (out.read(), err.read()))
certbot.errors.MisconfigurationError: nginx restart failed:
b''
b''
Attempting to renew cert (happyhourmenu.ca) from /etc/letsencrypt/renewal/happyhourmenu.ca.conf produced an unexpected error: nginx restart failed:
b''
b''. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/happyhourmenu.ca/fullchain.pem (failure)
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/happyhourmenu.ca/fullchain.pem (failure)
I would like to ask what happens when you try to restart nginx outside of Certbot, like with service nginx start. Do you get a more useful error? Is there something in the nginx error log?
Cert is due for renewal, auto-renewing...
Plugins selected: Authenticator nginx, Installer nginx
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for happyhourmenu.ca
Using default addresses 80 and [::]:80 ipv6only=on for authentication.
nginx: [error] invalid PID number "" in "/run/nginx.pid"
Cleaning up challenges
nginx: [error] invalid PID number "" in "/run/nginx.pid"
Encountered exception during recovery
nginx restart failed:
b''
b''
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 124, in _solve_challenges
resp = self.auth.perform(all_achalls)
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 972, in perform
self.restart()
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 787, in restart
nginx_restart(self.conf('ctl'), self.nginx_conf)
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 1042, in nginx_restart
"nginx restart failed:\n%s\n%s" % (out.read(), err.read()))
certbot.errors.MisconfigurationError: nginx restart failed:
b''
b''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/certbot/error_handler.py", line 100, in _call_registered
self.funcs-1
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 303, in _cleanup_challenges
self.auth.cleanup(achalls)
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 991, in cleanup
self.restart()
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 787, in restart
nginx_restart(self.conf('ctl'), self.nginx_conf)
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 1042, in nginx_restart
"nginx restart failed:\n%s\n%s" % (out.read(), err.read()))
certbot.errors.MisconfigurationError: nginx restart failed:
b''
b''
Attempting to renew cert (happyhourmenu.ca) from /etc/letsencrypt/renewal/happyhourmenu.ca.conf produced an unexpected error: nginx restart failed:
b''
b''. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/happyhourmenu.ca/fullchain.pem (failure)
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/happyhourmenu.ca/fullchain.pem (failure)
1 renew failure(s), 0 parse failure(s)
Also show /etc/letsencrypt/renewal/happyhourmenu.ca.conf
Here are the contents of my /etc/letsencrypt/renewal/happyhourmenu.ca.conf, as requested:
When I run sudo service nginx start, I get this error:
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
My nginx error log contains:
2018/12/11 11:51:11 [notice] 31231#31231: signal process started
2018/12/11 11:51:11 [error] 31231#31231: invalid PID number "" in "/run/nginx.pid"
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 11:51:11 [emerg] 31232#31232: still could not bind()
2018/12/11 11:51:14 [notice] 31233#31233: signal process started
2018/12/11 11:51:14 [error] 31233#31233: invalid PID number "" in "/run/nginx.pid"
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 11:51:14 [emerg] 31234#31234: still could not bind()
2018/12/11 12:09:09 [notice] 31304#31304: signal process started
2018/12/11 12:09:09 [error] 31304#31304: invalid PID number "" in "/run/nginx.pid"
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:09:09 [emerg] 31305#31305: still could not bind()
2018/12/11 12:09:12 [notice] 31306#31306: signal process started
2018/12/11 12:09:12 [error] 31306#31306: invalid PID number "" in "/run/nginx.pid"
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:09:12 [emerg] 31307#31307: still could not bind()
2018/12/11 12:20:56 [notice] 31418#31418: signal process started
2018/12/11 12:20:56 [error] 31418#31418: invalid PID number "" in "/run/nginx.pid"
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:20:56 [emerg] 31419#31419: still could not bind()
2018/12/11 12:20:59 [notice] 31420#31420: signal process started
2018/12/11 12:20:59 [error] 31420#31420: invalid PID number "" in "/run/nginx.pid"
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 12:20:59 [emerg] 31421#31421: still could not bind()
2018/12/11 13:46:21 [notice] 31699#31699: signal process started
2018/12/11 13:46:21 [error] 31699#31699: invalid PID number "" in "/run/nginx.pid"
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 13:46:21 [emerg] 31700#31700: still could not bind()
2018/12/11 13:46:24 [notice] 31701#31701: signal process started
2018/12/11 13:46:24 [error] 31701#31701: invalid PID number "" in "/run/nginx.pid"
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 13:46:24 [emerg] 31702#31702: still could not bind()
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to [::]:443 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: bind() to [::]:80 failed (98: Address already in use)
2018/12/11 13:57:39 [emerg] 31796#31796: still could not bind()
Let's find out what is using those addresses and if these two pid path results match:
Please show: netstat -pant | grep -i listen | grep -E ':80|:443' grep -Ri 'nginx.pid' /etc/nginx/ grep -Ri 'nginx.pid' /usr/lib/systemd/
So, nginx is already running on those ports when...
Which explains why you can't start it (again):
Let's refocus on this (and ignore chasing the wild geese):
Try and show outcome of: sudo service nginx restart
[[ It should show something like: ]]
[[ "Redirecting to /bin/systemctl restart nginx.service" ]]
If this restart fails, lets hit it with a bigger hammer - LOL...
Then try:
[pay no attention to the word "kill" - it will restart automatically]
[notice the numbers in the output (after LISTEN) - they should have changed from before to after the "kill"]
This may be another stray goose, but also try to find which pid number is being used: find / -name nginx.service
Sorry for disappearing! Life got busy for a few days.
I ran sudo service nginx restart and got the following output:
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
I ran netstat -pant | grep -i listen | grep -E ':80|:443' and got the following output: