Requests fail intermittently with a 400 in production only, and you need to see the HTTP payload inside the TLS connection between your service and its upstream.
AdvancedTroubleshootingContainers, Kubernetes, IPv6 and packet captures
Answer
Likely causes → You can't read TLS 1.3 traffic from a capture with just the server's private key (forward secrecy). You need the per-session secrets from one of the endpoints.
Diagnose →
# 1. make the client log session keys (supported by curl, OpenSSL-based apps that honour it, Firefox/Chrome, Go via tls.Config.KeyLogWriter)
export SSLKEYLOGFILE=/tmp/tls-keys.log
# 2. capture at the same time
sudo tcpdump -ni eth0 -w /tmp/tls.pcap host upstream.example.com and port 443
# 3. decrypt
tshark -r /tmp/tls.pcap -o tls.keylog_file:/tmp/tls-keys.log -Y http -V | less
Alternatively, add a debug log of request headers at the client, or route through a mitm proxy in staging.
Fix → Once decrypted, you usually find the real cause: a malformed header, a duplicated Content-Length, a missing Host/SNI, or a body encoding mismatch.
Prevent → Treat key log files as secrets: enable briefly, protect, and delete afterwards. Add structured request/response logging (with redaction) at service boundaries so you rarely need decryption.
More on Containers, Kubernetes, IPv6 and packet captures
After someone ran `iptables -F` (or restarted firewalld), all Docker containers lost outbound connectivity.Intermediate`docker run -p 8080:80 myapp` starts fine, but `curl localhost:8080` returns `Connection reset by peer`.BeginnerTwo containers on the default bridge network can't reach each other by container name.Beginner`docker run -p 80:80 nginx` fails with `Bind for 0.0.0.0:80 failed: port is already allocated`.BeginnerA new Kubernetes node stays `NotReady` with `container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized`.IntermediateA Service returns `Connection refused` / nothing, and `kubectl get endpoints myapp` shows `<none>`.Beginner