I switched to letsencrypt 2 months ago and had no issues with the verification process to obtain a cert. I already have an apache server running but it does not listen on port 80 nor 443. So i used --standalone and it worked great.
I’m running Fedora 27.
Now 2 months later it is time to renew and it failed. the cron job ran as schedule but the standalone server failed to bind to port 443.
remember that my apache server doesn’t use 80/443 and the port is not in use
[root@xxxxxx ~]# netstat -an | grep 443
[root@xxxxxx ~]# netstat -an | grep 80
unix 2 [ ACC ] STREAM LISTENING 18043 /var/run/abrt/abrt.socket
the only message in the log is this:
Failed to bind to :443 using IPv4
no detailed error as to why it failed to bind. a rather unhelpful message and
adding --verbose didn’t improve it either.
selinux is enforcing and there are no audit messages about blocking access to 443.
no other errors in messages or other log files as to what the problem might be.
the command i’m using is:
certbot renew --standalone --verbose --preferred-challenges tls-sni --deploy-hook /etc/letsencrypt/deploy-hook-script --post-hook /etc/letsencrypt/post-hook-script
so how can i debug the standalone server to find out why it can’t bind to :443?
relavent messages in the log:
Single candidate plugin: * standalone
Description: Spin up a temporary webserver
Interfaces: IAuthenticator, IPlugin
Entry point: standalone = certbot.plugins.standalone:Authenticator
Initialized: <certbot.plugins.standalone.Authenticator object at 0x7f3c6fd59f28>
Prep: True
Selected authenticator <certbot.plugins.standalone.Authenticator object at 0x7f3c6fd59f28> and installer None
Plugins selected: Authenticator standalone, Installer None
.
.
Renewing an existing certificate
.
.
Performing the following challenges:
tls-sni-01 challenge for markpreston.me
Failed to bind to :443 using IPv4
Waiting for verification…
and then i get the expected connection refused since it isn’t listening on 443.
I’m not looking for a workaround because i’m not going to reconfigure my apache to listen on 80/443 just for cert renewals. It worked 2 months ago in standalone mode, it should work again. I do keep my fedora system up to date with the latest rpm/patches.
so does anyone have any ideals how to put the standalone webserver in debug mode? is there a config file for it? if not there should be.
cheers.
My domain is: markpreston.me
I ran this command: see above
It produced this output: see above
My web server is (include version):
The operating system my web server runs on is (include version):fedora 27
My hosting provider, if applicable, is: my server
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