December 21, 20223 yr After testing a self build container, I'm no longer able to open the console of any of the running dockers. I already removed the self build container and all unused volumes and images. When trying to connect to the console of a docker, I get the following error: OCI runtime exec failed: exec failed: unable to start container process: open /dev/ptmx: no space left on device: unknown I also have tried to stop an start docker, but this did not help. All running dockers seem to be running without problems. Does anybody have any idea what could have created this issue and how to resolve this? P.S. These are the values of docker container sizes: Total size 29.3 GB 7.05 GB 2.19 GB
December 21, 20223 yr I'm seeing the same thing when opening the console window to any running docker container. A reboot fixes it a few hours, but at some point this happens again. Same symptoms as you - stopping/restarting doesn't help. My docker.img is not full.
December 21, 20223 yr Author After doing loads of google searches, I finally found the correct syntax and a workaround. I seamed like the pts sessions are not correctly closed or unallocated. the amount of pseudo terminals is so high bij running: ls /dev/pts | wc -l I see there are 3432. As a workaround, I upped the amount by running. sysctl -w kernel.pty.max=8192 I'm not sure if this is because of something I did while creating my self build container, or this is due to an old kernel bug (https://lkml.org/lkml/2009/11/5/370) Edited December 21, 20223 yr by capino
December 21, 20223 yr Same thing on my box: cat /proc/sys/kernel/pty/max == 4096 cat /proc/sys/kernel/pty/nr == 3518 cat /proc/sys/kernel/pty/reserve == 1024 I'm not creating my own containers.
December 21, 20223 yr Author I did some additional testing and it looks like, when a docker container console session is opened in a browser, multiple Pty's are allocated, but only one gets unallocated on close. When I open Unraid Pty console session only 1 is allocated. But sometimes the browser windows is not closed on running exit (a new Pty is opened). Running exit in this second (new) session keeps both allocated. Using ssh through a remote terminal seems (for now with some quick tests) not to keep Pty's allocated. Edited December 21, 20223 yr by capino sometimes more than 2 Pty's are allocated
December 24, 20223 yr After 3 days after a reboot my open ptys are holding steady at 3524 (give-or-take). After hitting this point I dont see ptys not being closed anymore.
January 8, 20233 yr I'm slightly creeping up after 2 weeks. root@Tower:~# !45 cat /proc/sys/kernel/pty/nr 3714 root@Tower:~# uptime 21:28:59 up 17 days, 10:55, 0 users, load average: 0.35, 0.29, 0.27 root@Tower:~#
February 2, 20233 yr Bump. Was running into this same problem which was preventing me from opening up a console for a few docker containers i needed to work in. I had somewhere around 37xx pts. Upping it to 8192 allowed me to access the consoles. This is way beyond my knowledge base - anyone know what causes this or what can reliably allow us to release some of those pts "reservations?"
February 3, 20233 yr I am also running into this issue where consoles will no longer open for any docker. I can't even SSH into it: Server refused to allocate pty. Rebooting has allowed me to open consoles and logs again. Edited February 3, 20233 yr by MrDecepticon
August 12, 20232 yr I just started getting this problem and can't seem to work around it. I'm running 6.11.5 I've tried running sysctl -w kernel.pty.max=8192 and my pty.max is set to 8192, but I still can't open a docker console. My ls /dev/pts | wc -l has 3497, so it's not at the max ptys ... I'm not sure what to do at this point? I've started and stopped the docker (and all the docker images of course) ... they all start and stop just fine and I can disable docker and re-enabled it just fine... just can't seem to get into the console. Edited August 12, 20232 yr by Naonak
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.