Connection Timeout with ACME Challenge

Hi,

My knowledge of LE is pretty low so sorry in advance if it looks like something straight forward to fix :). I’m currently trying to implement a single certificate issue for one of my testing domains via ACME Challenge. My main goal is to import that certificate on an ALB and let it manage the HTTPS for my websites. My current setup is :

1 Application Load Balancer (AWS) that manage the domain certificate.mydomain.com (which I’m trying to create a certificate for). This load balancer shares load between 2 targets, which are HA Proxies. Those HA Proxies relay traffic to 2 different apache servers. The HA Proxies don’t have any “fancy” configs, only that if the main server goes down, traffic gets to the backup apache server. Both apache web servers have a proxypass rule to relay traffic /.well-known/acme-challenge to the certificate server
(ProxyPass /.well-known/acme-challenge http://validation-server.mydomain.com/.well-known/acme-challenge/)

1 certificate server configured to handle acme-challenges (and where I will generate the certificates). Again, nothing fancy here, only configuration for the webroot (yes it’s require all granted, gonna lock it up as soon as I have a working setup)
AliasMatch ^/.well-known/acme-challenge/(.*)$ /var/www/html/.well-known/acme-challenge/$1
<Directory “/var/www/html/.well-known/acme-challenge/”>
Options None
AllowOverride None
ForceType text/plain
Require all granted

The command I currently use to try to request a certificate is the following

certbot-auto certonly --test-cert --webroot -w /var/www/html/ -d certificate.mydomain.com

And the output

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for certificate.lexum.com
Using the webroot path /var/www/html for all unmatched domains.
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. certificate.mydomain.com (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://certificate.mydomain.com/.well-known/acme-challenge/tv8GqsnY7vx5wEFSxbjbYyt7aGCBXerLO9M3kOxfJjE: Timeout

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: certificate.mydomain.com
    Type: connection
    Detail: Fetching
    http://certificate.mydomain.com/.well-known/acme-challenge/tv8GqsnY7vx5wEFSxbjbYyt7aGCBXerLO9M3kOxfJjE:
    Timeout

    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.

Fun fact is, in the apache logs, I see 200’s requests like this while running the above command.

“GET /.well-known/acme-challenge//tv8GqsnY7vx5wEFSxbjbYyt7aGCBXerLO9M3kOxfJjE HTTP/1.1” 200 87 “-” “Mozilla/5.0 (compatible; Let’s Encrypt validation server; +https://www.letsencrypt.org)”

Why then the timeout connection? I’m kinda confused about that part.

Hopefully there’s enough infos, if not feel free to ask.

Thanks!
KP

Okay… for an unknown reason, it works now. I know I changed DNS on my end (for certificate.mydomain.com), but it was a while back this morning.

I guess I’m good now :slight_smile:

Thanks!
KP

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