When using certain Alpine container images, "oc rsh" and "crictl exec" error with "read init-p: connection reset by peer"
Issue
- When using certain Alpine container images in Red Hat OpenShift Container Platform 4.13 or higher, attempts to perform
oc rshorcrictl execto certain Alpine-based containers or containers with older versions ofglibcmay result in the errors:
# oc exec -it -n my-namespace my-pod -- sh
ERRO[0000] exec failed: unable to start container process: read init-p: connection reset by peer
command terminated with exit code 255
# crictl exec -it my-container -- sh
ERRO[0000] exec failed: unable to start container process: read init-p: connection reset by peer
FATA[0000] execing command in container: command terminated with exit code 255
- The error
Stdout copy error: read /dev/ptmx: input/output errorappears in the CRI-O logs or container logs when attempting to exec to these pods.
Environment
- Red Hat OpenShift Container Platform 4.13 and higher
- Red Hat Enterprise Linux 9 and higher
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.