Skip to content

Troubleshoot TLS Trust Failures on Linux and in Containers

Admin
November 29, 2026
5 min read
Intermediate
đŸ’ģ Target OS: Ubuntu 26.04 LTS / Docker Engine
Guide tools
Guide tools
0/0 Steps (0%)

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

01

Reproduce the same HTTPS request twice

Start here

Use 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.

Terminal window
curl -v --head --max-time 10 https://app.example.com/
docker exec app curl -v --head --max-time 10 https://app.example.com/
02

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.

03

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.

Terminal window
timeout 10 openssl s_client -connect app.example.com:443 \
-servername app.example.com -verify_hostname app.example.com \
-verify_return_error -showcerts </dev/null
04

Check 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.

Terminal window
curl --cacert ./approved-ca-bundle.pem --head --max-time 10 https://app.example.com/
05

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.

06

Verify the real workload

Verify

Repeat 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

Comments