Cannot shell into the container, rpc error: code = 5 desc ... shim-log.json: no such file or directory

2/12/2019

trying to shell into the container by kubectl exec -it xxxxxx

but it returns

rpc error: code = 5 desc = open /var/run/docker/libcontainerd/containerd/faf3fd49262cc738e16368001eba5e1113abcb8a87e7b818cb84af3799906149/30fe901c16e0465aa15b596bf3e4f244fb12a7e4133b6e4da5aa35167a8dfb30/shim-log.json: no such file or directory

trying to reboot the node but not help

-- Alan H0
kubectl
kubernetes

3 Answers

2/12/2019

It appears like some issue with the docker daemon. it would help if you add the logs from the container to research the root cause.

deploy alpine pod and see if you can get into the container. This is to isolate if the problem is with the platform or the pod that you are running.

kubectl run pingpong --image alpine ping 8.8.8.8
kubectl exec -it <pingpong-pod-name>  sh

most likely something wrong with the pod that you are running. share the container logs for further help

-- P Ekambaram
Source: StackOverflow

2/13/2019

Thanks @Prafull Ladha

Eventually I restarted the docker (systemctl restart docker) of that Node which my pods could not be shelled, and it resumes to normal

-- Alan H0
Source: StackOverflow

2/13/2019

The problem is with containerd, Once the containerd restart in the background, the docker daemon still try to process event streams against the old socket handles. After that, the error handeling when client can't connect to the containerd leads to the CPU spike on machine.

This is the open issue with docker and currently the workaround is to restart the docker.

sudo systemctl restart docker
-- Prafull Ladha
Source: StackOverflow