When using certain Alpine container images, "oc rsh" and "crictl exec" error with "read init-p: connection reset by peer"

Solution In Progress - Updated -

Issue

  • When using certain Alpine container images in Red Hat OpenShift Container Platform 4.13 or higher, attempts to perform oc rsh or crictl exec to certain Alpine-based containers or containers with older versions of glibc may 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 error appears 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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content