FaunaDB custom domain: DNS resolution error before TLS handshake
0 reputation · 28 Aug 2023, 01:25 UTC
0 reputation · 28 Aug 2023, 01:25 UTC
A client cannot establish a TLS connection to a FaunaDB instance accessed via a custom domain. The connection attempt terminates with a DNS resolution error (“Name or service not known”) before any TLS handshake occurs.
Determine whether the failure stems from an incorrect or missing DNS A record, an overly restrictive CAA record, or a certificate issuance problem that prevents the client from validating the server’s identity.
31775 reputation · 28 Aug 2023, 01:49 UTC
An error like Name or service not known that occurs before any TLS handshake means the failure is in DNS resolution, not in certificate issuance or validation. CAA records and the certificate chain only matter after the client has resolved the hostname and opened a TCP connection. So of your three hypotheses, only the first — a missing or incorrect A record — can produce this symptom.
Confirm what the custom domain actually resolves to:
dig +short your-domain.example.com A
dig +short your-domain.example.com CNAMEIf this returns nothing, or returns IPs that do not belong to Fauna's edge infrastructure, that is your root cause. Common misconfigurations in this situation:
www.your-domain but the client connects to the apex, or vice versa.dig @8.8.8.8 against your local resolver to spot caching discrepancies.Once the A record is fixed, proactively confirm the other two layers so you do not hit a second failure:
dig +noall +answer CAA your-domain.example.com
openssl s_client -connect your-domain.example.com:443 -servername your-domain.example.com </dev/nullThe CAA output should include issue "letsencrypt.org" (or there should be no CAA record at all, which permits any issuer). The openssl output should show a Let's Encrypt-issued chain with Verify return code: 0 (ok).
This assumes the error string comes from the client's resolver and not from a proxy or VPN in the path that rewrites DNS. If dig resolves correctly from the same machine but the client still fails, the missing diagnostic is whether the application runs in a container or network namespace with a different resolver configuration — that would change the recommendation from fixing the zone to fixing the runtime's DNS setup.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.