linkerd / linkerd2

Ultralight, security-first service mesh for Kubernetes. Main repo for Linkerd 2.x.
https://linkerd.io
Apache License 2.0
10.69k stars 1.28k forks source link

Debugging half-closed connections in the proxy container #9360

Closed adleong closed 2 years ago

adleong commented 2 years ago

What is the issue?

We have documentation on how to debug half-closed connections in the proxy container here: https://linkerd.io/2.12/tasks/debugging-502s/

However, these docs point to a script: https://gist.github.com/adleong/0203b0864af2c29ddb821dd48f339f49 which no longer works because the proxy container no longer contains the cat utility.

How can it be reproduced?

Run this script https://gist.github.com/adleong/0203b0864af2c29ddb821dd48f339f49

Logs, error output, etc

> ./lost-sock.sh 
error: Internal error occurred: error executing command in container: failed to exec in container: failed to start exec "41b5b9c774b133221d7958ea33773bc06a1f2e4fe6d0eda7d4fc948b077a06fc": OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "cat": executable file not found in $PATH: unknown

output of linkerd check -o short

Status check results are √

Environment

Linkerd stable 2.12.0

Possible solution

Update the documentation to describe how to debug this using the debug container.

Additional context

No response

Would you like to work on fixing this bug?

No response

adleong commented 2 years ago

The script has been updated to use the debug container as an ephemeral container (using the kubectl debug command).