I ran this command: certbot renew
I can't show my domain, it's a company service
It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Processing /etc/letsencrypt/renewal/domain.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:
http-01 challenge for domain
Cleaning up challenges
Attempting to renew cert (domain) from /etc/letsencrypt/renewal/domain.conf produced an unexpected error: Problem binding to port 80: Could not bind to IPv4 or IPv6.. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/domain.co/fullchain.pem (failure)
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/domain.co/fullchain.pem (failure)
1 renew failure(s), 0 parse failure(s)
My web server is (include version): nginx
The operating system my web server runs on is (include version): CentOS 7
I can login to a root shell on my machine (yes or no, or I don't know): Yes
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): certbot 0.31.0
I have installed with omnibus and configured GitLab with https.
I used letsencrypt for this task.
Everything is running on a CentOS 7 server.
I have tried to mannually renew the cert with the following command :
certbot renew
But it fail :
Attempting to renew cert (domain) from
/etc/letsencrypt/renewal/domain.conf produced an unexpected error:
Problem binding to port 80: Could not bind to IPv4 or IPv6.. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/domain/fullchain.pem (failure)
I have searched around and it looks like it's because I have a running web server, but when I check any running service I have the following output :
systemctl status nginx
Unit nginx.service could not be found.
systemctl status httpd
Unit httpd.service could not be found.
I checked port 80 and 443 to see if they're taken with my custom script :
#!/bin/bash
function is_port_free {
netstat -ntpl | grep $1 -q ;
if [ $? -eq 1 ]; then
echo "free"
else
echo "taken"
fi
}
port80=$(is_port_free 80)
if [ "$port80" == "taken" ]; then
echo "Port 80 is taken"
else
echo "Port 80 is free"
fi
port443=$(is_port_free 443)
if [ "$port443" == "taken" ]; then
echo "Port 443 is taken"
else
echo "Port 443 is free"
fi
Here is my output :
Port 80 is taken
Port 443 is taken
And here is my cron :
0 0,12 * * * root python -c 'import random; import time; time.sleep(random.random() * 3600)' && certbot renew
My gitlab.rb conf :
external_url 'https://domain'
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/letsencrypt/live/domain/fullchain.pem"
nginx['ssl_certificate_key'] = "/etc/letsencrypt/live/domain/privkey.pem"
nginx['ssl_dhparam'] = "/etc/gitlab/ssl/dhparams.pem"
#letsencrypt['enable'] = true
Do I have to stop my gitlab instance with gitlab-ctl stop
, renew cert with certbot renew
and start gitlab gitlab-ctl start
?
I don't really like this solution, because my gitlab is on production.
The date I created the old certificate is 03/05/2019 and expire 01/08/2019.
Thanks for any help