Docker Community Forums

Share and learn in the Docker community.

Unable to find user root: no matching entries in passwd file

docker

(Vikram Khatri) #1

I have noticed that whenever I run docker cp command, the later invocations of docker exec do not work and I get the error “unable to find user root: no matching entries in passwd file

Here is an example where docker exec works fine but after I did docker cp, the docker exec refuse to work.

$ docker exec dashDB hostname -s
  node04

$ docker cp dashDB:/mnt/bludata0/options .

$ docker exec dashDB hostname
  unable to find user root: no matching entries in passwd file

$ docker version
Client:
 Version:      1.12.3
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   6b644ec
 Built:        
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.3
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   6b644ec
 Built:        
 OS/Arch:      linux/amd64

(Bezzers) #2

Same issue here on 1.12.6. A docker cp followed by a docker exec fails to find the user. Running docker stop and then docker start fixes the problem but is hardly a long-term solution. Docker restart does not fix the problem. Is this related to docker cp not releasing a lock on the container?


(Vikram Khatri) #3

Ok - I am still seeing this error in Docker version 17.06.0-ce

The only solution is to restart docker service - which is an interruption.

Can this be fixed in docker and is becoming an issue for Docker being a SPOF?


(Leonhoffman) #4

Running 17.09.0-ce matches this exact pattern. This “unable to find user” message did not occur until after using docker cp. Is this being tracked still?

You can still issue “docker exec -ti -u 0 container command” but it would be nice if you didn’t have to use that.


(Slavik57) #5

After running it with -u 0 I got:

rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "process_linux.go:75: starting setns process caused \"fork/exec /proc/self/exe: no such file or directory\""

This happened to me after using cp command as well.

Any news regarding this issue?