Unable to get tty name: Bad file descriptor

You may receive an error as “Unable to get tty name: Bad file descriptor” while accessing a VPS from the host server. The problem occur when some files from /lib directory of the VPS goes missing. See example below:

root@hostserver:/# vzctl enter VEID
entered into CT VEID
Unable to get tty name:
Bad file descriptor

In this case, you will either have to copy the /lib directory from a different VPS of the same template

# cp -R /vz/root/VEID1/libĀ  /vz/root/VEID/

(where, VEID1 is the VPS ID of a different VPS using the same OS template)

OR extract the respective OS template and copy the /lib directory from it:

# tar -zxf /vz/template/cache/os_template.tar.gz
# cp -R /vz/template/cache/lib /vz/root/VEID/

Reboot the VPS

# vzctl restart VEID

This entry was posted on Saturday, February 6th, 2010 and is filed under VPS Management. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.