DescriptionBill C. Riemers
2015-04-09 19:51:59 UTC
Description of problem:
After awhile of running docker commands, particularly as part of a "watch" statement, I state to get too many pipe2 errors.
Version-Release number of selected component (if applicable):
How reproducible:
Unknown. This has happened to me 3 times so far.
Steps to Reproduce:
1. Run a docker command in a watch loop, such as:
watch -n 30 docker run -t -i --rm fedora date
2.
3.
Actual results:
Eventually one starts to see output like:
time="2015-04-09T15:25:25-04:00" level="fatal" msg="Post http:///var/run/docker.sock/v1.16/containers/3543b03f71195ca4522e794e7e0d83d8642b59ceb140d30a9d7fcef760424893/start: EOF. Are you trying to connect to a TLS-enabled daemon without TLS?"
If I control-C, run "docker rm $(docker ps -q -a)" there are many instances to clean-up. Afterwards, if I try running a new docker command without the watch part I get the error:
FATA[0000] Error response from daemon: Cannot start container 6252aa7de7f1217f654d1551c56e9d544eb9a588446996e0ae473458b2bf1251: pipe2: too many open files
Expected results:
Should just keep working.
Additional info:
The command I'm actually using is an sqlplus script, but I thought an example with date might be much easier to use to reproduce with.
Doing a "service docker restart" resolves the issue, but it also aborts all my running docker containers...
The following identifies the problem without the need to wait a long time:
1. run: ps -ef
2. note the process number for docker, say for example 31215
3. run: ls /proc/31215/fd | wc -l
4. Run a docker command such as: docker run -t -i --rm fedora date
5. run: ls /proc/31215/fd | wc -l
Note: Each time you run a docker command the number of open file descriptors is increasing by 2. So eventually the limit on file descriptors will be reached.
The docker package I'm using is:
docker-io-1.4.1-3.el6.x86_64
The following looks like the same issue in github:
https://github.com/docker/swarm/issues/342
There is a fix for it, so presumably the docker-io package just needs to be updated to add it.