root@ip-172-31-47-28:~# /opt/letsencrypt/certbot-auto renew
Your system is not supported by certbot-auto anymore.
certbot-auto and its Certbot installation will no longer receive updates.
You will not receive any bug fixes including those fixing server compatibility
or security problems.
Please visit https://certbot.eff.org/ to check for other alternatives.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Attempting to parse the version 1.12.0 renewal configuration file found at /etc/letsencrypt/renewal/library.mominoun.com.conf with version 1.9.0 of Certbot. This might not work.
Cert is due for renewal, auto-renewing...
Could not choose appropriate plugin: The manual plugin is not working; there may be problems with your existing configuration.
The error was: PluginError('An authentication script must be provided with --manual-auth-hook when using the manual plugin non-interactively.',)
Attempting to renew cert (library.mominoun.com) from /etc/letsencrypt/renewal/library.mominoun.com.conf produced an unexpected error: The manual plugin is not working; there may be problems with your existing configuration.
The error was: PluginError('An authentication script must be provided with --manual-auth-hook when using the manual plugin non-interactively.',). Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/library.mominoun.com/fullchain.pem (failure)
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/library.mominoun.com/fullchain.pem (failure)
(You'll notice that there's a next to your username indicating that it has been 2 years since you joined our community.)
As for the trouble you're facing, you're trying to use the manual authenticator with the renew command, which won't work unless you supply scripts via hook parameters to setup and cleanup the necessary challenge(s).
So, I did a little digging and it looks like GoDaddy is both the registrar and DNS provider for mominoun.com. As GoDaddy DNS plugin support is currently very limited for certbot, let's try something else first.
root@ip-172-31-47-28:~# sudo certbot certonly --nginx -d "library.mominoun.com" --dry-run
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Simulating renewal of an existing certificate for library.mominoun.com
The dry run was successful.
root@ip-172-31-47-28:~#
root@ip-172-31-47-28:~#
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
root@ip-172-31-47-28:~# systemctl status nginx.service
● nginx.service - nginx - high performance web server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en
Active: failed (Result: exit-code) since Fri 2021-06-04 19:02:46 UTC; 1min 5s
Docs: nginx documentation
Process: 4759 ExecStop=/bin/kill -s TERM $MAINPID (code=exited, status=0/SUCCE
Process: 5172 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited,
Main PID: 18940 (code=exited, status=0/SUCCESS)
Jun 04 19:02:45 ip-172-31-47-28 nginx[5172]: nginx: [emerg] bind() to [::]:443 f
Jun 04 19:02:46 ip-172-31-47-28 nginx[5172]: nginx: [emerg] bind() to 0.0.0.0:80
Jun 04 19:02:46 ip-172-31-47-28 nginx[5172]: nginx: [emerg] bind() to [::]:80 fa
Jun 04 19:02:46 ip-172-31-47-28 nginx[5172]: nginx: [emerg] bind() to 0.0.0.0:44
Jun 04 19:02:46 ip-172-31-47-28 nginx[5172]: nginx: [emerg] bind() to [::]:443 f
Jun 04 19:02:46 ip-172-31-47-28 nginx[5172]: nginx: [emerg] still could not bind
Jun 04 19:02:46 ip-172-31-47-28 systemd[1]: nginx.service: Control process exite
Jun 04 19:02:46 ip-172-31-47-28 systemd[1]: Failed to start nginx - high perform
Jun 04 19:02:46 ip-172-31-47-28 systemd[1]: nginx.service: Unit entered failed s
Jun 04 19:02:46 ip-172-31-47-28 systemd[1]: nginx.service: Failed with result 'e
lines 1-18/18 (END)
You are also removing previously included domain(s):
(None)
Did you intend to make this change?
(U)pdate certificate/(C)ancel: U
Renewing an existing certificate for library.mominoun.com and ec2-34-255-45-199.eu-west-1.compute.amazonaws.com
An unexpected error occurred:
The server will not issue certificates for the identifier :: Error creating new order :: Cannot issue for "ec2-34-255-45-199.eu-west-1.compute.amazonaws.com": The ACME server refuses to issue a certificate for this domain name, because it is forbidden by policy
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
root@ip-172-31-47-28:~#
root@ip-172-31-47-28:~# sudo nginx -s reload
nginx: [error] open() "/var/run/nginx.pid" failed (2: No such file or directory)
root@ip-172-31-47-28:~# sudo nginx -T
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
root@ip-172-31-47-28:~# sudo certbot --cert-name library.mominoun.com --nginx -d "library.mominoun.com"
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Renewing an existing certificate for library.mominoun.com
Encountered exception during recovery: certbot.errors.MisconfigurationError: nginx restart failed:
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)
nginx: [emerg] still could not bind()
nginx restart failed:
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)
nginx: [emerg] still could not bind()
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
root@ip-172-31-47-28:~#
root@ip-172-31-47-28:~#