Difference between revisions of "Container enter failed"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
(type, <a href="http://revistainfo.ning.com/profiles/blogs/download-the-neverending-story">Download The NeverEnding Story movie</a>, [url="http://revistainfo.ning.com/profiles/blogs/download-the-nevere)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
== Symptoms ==
  
 +
<pre>
 +
error: open pty: No such file or directory
 +
</pre>
 +
 +
== Solutions ==
 +
 +
=== Using strace ===
 +
 +
You can use [http://linux.die.net/man/1/strace strace] to analyse the command further:
 +
<pre>
 +
# strace -ff vzctl enter 101
 +
....
 +
fstat64(...st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0)...) fail
 +
....
 +
</pre>
 +
 +
Recompile the kernel with the following option:
 +
CONFIG_LEGACY_PTYS=y
 +
 +
=== LEGACY_PTYS ===
 +
 +
==== Temporary fix ====
 +
''Note: This is a temporary fix so you can enter the VE.''
 +
 +
* Create the LEGACY_PTYS devices:
 +
 +
vzctl exec 101 /sbin/MAKEDEV tty
 +
vzctl exec 101 /sbin/MAKEDEV pty
 +
vzctl exec 101 mknod --mode=666 /dev/ptmx c 5 2
 +
vzctl enter 101
 +
 +
==== Permanent fix with udev ====
 +
* For a permanent fix with udev, you will need to force udev to make LEGACY_PTYS:
 +
 +
cat > /etc/udev/makedev.d/51-udev.nodes
 +
# These device have to be created manually
 +
tty0
 +
tty1
 +
tty2
 +
tty3
 +
....
 +
ttyp0
 +
ttyp1
 +
ttyp2
 +
ttyp3
 +
....
 +
ptyp0
 +
ptyp1
 +
ptyp2
 +
ptyp3
 +
....
 +
 +
==== Permanent fix without udev ====
 +
* Alternatively, you can disable udev:
 +
 +
Edit the ''/etc/rc.d/rc.sysinit'' file and comment out the ''/sbin/start_udev'' line
 +
 +
Or you can run the following command:
 +
 +
sed -i 's|/sbin/start_udev|#/sbin/start_udev|g' /etc/rc.d/rc.sysinit
 +
 +
''Warning'' Updates to the package which owns this file may revert your changes.
 +
 +
''Note'' This was tested with CentOS VE.
 +
 +
=== Debian only ===
 +
 +
* Enter the VE manually
 +
CTID=101
 +
vzctl exec $CTID "mount -t devpts devpts /dev/pts"
 +
vzctl enter $CTID
 +
 +
* Remove udev using apt
 +
CTID=101
 +
vzctl exec $CTID apt-get remove udev
 +
vzctl restart $CTID
 +
 +
=== Older Slackware ===
 +
 +
Check that /dev/pts is mounted under the container as a devpts filesystem:
 +
 +
vzctl exec VEID mount
 +
 +
If it is not, try this immediate fix:
 +
 +
vzctl exec VEID mount /dev/pts
 +
 +
You should now be able to enter the VPS. You will need to fix /etc/rc.d/rc.S and/or /etc/fstab to ensure that /dev/pts is mounted in the boot process.
  
type, <a href="http://revistainfo.ning.com/profiles/blogs/download-the-neverending-story">Download The NeverEnding Story movie</a>, [url="http://revistainfo.ning.com/profiles/blogs/download-the-neverending-story"]Download The NeverEnding Story movie[/url], http://revistainfo.ning.com/profiles/blogs/download-the-neverending-story Download The NeverEnding Story movie,  jgip, <a href="http://bobvillage.ning.com/profiles/blogs/download-lonesome-dove-movie">Download &#x22;Lonesome Dove&#x22; movie</a>, [url="http://bobvillage.ning.com/profiles/blogs/download-lonesome-dove-movie"]Download &#x22;Lonesome Dove&#x22; movie[/url], http://bobvillage.ning.com/profiles/blogs/download-lonesome-dove-movie Download &#x22;Lonesome Dove&#x22; movie,  14624, <a href="http://forecastmba.ning.com/profiles/blogs/download-day-watch-movie">Download Day Watch movie</a>, [url="http://forecastmba.ning.com/profiles/blogs/download-day-watch-movie"]Download Day Watch movie[/url], http://forecastmba.ning.com/profiles/blogs/download-day-watch-movie Download Day Watch movie,  fegk, <a href="http://www.theworldmindnetwork.net/profiles/blogs/download-life-after-people">Download Life After People movie</a>, [url="http://www.theworldmindnetwork.net/profiles/blogs/download-life-after-people"]Download Life After People movie[/url], http://www.theworldmindnetwork.net/profiles/blogs/download-life-after-people Download Life After People movie,  sygpb, <a href="http://heypapipromotions.ning.com/profiles/blogs/download-from-dusk-till-dawn">Download From Dusk Till Dawn movie</a>, [url="http://heypapipromotions.ning.com/profiles/blogs/download-from-dusk-till-dawn"]Download From Dusk Till Dawn movie[/url], http://heypapipromotions.ning.com/profiles/blogs/download-from-dusk-till-dawn Download From Dusk Till Dawn movie,  817, <a href="http://community.momlogic.com/profiles/blogs/download-venom-movie">Download Venom movie</a>, [url="http://community.momlogic.com/profiles/blogs/download-venom-movie"]Download Venom movie[/url], http://community.momlogic.com/profiles/blogs/download-venom-movie Download Venom movie,  638, <a href="http://britflorida.ning.com/profiles/blogs/download-into-the-deep-movie">Download Into the Deep movie</a>, [url="http://britflorida.ning.com/profiles/blogs/download-into-the-deep-movie"]Download Into the Deep movie[/url], http://britflorida.ning.com/profiles/blogs/download-into-the-deep-movie Download Into the Deep movie,  =(((, <a href="http://mirandaforauditor.ning.com/profiles/blogs/download-unrequited-movie">Download Unrequited movie</a>, [url="http://mirandaforauditor.ning.com/profiles/blogs/download-unrequited-movie"]Download Unrequited movie[/url], http://mirandaforauditor.ning.com/profiles/blogs/download-unrequited-movie Download Unrequited movie,  153, <a href="http://practicingtheologians.ning.com/profiles/blogs/download-jungle-fever-movie">Download Jungle Fever movie</a>, [url="http://practicingtheologians.ning.com/profiles/blogs/download-jungle-fever-movie"]Download Jungle Fever movie[/url], http://practicingtheologians.ning.com/profiles/blogs/download-jungle-fever-movie Download Jungle Fever movie,  4133, <a href="http://clydecomedy.ning.com/profiles/blogs/download-next-movie">Download Next movie</a>, [url="http://clydecomedy.ning.com/profiles/blogs/download-next-movie"]Download Next movie[/url], http://clydecomedy.ning.com/profiles/blogs/download-next-movie Download Next movie,  miyk, <a href="http://smashblocktv.com/profiles/blogs/download-charlie-st-cloud">Download Charlie St. Cloud movie</a>, [url="http://smashblocktv.com/profiles/blogs/download-charlie-st-cloud"]Download Charlie St. Cloud movie[/url], http://smashblocktv.com/profiles/blogs/download-charlie-st-cloud Download Charlie St. Cloud movie,  >:-[[, <a href="http://myhollywoodnews.ning.com/profiles/blogs/download-gothika-movie">Download Gothika movie</a>, [url="http://myhollywoodnews.ning.com/profiles/blogs/download-gothika-movie"]Download Gothika movie[/url], http://myhollywoodnews.ning.com/profiles/blogs/download-gothika-movie Download Gothika movie,  114, <a href="http://blog.bitcomet.com/post/1822098/">Download Step Up 3D movie</a>, [url="http://blog.bitcomet.com/post/1822098/"]Download Step Up 3D movie[/url], http://blog.bitcomet.com/post/1822098/ Download Step Up 3D movie,  gnaquu, <a href="http://teamflightclub.com/profiles/blogs/download-hairspray-movie">Download Hairspray movie</a>, [url="http://teamflightclub.com/profiles/blogs/download-hairspray-movie"]Download Hairspray movie[/url], http://teamflightclub.com/profiles/blogs/download-hairspray-movie Download Hairspray movie,  lkmbq, <a href="http://fizzandboog.ning.com/profiles/blogs/download-der-baader-meinhof">Download Der Baader Meinhof Komplex movie</a>, [url="http://fizzandboog.ning.com/profiles/blogs/download-der-baader-meinhof"]Download Der Baader Meinhof Komplex movie[/url], http://fizzandboog.ning.com/profiles/blogs/download-der-baader-meinhof Download Der Baader Meinhof Komplex movie,  6737, <a href="http://fizzandboog.ning.com/profiles/blogs/download-the-invention-of">Download The Invention of Lying movie</a>, [url="http://fizzandboog.ning.com/profiles/blogs/download-the-invention-of"]Download The Invention of Lying movie[/url], http://fizzandboog.ning.com/profiles/blogs/download-the-invention-of Download The Invention of Lying movie,  %-DD, <a href="http://teamflightclub.com/profiles/blogs/download-burlesque-movie">Download Burlesque movie</a>, [url="http://teamflightclub.com/profiles/blogs/download-burlesque-movie"]Download Burlesque movie[/url], http://teamflightclub.com/profiles/blogs/download-burlesque-movie Download Burlesque movie,  8), <a href="http://blog.bitcomet.com/post/1822498/">Download The Man in the Iron Mask movie</a>, [url="http://blog.bitcomet.com/post/1822498/"]Download The Man in the Iron Mask movie[/url], http://blog.bitcomet.com/post/1822498/ Download The Man in the Iron Mask movie,  uhjg, <a href="http://mirandaforauditor.ning.com/profiles/blogs/download-coronation-street">Download Coronation Street | Season 1 movie</a>, [url="http://mirandaforauditor.ning.com/profiles/blogs/download-coronation-street"]Download Coronation Street | Season 1 movie[/url], http://mirandaforauditor.ning.com/profiles/blogs/download-coronation-street Download Coronation Street | Season 1 movie,  joo, <a href="http://eleganthoodness.ning.com/profiles/blogs/download-chloe-movie">Download Chloe movie</a>, [url="http://eleganthoodness.ning.com/profiles/blogs/download-chloe-movie"]Download Chloe movie[/url], http://eleganthoodness.ning.com/profiles/blogs/download-chloe-movie Download Chloe movie,  =-D, <a href="http://fightclubbunny.ning.com/profiles/blogs/download-cloverfield-movie">Download Cloverfield movie</a>, [url="http://fightclubbunny.ning.com/profiles/blogs/download-cloverfield-movie"]Download Cloverfield movie[/url], http://fightclubbunny.ning.com/profiles/blogs/download-cloverfield-movie Download Cloverfield movie,  lelxf, <a href="http://bhaktistudies.ning.com/profiles/blogs/download-the-pianist-movie">Download The Pianist movie</a>, [url="http://bhaktistudies.ning.com/profiles/blogs/download-the-pianist-movie"]Download The Pianist movie[/url], http://bhaktistudies.ning.com/profiles/blogs/download-the-pianist-movie Download The Pianist movie,  8-[[[, <a href="http://mirandaforauditor.ning.com/profiles/blogs/download-jennifers-body-movie">Download Jennifer&s Body movie</a>, [url="http://mirandaforauditor.ning.com/profiles/blogs/download-jennifers-body-movie"]Download Jennifer&s Body movie[/url], http://mirandaforauditor.ning.com/profiles/blogs/download-jennifers-body-movie Download Jennifer&s Body movie,  3304, <a href="http://goodgriefamerica.ning.com/profiles/blogs/download-what-about-bob-movie">Download What About Bob? movie</a>, [url="http://goodgriefamerica.ning.com/profiles/blogs/download-what-about-bob-movie"]Download What About Bob? movie[/url], http://goodgriefamerica.ning.com/profiles/blogs/download-what-about-bob-movie Download What About Bob? movie,  kzjbdl, <a href="http://justletmeliedown.ning.com/profiles/blogs/download-reign-of-fire-movie">Download Reign of Fire movie</a>, [url="http://justletmeliedown.ning.com/profiles/blogs/download-reign-of-fire-movie"]Download Reign of Fire movie[/url], http://justletmeliedown.ning.com/profiles/blogs/download-reign-of-fire-movie Download Reign of Fire movie,  qqrg, <a href="http://theproductionlounge.ning.com/profiles/blogs/download-16-blocks-movie">Download 16 Blocks movie</a>, [url="http://theproductionlounge.ning.com/profiles/blogs/download-16-blocks-movie"]Download 16 Blocks movie[/url], http://theproductionlounge.ning.com/profiles/blogs/download-16-blocks-movie Download 16 Blocks movie,  40917, <a href="http://teamflightclub.com/profiles/blogs/download-bulletproof-monk-1">Download Bulletproof Monk movie</a>, [url="http://teamflightclub.com/profiles/blogs/download-bulletproof-monk-1"]Download Bulletproof Monk movie[/url], http://teamflightclub.com/profiles/blogs/download-bulletproof-monk-1 Download Bulletproof Monk movie,  :-((, <a href="http://blog.bitcomet.com/post/1822015/">Download The Dilemma movie</a>, [url="http://blog.bitcomet.com/post/1822015/"]Download The Dilemma movie[/url], http://blog.bitcomet.com/post/1822015/ Download The Dilemma movie,  ziak, <a href="http://hockeyband.ning.com/profiles/blogs/download-aladdin-movie">Download Aladdin movie</a>, [url="http://hockeyband.ning.com/profiles/blogs/download-aladdin-movie"]Download Aladdin movie[/url], http://hockeyband.ning.com/profiles/blogs/download-aladdin-movie Download Aladdin movie,  4683,
 
  
 
== See also ==
 
== See also ==

Latest revision as of 19:30, 30 September 2014

Symptoms[edit]

error: open pty: No such file or directory

Solutions[edit]

Using strace[edit]

You can use strace to analyse the command further:

# strace -ff vzctl enter 101
....
fstat64(...st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0)...) fail
....

Recompile the kernel with the following option:

CONFIG_LEGACY_PTYS=y

LEGACY_PTYS[edit]

Temporary fix[edit]

Note: This is a temporary fix so you can enter the VE.

  • Create the LEGACY_PTYS devices:
vzctl exec 101 /sbin/MAKEDEV tty
vzctl exec 101 /sbin/MAKEDEV pty
vzctl exec 101 mknod --mode=666 /dev/ptmx c 5 2
vzctl enter 101

Permanent fix with udev[edit]

  • For a permanent fix with udev, you will need to force udev to make LEGACY_PTYS:
cat > /etc/udev/makedev.d/51-udev.nodes
# These device have to be created manually
tty0
tty1
tty2
tty3
....
ttyp0
ttyp1
ttyp2
ttyp3
....
ptyp0
ptyp1
ptyp2
ptyp3
....

Permanent fix without udev[edit]

  • Alternatively, you can disable udev:

Edit the /etc/rc.d/rc.sysinit file and comment out the /sbin/start_udev line

Or you can run the following command:

sed -i 's|/sbin/start_udev|#/sbin/start_udev|g' /etc/rc.d/rc.sysinit

Warning Updates to the package which owns this file may revert your changes.

Note This was tested with CentOS VE.

Debian only[edit]

  • Enter the VE manually
CTID=101
vzctl exec $CTID "mount -t devpts devpts /dev/pts" 
vzctl enter $CTID
  • Remove udev using apt
CTID=101
vzctl exec $CTID apt-get remove udev
vzctl restart $CTID

Older Slackware[edit]

Check that /dev/pts is mounted under the container as a devpts filesystem:

vzctl exec VEID mount

If it is not, try this immediate fix:

vzctl exec VEID mount /dev/pts

You should now be able to enter the VPS. You will need to fix /etc/rc.d/rc.S and/or /etc/fstab to ensure that /dev/pts is mounted in the boot process.


See also[edit]