Troubleshoot TLS Trust Failures on Linux and in Containers
Guide tools
Before You Start
Use an approved HTTPS endpoint and a Linux host running Docker. Use an instrumented test container with curl and CA certificates available. For diagnostic commands, replace the example service name and container. Run as an existing authorized Docker operator.
Troubleshooting Steps
Reproduce the same HTTPS request twice
Start hereUse the same hostname and path in both contexts. Run the host command directly and use the second command only for an authorized container that has curl. Compare the exact error and the trust store or proxy reported. Avoid URLs containing secrets.
curl -v --head --max-time 10 https://app.example.com/docker exec app curl -v --head --max-time 10 https://app.example.com/Compare destination, DNS, and proxy
Confirm both requests reach the intended endpoint. Compare the destination and whether a proxy terminates TLS. Verify time before diagnosing certificate dates. HTTP status codes occur after the TLS check, so a server that rejects HEAD can still have a valid TLS connection.
Inspect certificate naming and the presented chain
Run a bounded client test against the intended address using its real DNS name. The client sends SNI and checks that name. Compare issuer, dates, and the chain to a working context. Supply the hostname separately to the hostname check.
timeout 10 openssl s_client -connect app.example.com:443 \ -servername app.example.com -verify_hostname app.example.com \ -verify_return_error -showcerts </dev/nullCheck whether an approved root explains the failure
With a CA bundle verified through your PKI team, repeat the test with that bundle explicitly supplied. If the test succeeds, compare container and host trust stores. If it still fails because the name is wrong or the server omits an intermediate, fix the server configuration.
curl --cacert ./approved-ca-bundle.pem --head --max-time 10 https://app.example.com/Apply the fix to the owning configuration
Fix an incomplete server chain on its server or proxy. If the client needs an approved private CA, add it to the correct image or application trust store using its documented mechanism and rebuild or redeploy through a pilot. Java and other runtimes can use their own CA store.
Verify the real workload
VerifyRepeat the requests with ordinary trust verification and test the actual application. If deployment regresses unrelated connections, restore the prior image or configuration and review the actual chain and trust boundary.
References
Your feedback keeps these production procedures accurate and battle-tested.