OpenVZ Forum


Home » General » Support » Unable to open pty: No such file or directory
Unable to open pty: No such file or directory [message #34069] Sat, 29 November 2008 16:53 Go to next message
Woet is currently offline  Woet
Messages: 9
Registered: November 2008
Junior Member
When I try to enter my VPS, I get the following error:

# vzctl enter 101
enter into VE 101 failed
Unable to open pty: No such file or directory


I found a website regarding this problem, which is here:
http://platonic.techfiz.info/2008/10/08/unable-to-open-pty-n o-such-file-or-directory/

Unfortunaly, the fixes there do not work.
MAKEDEV returns the following:
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices


And creates a few hunderd files in the root of the VPS.
The permanent fix explained there won't work either, none of the files mentioned exist on my system:
/etc/rc.sysinit 
/sbin/start_udev


The only fix I found is rebooting it everytime, but this is a live server and it can't continue like this.
There are other containers running just fine without this problem, so I have no idea what to do.
Re: Unable to open pty: No such file or directory [message #34077 is a reply to message #34069] Sun, 30 November 2008 20:11 Go to previous messageGo to next message
mhw is currently offline  mhw
Messages: 12
Registered: March 2007
Junior Member
You don't say what distribution you are running in that container. The fixes you pointed to are largely for rpm based guests, Fedora / RedHat / CentOS. All of those should have an /etc/rc.sysinit file (/vz/root/101/etc/rc.sysinit in the case of 101 seen from the host system). You would probably only see a /sbin/udev_start file if you had updated that container and yum had installed/updated the udev package. Neither of those files exist in an Ubuntu system, if that's what your guest is.

I found that the fix of commenting out the udev_start command in /etc/rc.sysinit less than reliable simply because an update may replace that script (rare but happens, especially during distro upgrades) and you don't find this out until after you reboot the container and get the exact symptoms you describe. I found it more effective to put an "exit 0" at the top of the /vz/root/{$VE}/etc/udev/udev.conf file (that's sourced by start_udev and causes the script to terminate). That shouldn't get overwritten by an update / upgrade. Which probably also doesn't help you if you're not running one of the rpm based distros. The /etc/udev/udev.conf file does exist on Ubuntu but I don't know what impact adding the "exit 0" at the top will have.

If you are running Debian / Ubuntu or Slackware, you'll have to figure out how they are handling udev. I see it running on one of my Ubuntu systems but that system has neither /etc/rc.sysinit or /sbin/start_udev. It's started somewhere else. But I don't run apt based guests on my OpenVZ engines.

What I find strange is your claim that you have to reboot to fix this. That doesn't make sense if it's the udev problem described in those other links. Udev starts at boot and you should immediately fail trying to enter right after boot. The symptoms that those other fixes were addressing was getting that error after rebooting following an update. When does this problem occur? Immediately? Shortly after boot? After a few days? If you can get in right away after boot, see if and when udev starts and keep that shell open until things fail and you can't start new shells. The old shell should be still connected.

The problem with MAKEDEV is that /proc/devices is not showing up in the VE /proc directory. I see that on my systems as well. Not sure what the solution there is but I haven't needed MAKEDEV after disabling udev.

Oh... And the fact that vzctl is saying "enter into VE 102..." instead of "entered into CT 102" probably means you need to update your utilities. Just as a WAG. I think that change in nomenclature is fairly recent.
Re: Unable to open pty: No such file or directory [message #34135 is a reply to message #34069] Sun, 07 December 2008 01:39 Go to previous message
vzadmin is currently offline  vzadmin
Messages: 10
Registered: December 2008
Junior Member

Can you try this when you login to the VE ?

rpm -qf /etc/udev/makedev.d/50-udev.nodes
udev-095-14.9.el5

rpm -e udev-095-14.9.el5 –nodeps

Or execute this directly from the host:

vzctl exec veid update-rc.d -f udev remove
vzctl restart veid


If that fails as well, try installing the vzdev rpm by copying it from the HN to /opt on the Container.

Hope that helps..


[Updated on: Sun, 07 December 2008 01:40]

Report message to a moderator

Previous Topic: portable IP problem[solved]
Next Topic: Deleting personal data in vps (and rpms from updates etc) for rebuild new personalized vps template
Goto Forum:
  


Current Time: Fri May 03 23:53:39 GMT 2024

Total time taken to generate the page: 0.01700 seconds