Problem binding to port 80: Could not bind to IPv4 or IPv6

I am a newbie in this. First time I try to install the SSL myself. I have access to root. My server is a server cloud. I tried to follow a tutorial to install Let’s Encrypt but I got this binding issue at the end of the process. What should I do from there ?

My domain is: serrurier-secours.ch

I followed this tutorial for a Debian server : https://linode.com/docs/security/ssl/install-lets-encrypt-to-create-ssl-certificates/

I ran this command:
sudo -H ./letsencrypt-auto certonly --standalone -d serrurier-secours.ch -d www.serrurier-secours.ch and then agreed with terms

It produced this output: Obtaining a new certificate

Performing the following challenges:

http-01 challenge for serrurier-secours.ch

http-01 challenge for www.serrurier-secours.ch

Cleaning up challenges

Problem binding to port 80: Could not bind to IPv4 or IPv6.

My web server is (include version): server cloud debian stretch 64-bits

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is: Infomaniak

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

What type of web server are you running?

ss -tlnp | grep -E ":(80|443)"

same happen with me . :

[root@www sites-available]# ss -tlnp | grep -E “:(80|443)”
LISTEN 0 128 :::80 :::* users:((“httpd”,pid=42023,fd=4),(“httpd”,pid=41908,fd=4),(“httpd”,pid=41907,fd=4),(“httpd”,pid=41896,fd=4),(“httpd”,pid=41862,fd=4),(“httpd”,pid=41851,fd=4),(“httpd”,pid=41837,fd=4),(“httpd”,pid=41835,fd=4),(“httpd”,pid=41834,fd=4),(“httpd”,pid=41833,fd=4),(“httpd”,pid=41831,fd=4),(“httpd”,pid=41830,fd=4))
LISTEN 0 128 :::443 :::* users:((“httpd”,pid=42023,fd=6),(“httpd”,pid=41908,fd=6),(“httpd”,pid=41907,fd=6),(“httpd”,pid=41896,fd=6),(“httpd”,pid=41862,fd=6),(“httpd”,pid=41851,fd=6),(“httpd”,pid=41837,fd=6),(“httpd”,pid=41835,fd=6),(“httpd”,pid=41834,fd=6),(“httpd”,pid=41833,fd=6),(“httpd”,pid=41831,fd=6),(“httpd”,pid=41830,fd=6))
[root@www sites-available]#

For you specifically: use --apache instead of certonly --standalone.

Curretnlly i am facing this issue can you help me on that. …

[root@www sites-available]# certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log

Processing /etc/letsencrypt/renewal/sonicfiber.pk-0001.conf

Cert is due for renewal, auto-renewing…
Plugins selected: Authenticator standalone, Installer None
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Renewing an existing certificate
Performing the following challenges:
tls-sni-01 challenge for sonicfiber.pk
tls-sni-01 challenge for www.sonicfiber.pk
Cleaning up challenges
Attempting to renew cert (sonicfiber.pk-0001) from /etc/letsencrypt/renewal/sonicfiber.pk-0001.conf produced an unexpected error: Problem binding to port 443: Could not bind to IPv4 or IPv6… Skipping.

Processing /etc/letsencrypt/renewal/sonicfiber.pk.conf

Cert not yet due for renewal
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/sonicfiber.pk-0001/fullchain.pem (failure)

The following certs are not due for renewal yet:
/etc/letsencrypt/live/sonicfiber.pk/fullchain.pem expires on 2019-02-06 (skipped)
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/sonicfiber.pk-0001/fullchain.pem (failure)

1 renew failure(s), 0 parse failure(s)

This is what I get when running that command :

root@ov-dbeda8:/# ss -tlnp | grep -E ":(80|443)"
LISTEN 0 128 :::443 :::* users:(("apache2",pid=9414,fd=6),("apache2",pid=9409,fd=6),("apache2",pid=9404,fd=6),("apache2",pid=9399,fd=6),("apache2",pid=9394,fd=6),("apache2",pid=3604,fd=6))
LISTEN 0 128 :::80 :::* users:(("apache2",pid=9414,fd=4),("apache2",pid=9409,fd=4),("apache2",pid=9404,fd=4),("apache2",pid=9399,fd=4),("apache2",pid=9394,fd=4),("apache2",pid=3604,fd=4))

The problem for both of you is that you are running the standalone authenticator, which conflicts with your Apache server.

So,

You should use

 sudo -H ./letsencrypt-auto --apache -d serrurier-secours.ch -d www.serrurier-secours.ch

and you should use

certbot renew --cert-name sonicfiber.pk-0001 --apache

Alright I will try that. I read another post that I should stop Apache to install it...but I didn't reaylly buy into that so I will try your way and let you know thanks.

EDIT : It worked like magic ! Thanks for the support !

1 Like

still not work …

[root@www conf.d]# certbot renew --cert-name sonicfiber.pk-0001 --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /etc/letsencrypt/renewal/sonicfiber.pk-0001.conf


Cert is due for renewal, auto-renewing…
Plugins selected: Authenticator apache, Installer apache
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Renewing an existing certificate
Performing the following challenges:
tls-sni-01 challenge for sonicfiber.pk
tls-sni-01 challenge for www.sonicfiber.pk
Waiting for verification…
Cleaning up challenges
Attempting to renew cert (sonicfiber.pk-0001) from /etc/letsencrypt/renewal/sonicfiber.pk-0001.conf produced an unexpected error: ‘module’ object has no attribute ‘detect’. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/sonicfiber.pk-0001/fullchain.pem (failure)


All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/sonicfiber.pk-0001/fullchain.pem (failure)


1 renew failure(s), 0 parse failure(s)
[root@www conf.d]#

Can you post the traceback from /var/log/letsencrypt/letsencrypt.log?

Hi,

Also, could you please check if certbot is in the latest version? (By running update from yum or apt-get or something else)

Thank you

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.