Failed authorization procedure

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: esolz.co

I ran this command:/usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh

It produced this output: Failed authorization procedure. esolz.co (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://esolz.co/.well-known/acme-challenge/lsPZhqvKKp1rzsqstNhfXFVmAuRC-nlqMNtuOCzeoxY: “<html>\r\n<head><title>404 Not Found</title></head>\r\n<body bgcolor=“white”>\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>”

My web server is (include version): Nginx

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

My hosting provider, if applicable, is: Amazon

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 are the contents of that script?

What else did it output?

What version of Ubuntu?

What does Nginx's error.log say?

Seems to run certbot-auto with --webroot: https://github.com/jitsi/jitsi-meet/blob/342a00a6af323d98eef33fc60f4e2a515c8e254d/resources/install-letsencrypt-cert.sh

and OP's nginx seems to be pointing to /usr/share/nginx/html rather than the expected webroot ...

/usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh

==========

#!/bin/bash

set -e

DEB_CONF_RESULT=debconf-show jitsi-meet-web-config | grep jvb-hostname
DOMAIN="${DEB_CONF_RESULT##*:}"

remove whitespace

DOMAIN="(echo -e "{DOMAIN}" | tr -d ‘[:space:]’)"

echo “-------------------------------------------------------------------------”
echo “This script will:”
echo “- Need a working DNS record pointing to this machine(for domain ${DOMAIN})”
echo “- Download certbot-auto from https://dl.eff.org to /usr/local/sbin”
echo “- Install additional dependencies in order to request Let’s Encrypt certificate”
echo “- If running with jetty serving web content, will stop Jitsi Videobridge”
echo “- Configure and reload nginx or apache2, whichever is used”
echo “”
echo "You need to agree to the ACME server’s Subscriber Agreement (https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf) "
echo “by providing an email address for important account notifications”

echo -n "Enter your email and press [ENTER]: "
read EMAIL

cd /usr/local/sbin

if [ ! -f certbot-auto ] ; then
wget https://dl.eff.org/certbot-auto
chmod a+x ./certbot-auto
fi

CRON_FILE="/etc/cron.weekly/letsencrypt-renew"
echo “#!/bin/bash” > $CRON_FILE
echo “/usr/local/sbin/certbot-auto renew >> /var/log/le-renew.log” >> $CRON_FILE

CERT_KEY="/etc/letsencrypt/live/$DOMAIN/privkey.pem"
CERT_CRT="/etc/letsencrypt/live/$DOMAIN/fullchain.pem"

if [ -f /etc/nginx/sites-enabled/$DOMAIN.conf ] ; then

./certbot-auto certonly --noninteractive \
--webroot --webroot-path /usr/share/jitsi-meet \
-d $DOMAIN \
--agree-tos --email $EMAIL

echo "Configuring nginx"

CONF_FILE="/etc/nginx/sites-available/$DOMAIN.conf"
CERT_KEY_ESC=$(echo $CERT_KEY | sed 's/\./\\\./g')
CERT_KEY_ESC=$(echo $CERT_KEY_ESC | sed 's/\//\\\//g')
sed -i "s/ssl_certificate_key\ \/etc\/jitsi\/meet\/.*key/ssl_certificate_key\ $CERT_KEY_ESC/g" \
    $CONF_FILE
CERT_CRT_ESC=$(echo $CERT_CRT | sed 's/\./\\\./g')
CERT_CRT_ESC=$(echo $CERT_CRT_ESC | sed 's/\//\\\//g')
sed -i "s/ssl_certificate\ \/etc\/jitsi\/meet\/.*crt/ssl_certificate\ $CERT_CRT_ESC/g" \
    $CONF_FILE

echo "service nginx reload" >> $CRON_FILE
service nginx reload

elif [ -f /etc/apache2/sites-enabled/$DOMAIN.conf ] ; then

./certbot-auto certonly --noninteractive \
--webroot --webroot-path /usr/share/jitsi-meet \
-d $DOMAIN \
--agree-tos --email $EMAIL

echo "Configuring apache2"

CONF_FILE="/etc/apache2/sites-available/$DOMAIN.conf"
CERT_KEY_ESC=$(echo $CERT_KEY | sed 's/\./\\\./g')
CERT_KEY_ESC=$(echo $CERT_KEY_ESC | sed 's/\//\\\//g')
sed -i "s/SSLCertificateKeyFile\ \/etc\/jitsi\/meet\/.*key/SSLCertificateKeyFile\ $CERT_KEY_ESC/g" \
    $CONF_FILE
CERT_CRT_ESC=$(echo $CERT_CRT | sed 's/\./\\\./g')
CERT_CRT_ESC=$(echo $CERT_CRT_ESC | sed 's/\//\\\//g')
sed -i "s/SSLCertificateFile\ \/etc\/jitsi\/meet\/.*crt/SSLCertificateFile\ $CERT_CRT_ESC/g" \
    $CONF_FILE

echo "service apache2 reload" >> $CRON_FILE
service apache2 reload

else
service jitsi-videobridge stop

./certbot-auto certonly --noninteractive \
--standalone \
-d $DOMAIN \
--agree-tos --email $EMAIL

echo "Configuring jetty"

CERT_P12="/etc/jitsi/videobridge/$DOMAIN.p12"
CERT_JKS="/etc/jitsi/videobridge/$DOMAIN.jks"
# create jks from  certs
openssl pkcs12 -export \
    -in $CERT_CRT -inkey $CERT_KEY -passout pass:changeit > $CERT_P12
keytool -importkeystore -destkeystore $CERT_JKS \
    -srckeystore $CERT_P12 -srcstoretype pkcs12 \
    -noprompt -storepass changeit -srcstorepass changeit

service jitsi-videobridge start

fi

the cron file that will renew certificates

chmod a+x $CRON_FILE

==========

What else did it output?

Waiting for verification…

Cleaning up challenges

Failed authorization procedure. esolz.co (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://esolz.co/.well-known/acme-challenge/lsPZhqvKKp1rzsqstNhfXFVmAuRC-nlqMNtuOCzeoxY: “<html>\r\n<head><title>404 Not Found</title></head>\r\n<body bgcolor=“white”>\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>”

IMPORTANT NOTES:

  • The following errors were reported by the server:

Domain: esolz.co

Type: unauthorized

Detail: Invalid response from

http://esolz.co/.well-known/acme-challenge/lsPZhqvKKp1rzsqstNhfXFVmAuRC-nlqMNtuOCzeoxY:

"<html>\r\n<head><title>404 Not Found</title></head>\r\n<body

bgcolor=“white”>\r\n<center><h1>404 Not

Found</h1></center>\r\n<hr><center>"

To fix these errors, please make sure that your domain name was

entered correctly and the DNS A/AAAA record(s) for that domain

contain(s) the right IP address.

============

Ubuntu 18.04

===========

Error Log

2018/12/12 09:31:58 [notice] 17116#17116: signal process started
2018/12/12 09:31:58 [emerg] 15849#15849: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/12 09:31:58 [emerg] 15849#15849: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/12 09:31:58 [emerg] 15849#15849: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/12 09:31:58 [emerg] 15849#15849: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/12 09:31:58 [emerg] 15849#15849: bind() to 0.0.0.0:443 failed (98: Address already in use)
2018/12/12 09:31:58 [emerg] 15849#15849: still could not bind()
2018/12/12 16:24:28 [error] 15851#15851: *78 directory index of “/var/www/html/.well-known/acme-challenge/” is forbidden, client: 223.176.121.129, server: _, request: “GET /.well-known/acme-challenge/ HTTP/1.1”, host: “esolz.co

Not too sure as I am a starter
I just installed the basic version of Nginx and have not done any customisations

Would you be able to try this, as an experiment?

  1. Stop nginx entirely: systemctl stop nginx
  2. Run the script again: /usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh

I think this should make it issue a certificate using the standalone authenticator, and then Jetty will automatically use that certificate.

The way I’m reading that script (and this documentation), it seems like if you want to use nginx, you need to have a virtual host preconfigured for your domain already.

Tried the same
No luck

Failed authorization procedure. esolz.co (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://esolz.co/.well-known/acme-challenge/nlv-tJJZrm7BVkzfsjUocPSoo_kyk4S1r7f7T_MfUoA: Connection refused

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: esolz.co
    Type: connection
    Detail: Fetching
    http://esolz.co/.well-known/acme-challenge/nlv-tJJZrm7BVkzfsjUocPSoo_kyk4S1r7f7T_MfUoA:
    Connection refused

    To fix these errors, please make sure that your domain name was
    entered correctly and the DNS A/AAAA record(s) for that domain
    contain(s) the right IP address. Additionally, please check that
    your computer has a publicly routable IP address and that no
    firewalls are preventing the server from communicating with the
    client. If you're using the webroot plugin, you should also verify
    that you are serving files from the webroot path you provided.

============

Hmm … could you put the contents of /var/log/letsencrypt/letsencrypt.log to somewhere like pastebin.com ?

Also:

find /etc/nginx/sites-enabled
find /etc/apache2/sites-enabled

I stopped nginx and now its not even coming back on

If you’re having trouble starting nginx, you can check for problems with:

nginx -t
ss -tlnp | grep ":80"

I stopped and ran the command but now the server is redirecting to https by default
https://esolz.co/

nothing loads

That will restart nginx?

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