Can you reproduce the command line options youâve used getting the certificate? Especially if you used certonly for example?
It could be your certbot didnât use the nginx installer plugin, so your nging wasnât reloaded. It could also be your nginx configuration is pointing to the wrong certificate.
You have two certs with that FQDN in it (mail.bankvictoriasyariah.co.id).
One is still active and could be used for that name right away - may require restart/reload.
The other was REVOKED and may be still in use (somewhere)
Revokes should never happen within normal operations - why did the REVOKE happen?
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter âcâ to cancel): 1
Cert not yet due for renewal
You have an existing certificate that has exactly the same domains or certificate name you requested and isnât close to expiry.
(ref: /etc/letsencrypt/renewal/mail.bankvictoriasyariah.co.id-0001.conf)
What would you like to do?
1: Keep the existing certificate for now
2: Renew & replace the cert (limit ~5 per 7 days)
Select the appropriate number [1-2] then [enter] (press âcâ to cancel): 1
Keeping the existing certificate
Certificate not yet due for renewal; no action taken.
Two days ago i started to renew manually by doing certbot renew and i panic because there are 2 certificates, like below
root@root:/etc/letsencrypt/live# ls -l
total 12
drwxr-xr-x 2 root root 4096 Dec 13 12:21 mail.bankvictoriasyariah.co.id [ the first one ]
drwxr-xr-x 2 root root 4096 Dec 19 10:00 mail.bankvictoriasyariah.co.id-0001
then i delete by doing rm for mail.bankvictoriasyariah.co.id-0001
re run certbot dryrun and gives and error for mail.bankvictoriasyariah.co.id
so i revoke and try to delete by doing certbot delete --cert-name example.com but failed
later on, i manage to find out the error by editing site default
root@root:/etc/letsencrypt/live# nginx -T | grep ssl_cert
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
ssl_certificate /etc/letsencrypt/live/mail.bankvictoriasyariah.co.id/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/mail.bankvictoriasyariah.co.id/privkey.pem; # managed by Certbot
Iâm not sure, but it think iâm using the mail.bankvictoriasyariah.co.id cert
You are right, iâm not using webmail.bankvictoriasyariah.co.id, how to remove it ?
When i try to renew with certbot renew or dryrun it will gives me error -> nginx restart failed, so i changed the path from run/nginx.pid to /opt/zimbra/log/nginx.pid
If that doesn't fix it, then we are modifying the wrong nginx
Which is most likely the case.
The cert in use has a completely different expiry date from the two shown above:
Hahaha⌠Will modify in 5 minutes later, what if i want to change the status of the revoked certificated so it will be usable again, is there a command to unrevoked the certificates ?
You should probably read through this (you might find what you need towards the end).
Or review how the last cert was installed/previously renewed.
Try: history
and su zimbra history
When i try to reload nginx, it shows that nginx hasnât start
root@root:/etc/nginx# service nginx reload
nginx.service is not active, cannot reload.
root@root:/etc/nginx# service nginx start
Job for nginx.service failed because the control process exited with error code. See âsystemctl status nginx.serviceâ and âjournalctl -xeâ for details.
root@root:/etc/nginx# systemctl status nginx.service
â nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-12-19 13:54:30 WIB; 13s ago
Process: 14342 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Process: 14336 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Dec 19 13:54:29 mail nginx[14342]: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
Dec 19 13:54:29 mail nginx[14342]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Dec 19 13:54:29 mail nginx[14342]: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
Dec 19 13:54:30 mail nginx[14342]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Dec 19 13:54:30 mail nginx[14342]: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
Dec 19 13:54:30 mail nginx[14342]: nginx: [emerg] still could not bind()
Dec 19 13:54:30 mail systemd[1]: nginx.service: Control process exited, code=exited status=1
Dec 19 13:54:30 mail systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Dec 19 13:54:30 mail systemd[1]: nginx.service: Unit entered failed state.
Dec 19 13:54:30 mail systemd[1]: nginx.service: Failed with result âexit-codeâ.
root@root:/etc/nginx# service nginx start
Job for nginx.service failed because a timeout was exceeded. See âsystemctl stat us nginx.serviceâ and âjournalctl -xeâ for details.
root@root:/etc/nginx# systemctl status nginx.service
â nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since Thu 2019-12-19 14:05:23 WIB; 14s ago
Process: 19572 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 19568 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Dec 19 14:03:53 mail systemd[1]: Starting A high performance web server and a reverse proxy serverâŚ
Dec 19 14:03:53 mail systemd[1]: nginx.service: PID file /run/nginx.pid not readable (yet?) after start: No such file or directory
Dec 19 14:05:23 mail systemd[1]: nginx.service: Start operation timed out. Terminating.
Dec 19 14:05:23 mail systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Dec 19 14:05:23 mail systemd[1]: nginx.service: Unit entered failed state.
Dec 19 14:05:23 mail systemd[1]: nginx.service: Failed with result âtimeoutâ.
It seems i canât start nginx because the change i made in nginx.conf not to listen /run/nginx.pid