PTY allocation request failed on channel 0: CentOS, OpenVZ and udev problem.

Monday, December 7, 2009

The scenario:

CentOS linux running on OpenVZ (that is a VPS server) and have udev installed. You try to connect to the server with shh.

The problem:

You get this annoying message: "PTY allocation request failed on channel 0"

The reason:

udev has compatibility problems with OpenVZ. So when you have for example a CentOS system and you try to install ImageMagik the yum package manager also installs the udev package. This leads to problematic setup of the pty devices (/dev/pty, /dev/ptmx, etc) on boot.

The temporary fix:

The permanent fix:

Make a script with the previous commands (excluding the ssh part) and call it from the /etc/rc.d/rc.local.

Thanks to:

Hope this helps - once and for all :)

Reblog this post [with Zemanta]


  • Kevin Labecot

    Thanks a lot, it helps us a lot !

  • Unknown

    You're welcome, it was really annoying the first time it happend (and really scary... :D)

  • Brian Fiedler

    Thank you so much! That solved my problem!

  • For Arch Linux, I did the exact same thing. However, for the permanent fix I just needed to add the dir to fstab instead of creating the startup script:

    cat "devpts /dev/pts devpts defaults 0 0" >> /etc/fstab

    Then it would be mounted on each reboot.

  • Oops.. I meant "echo" instead of "cat":

    echo "devpts /dev/pts devpts defaults 0 0" >> /etc/fstab

  • Please ignore the last two posts about ArchLinux. The error message may be the same, but my ArchLinux problems with /dev/pts seem to be very different to the /dev/pts problem on CentOS on OpenVZ. Sorry for the confusion.

  • Unknown

    No worries! Thanks for posting your findings anyway!

  • Post a Comment