My domain is: efirma.rs (under dev)
I ran this command: sudo docker run -it --rm -p 4343:443 -p 8080:80 --name certbot -v "/etc/letsencrypt:/etc/letsencrypt" -v "/var/lib/letsencrypt:/var/lib/letsencrypt" quay.io/letsencrypt/letsencrypt:latest renew --dry-run --preferred-challenges http
(ALSO I TRIED WITHOUT --preferred-challenges http)
It produced this output: SEE BELOW
My operating system is (include version): UBUNTU 16.04
My web server is (include version): NGINX latest release from official docker image
My hosting provider, if applicable, is: digital ocean
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): -
When trying to renew and perform dry-run without stating --preferred-challenges http the ERROR is:
Processing /etc/letsencrypt/renewal/efirma.rs.conf
Cert not due for renewal, but simulating renewal for dry run
Renewing an existing certificate
Performing the following challenges:
tls-sni-01 challenge for efirma.rs
tls-sni-01 challenge for www.efirma.rs
Waiting for verificationā¦
Cleaning up challenges
Attempting to renew cert from /etc/letsencrypt/renewal/efirma.rs.conf produced an unexpected error: Failed authorization procedure. www.efirma.rs (tls-sni-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Incorrect validation certificate for TLS-SNI-01 challenge. Requested 83f910c6e9e9d0d64224ec530d582571.1f6e1497c1e6c2af7fe7679e2cf04f18.acme.invalid from 207.154.204.11:443. Received certificate containing āefirma.rs, www.efirma.rsā, efirma.rs (tls-sni-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Incorrect validation certificate for TLS-SNI-01 challenge. Requested b0bb872b7e2869a1d003183bc687548b.6cf754297deb33512778a35300ba0c02.acme.invalid from 207.154.204.11:443. Received certificate containing āefirma.rs, www.efirma.rsā. Skipping.
** DRY RUN: simulating ācertbot renewā close to cert expiry
** (The test certificates below have not been saved.)
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/efirma.rs/fullchain.pem (failure)
** DRY RUN: simulating ācertbot renewā close to cert expiry
** (The test certificates above have not been saved.)
1 renew failure(s), 0 parse failure(s)
IMPORTANT NOTES:
-
The following errors were reported by the server:
Domain: www.efirma.rs
Type: unauthorized
Detail: Incorrect validation certificate for TLS-SNI-01 challenge.
Requested
83f910c6e9e9d0d64224ec530d582571.1f6e1497c1e6c2af7fe7679e2cf04f18.acme.invalid
from 207.154.204.11:443. Received certificate containing
āefirma.rs, www.efirma.rsāDomain: efirma.rs
Type: unauthorized
Detail: Incorrect validation certificate for TLS-SNI-01 challenge.
Requested
b0bb872b7e2869a1d003183bc687548b.6cf754297deb33512778a35300ba0c02.acme.invalid
from 207.154.204.11:443. Received certificate containing
āefirma.rs, www.efirma.rsāTo fix these errors, please make sure that your domain name was
entered correctly and the DNS A record(s) for that domain
contain(s) the right IP address.
When --preferred-challenges http is added the ERROR is:
Processing /etc/letsencrypt/renewal/efirma.rs.conf
Cert not due for renewal, but simulating renewal for dry run
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for efirma.rs
http-01 challenge for www.efirma.rs
Waiting for verificationā¦
Cleaning up challenges
Attempting to renew cert from /etc/letsencrypt/renewal/efirma.rs.conf produced an unexpected error: Failed authorization procedure. efirma.rs (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://efirma.rs/.well-known/acme-challenge/aDqGkwKQDWwu0eYjwUyxQRxy5fxnf0Zl4U1UqNn6nmU: "
502 Bad Gateway
<cen", www.efirma.rs (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.efirma.rs/.well-known/acme-challenge/6b9YvePOONDm0mTzlWVDrsor-yf7O_v1tG4Pe82ApbM: " 502 Bad Gateway
502 Bad Gateway
<cen". Skipping. ** DRY RUN: simulating 'certbot renew' close to cert expiry ** (The test certificates below have not been saved.)
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/efirma.rs/fullchain.pem (failure)
** DRY RUN: simulating ācertbot renewā close to cert expiry
** (The test certificates above have not been saved.)
1 renew failure(s), 0 parse failure(s)
IMPORTANT NOTES:
-
The following errors were reported by the server:
Domain: efirma.rs
502 Bad Gateway
Type: unauthorized
Detail: Invalid response from
http://efirma.rs/.well-known/acme-challenge/aDqGkwKQDWwu0eYjwUyxQRxy5fxnf0Zl4U1UqNn6nmU:
"502 Bad Gateway
<cen"Domain: www.efirma.rs
502 Bad Gateway
Type: unauthorized
Detail: Invalid response from
http://www.efirma.rs/.well-known/acme-challenge/6b9YvePOONDm0mTzlWVDrsor-yf7O_v1tG4Pe82ApbM:
"502 Bad Gateway
<cen"To fix these errors, please make sure that your domain name was
entered correctly and the DNS A record(s) for that domain
contain(s) the right IP address.
My nginx configuration is:
server {
listen 80;
server_name efirma.rs, www.efirma.rs;
if ($scheme = http) {
return 301 https://$host$request_uri;
}
location /.well-known {
proxy_pass http://127.0.0.1:8080/;
}
location / {
return 301 https://$server_name$request_uri;
}
}
server {
listen 443 ssl;
server_name efirma.rs, www.efirma.rs;
ssl_certificate /etc/letsencrypt/live/efirma.rs/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/efirma.rs/privkey.pem;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
root /usr/share/nginx/html/;
index index.html index.htm;
}
location /.well-known {
proxy_pass http://127.0.0.1:4343/;
}
}
Any ideas?