Unable to open Docker console. exec failed: unable to start container process: open /dev/ptmx: no space left on device: unknown


capino

Recommended Posts

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

Link to comment

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 by capino
Link to comment

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 by capino
sometimes more than 2 Pty's are allocated
Link to comment
  • 2 weeks later...
  • 4 weeks later...

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?"

Link to comment
  • 3 weeks later...
  • 4 months later...
  • 1 month later...

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 by Naonak
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.