We are a hosting company and have been successfully creating SSL certs on thousands of domains for our user’s for quite some time without issue. Only in the last few days, we’ve been unable to create SSL certs for certain domains without any apparent reason; while we are able to create certs for other domains on the same host. From our apache logs, we are able to see that LetsEncrypt is able to connect to our server for the domain that failed and retrieve the challenge file with a 200 response from our server, yet we still get an “invalid” response from the LetsEncrypt API. We can verify that the challenge file has the correct contents and we can retrieve it with the correct contents without issue from our server. The challenge will repeatedly fail for the same domain with no apparent reason, while repeatedly succeed for another domain on the same server, with all headers in the response to an http request to the challenge file looking exactly the same for both domains. Here is an example:
1500057740.714744 Private key loaded
1500057741.345338 Let’s Encrypt Directories loaded.
1500057741.483964 Sending registration message
1500057741.621206 Known key used
1500057741.621407 Refetching with location URL
1500057741.947683 TOS already accepted. Skipping
1500057741.948004 Sending authz message for domain
1500057742.140741 Handing challenge for token: iNMFh58TGhf1NAFutE9kNVs_1B4kru0mg51cPbawu5s.psAeiFY6OkcX3SqWcKNnHtXRFF1xCrsLAO_KSsMzGAg
1500057742.508231 Polling for challenge fulfillment
1500057742.508279 Status: pending
1500057744.697098 Status: invalid
From our apache logs at the time this API request was done:
domain 66.133.109.36 - - [14/Jul/2017:18:42:22 +0000] “GET /.well-known/acme-challenge/iNMFh58TGhf1NAFutE9kNVs_1B4kru0mg51cPbawu5s HTTP/1.1” 200 87 “-” “Mozilla/5.0 (compat
ible; Let’s Encrypt validation server; +https://www.letsencrypt.org)”
When I request the challenge file with my own http client I get:
wget -S http://domain/.well-known/acme-challenge/iNMFh58TGhf1NAFutE9kNVs_1B4kru0mg51cPbawu5s
–2017-07-14 11:42:40-- http://homegymstrong.com/.well-known/acme-challenge/iNMFh58TGhf1NAFutE9kNVs_1B4kru0mg51cPbawu5s
Resolving domain (domain)… 54.243.187.70
Connecting to domain (domain)|54.243.187.70|:80… connected.
HTTP request sent, awaiting response…
HTTP/1.1 200 OK
Date: Fri, 14 Jul 2017 18:50:20 GMT
Server: Apache/2.2.22 (Debian)
Last-Modified: Fri, 14 Jul 2017 18:42:22 GMT
ETag: "ed8bc-57-5544b68dec405"
Accept-Ranges: bytes
Content-Length: 87
Cache-Control: max-age=0
Expires: Fri, 14 Jul 2017 18:50:20 GMT
Connection: close
Content-Type: text/plain
Length: 87 [text/plain]
Saving to: ‘iNMFh58TGhf1NAFutE9kNVs_1B4kru0mg51cPbawu5s’
#cat iNMFh58TGhf1NAFutE9kNVs_1B4kru0mg51cPbawu5s
iNMFh58TGhf1NAFutE9kNVs_1B4kru0mg51cPbawu5s.psAeiFY6OkcX3SqWcKNnHtXRFF1xCrsLAO_KSsMzGAg