Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker run with -t option lead to "open /dev/ptmx: no such file or directory" message #2067

Open
shlliu opened this issue Aug 26, 2019 · 3 comments

Comments

@shlliu
Copy link

shlliu commented Aug 26, 2019

Description
docker run with -t option lead to "open /dev/ptmx: no such file or directory" message

Steps to reproduce the issue:

  1. Run: docker run -it hello-world

Describe the results you received:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused "open /dev/ptmx: no such file or directory"": unknown.

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):
$ ls -l /dev/ptmx
crw-rw-rw- 1 root tty 5, 2 8月 26 17:00 /dev/ptmx

$ ls -l /dev/pts
total 0
crw--w---- 1 lightdm tty 136, 0 8月 22 16:58 0
crw--w---- 1 lightdm tty 136, 1 8月 22 16:58 1
crw------- 1 admin1 tty 136, 10 8月 26 17:00 10
crw--w---- 1 lightdm tty 136, 2 8月 22 16:58 2
crw--w---- 1 lightdm tty 136, 3 8月 22 16:58 3
crw--w---- 1 lightdm tty 136, 4 8月 22 16:58 4
crw--w---- 1 lightdm tty 136, 5 8月 22 16:58 5
crw--w---- 1 lightdm tty 136, 6 8月 22 16:58 6
crw--w---- 1 lightdm tty 136, 7 8月 22 16:58 7
crw--w---- 1 admin1 tty 136, 8 8月 26 16:55 8
crw--w---- 1 admin1 utmp 136, 9 8月 23 18:24 9

Output of docker version:
$ docker version
Client: Docker Engine - Community
Version: 19.03.1
API version: 1.40
Go version: go1.12.5
Git commit: 74b1e89
Built: Thu Jul 25 21:21:35 2019
OS/Arch: linux/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 19.03.1
API version: 1.40 (minimum version 1.12)
Go version: go1.12.5
Git commit: 74b1e89
Built: Thu Jul 25 21:20:09 2019
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.6
GitCommit: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc:
Version: 1.0.0-rc8
GitCommit: 425e105d5a03fabd737a126ad93d62a9eeede87f
docker-init:
Version: 0.18.0
GitCommit: fec3683

(paste your output here)

Output of docker info:
$ docker info
Client:
Debug Mode: false

Server:
Containers: 2
Running: 0
Paused: 0
Stopped: 2
Images: 2
Server Version: 19.03.1
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
init version: fec3683
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.4.0
Operating System: Ubuntu 16.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.56GiB
Name: nntc-1684-pcie
ID: YMEP:XBUT:HRSU:BINS:25GU:WGVL:NVXP:CM4Z:SESY:T6GL:6YNE:A32B
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support
WARNING: No kernel memory limit support
WARNING: No kernel memory TCP limit support

(paste your output here)

Additional environment details (AWS, VirtualBox, physical, etc.):
My OS version:
$ cat /etc/issue
Ubuntu 16.04.3 LTS \n \l

@shlliu
Copy link
Author

shlliu commented Aug 26, 2019

BTW, adding -v /dev:/dev option can workaround this issue, but I still want to know what exactly caused this issue.

@gdubicki
Copy link

For posterity (including possibly the future me...):

I run into this error because I thought that it's a great idea to mount the app code I am developing under the /dev dir with -v $(pwd):/dev. 🤦‍♂️

Don't be like me, mount it under a normal dir like /foobar instead.

@behai-nguyen
Copy link

BTW, adding -v /dev:/dev option can workaround this issue, but I still want to know what exactly caused this issue.

shlliu thank you for the info. I am having the same issue with Docker on my Synology DS218 box.

This would not work:

$ sudo docker run -it --network=host -v "/run/docker.sock:/var/run/docker.sock" --rm flask-restx-demo-arm64 bash

But this works:

$ sudo docker run -it --network=host -v /dev:/dev --rm flask-restx-demo-arm64 bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants