OpenVZ Forum


Home » General » Support » VE fails to startx
VE fails to startx [message #32642] Thu, 21 August 2008 15:16 Go to next message
satimis is currently offline  satimis
Messages: 39
Registered: August 2008
Member
Hi folks,


xorg package installed
Xephyr desktop installed


[Host]# vzctl enter 101
entered into VE 101


[VE]# startx

X: warning; process set to priority -1 instead of requested priority 0

This is a pre-release version of the X server from The X.Org Foundation.
It is not supported in any way.
Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.
Select the "xorg" product for bugs you find in this release.
Before reporting bugs in pre-release versions please check the
latest version in the X.Org Foundation git repository.
See http://wiki.x.org/wiki/GitPage for git access instructions.

X.Org X Server 1.4.0.90
Release Date: 5 September 2007
X Protocol Version 11, Revision 0
Build Operating System: Linux Ubuntu (xorg-server 2:1.4.1~git20080131-1ubuntu9.2)
Current Operating System: Linux satimis-desktop32 2.6.24-19-openvz #1 SMP Sat Jul 12 05:02:33 UTC 2008 i686
Build Date: 13 June 2008  01:08:21AM
 
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu Aug 21 14:46:31 2008
(==) Using config file: "/etc/X11/xorg.conf"

Fatal server error:
xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)

giving up.
xinit:  Connection reset by peer (errno 104):  unable to connect to X server
xinit:  No such process (errno 3):  Server error.


[VE]# ls -l /dev/ | grep tty0
crw------- 1 root   root      4,   0 May 13 05:51 tty0


[VE]# lsmod
               
Module                  Size  Used by


[VE]/# tail var/log/Xorg.0.log
(II) Module pcidata: vendor="X.Org Foundation"
	compiled for 1.4.0.90, module version = 1.0.0
	ABI class: X.Org Video Driver, version 2.0

Fatal server error:
xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)

(WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
(WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
(WW) xf86OpenConsole: VT_GETSTATE failed: Bad file descriptor


[VE]# exit
                              
logout
exited from VE 101


[Host]# vzctl set 101 --devnodes /dev/tty:rw
Incorrect device name /dev//dev/tty: No such file or directory
Bad parameter for --devnodes: /dev/tty:rw


[Host]# vzctl set 101 --devnodes /dev/tty0:rw
Incorrect device name /dev//dev/tty0: No such file or directory
Bad parameter for --devnodes: /dev/tty0:rw


Please advise how to fix the problem. TIA


B.R.
satimis
Re: VE fails to startx [message #32645 is a reply to message #32642] Thu, 21 August 2008 15:56 Go to previous messageGo to next message
piavlo is currently offline  piavlo
Messages: 159
Registered: January 2007
Senior Member
First checj that /dev/tty{1,2,3,4,.....} also exist, if they do
read on.

Omit /dev
vzctl set 101 --devnodes tty0:rw


Also tty0 is the current virtual console, while real ttys start with tty1. I don't know how it interacts between VE and HN, but probably you need to give VE the access to the first free tty of HN
and not to tty0. By default in HN inittab allocates tty1 to tty6 for getty process. Now if you are also running X server on HN it uses tty7.
So probably you should give tty8 access to VE.
Re: VE fails to startx [message #32646 is a reply to message #32645] Thu, 21 August 2008 16:01 Go to previous messageGo to next message
piavlo is currently offline  piavlo
Messages: 159
Registered: January 2007
Senior Member
http://wiki.openvz.org/X_inside_VE
Re: VE fails to startx [message #32682 is a reply to message #32645] Sat, 23 August 2008 15:15 Go to previous messageGo to next message
satimis is currently offline  satimis
Messages: 39
Registered: August 2008
Member
piavlo wrote on Thu, 21 August 2008 23:56

First checj that /dev/tty{1,2,3,4,.....} also exist, if they do
read on.

Omit /dev
vzctl set 101 --devnodes tty0:rw


Also tty0 is the current virtual console, while real ttys start with tty1. I don't know how it interacts between VE and HN, but probably you need to give VE the access to the first free tty of HN
and not to tty0. By default in HN inittab allocates tty1 to tty6 for getty process. Now if you are also running X server on HN it uses tty7.
So probably you should give tty8 access to VE.

Hi piavlo,


Thanks for your advice and URL. Performed following steps;


[Host]# ps -ef | grep init | grep -v grep
root         1     0  0 20:59 ?        00:00:01 /sbin/init
root      5529     1  0 21:00 ?        00:00:00 init



[Host]# netstat -anp | grep init | grep -v grep
unix  2      [ ]         DGRAM                    6314     1/init              @/com/ubuntu/upstart



[Host]# initctl list
control-alt-delete (stop) waiting
logd (stop) waiting
rc-default (stop) waiting
rc0 (stop) waiting
rc1 (stop) waiting
rc2 (stop) waiting
rc3 (stop) waiting
rc4 (stop) waiting
rc5 (stop) waiting
rc6 (stop) waiting
rcS (stop) waiting
rcS-sulogin (stop) waiting
sulogin (stop) waiting
tty1 (start) running, process 6314
tty2 (start) running, process 4853
tty3 (start) running, process 4856
tty4 (start) running, process 4850
tty5 (start) running, process 4851
tty6 (start) running, process 4857



[Host]# vzctl set 101 --devnodes tty8:rw
Setting devices
WARNING: Settings were not saved and will be resetted to original values on next



[Host]# vzctl set 101 --devnodes tty8:rw save
non-option ARGV-elements: save 



[Host]# vzctl enter 101
entered into VE 101



[VE]# startx
X: warning; process set to priority -1 instead of requested priority 0

This is a pre-release version of the X server from The X.Org Foundation.
It is not supported in any way.
Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.
Select the "xorg" product for bugs you find in this release.
Before reporting bugs in pre-release versions please check the
latest version in the X.Org Foundation git repository.
See http://wiki.x.org/wiki/GitPage for git access instructions.

X.Org X Server 1.4.0.90
Release Date: 5 September 2007
X Protocol Version 11, Revision 0
Build Operating System: Linux Ubuntu (xorg-server 2:1.4.1~git20080131-1ubuntu9.2)
Current Operating System: Linux satimis-desktop32 2.6.24-19-openvz #1 SMP Sat Jul 12 05:02:33 UTC 2008 i686
Build Date: 13 June 2008  01:08:21AM
 
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat Aug 23 15:06:23 2008
(==) Using config file: "/etc/X11/xorg.conf"

Fatal server error:
xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)

giving up.
xinit:  Connection reset by peer (errno 104):  unable to connect to X server
xinit:  No such process (errno 3):  Server error.



[VE]# tail var/log/Xorg.0.log
(II) Module pcidata: vendor="X.Org Foundation"
	compiled for 1.4.0.90, module version = 1.0.0
	ABI class: X.Org Video Driver, version 2.0

Fatal server error:
xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)

(WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
(WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
(WW) xf86OpenConsole: VT_GETSTATE failed: Bad file descriptor


Please help. TIA


B.R.
satimis
Re: VE fails to startx [message #32696 is a reply to message #32682] Sun, 24 August 2008 22:34 Go to previous messageGo to next message
piavlo is currently offline  piavlo
Messages: 159
Registered: January 2007
Senior Member
Probably X server (like getty) requires direct access to HN console/tty and probably you just can't have it in VE.

To verfy this would you mind performing the following test?:
Let's check if you can get virtual console with getty in VE
get displayed on HN monitor( just like like HN getty's which can be
accessed with Ctrl+Alt+F*)
1)First of all,if you have any, stop X server on HN, so that /dev/tty7 is not occupied by it.
2)In VE create for upstart /etc/event.d/tty7 (similar to
/etc/event.d/tty{1,2,3,4,5,6} in HN) and make sure it actually uses
tty7
3) Give VE access to /dev/tty{0,7}
vzctl set 101 --devnodes tty0:rw
vzctl set 101 --devnodes tty7:rw
(don't know if /dev/tty0 is needed)
4)start your VE
5)Check in front of HN monitor if Ctrl+Alt+F7 gives you
the virtual console of your VE.

Anyway the proper way to go is to use vnc server or XDMCP (which do not require console access) like explained in. http://wiki.openvz.org/X_inside_VE. Anyway you need real X server
in VE only if you use the HN as your desktop station and want to run X server inside VE and not HN (hard to believe you actually want this).
Re: VE fails to startx [message #32701 is a reply to message #32696] Mon, 25 August 2008 07:02 Go to previous messageGo to next message
satimis is currently offline  satimis
Messages: 39
Registered: August 2008
Member
piavlo wrote on Mon, 25 August 2008 06:34

Probably X server (like getty) requires direct access to HN console/tty and probably you just can't have it in VE.

To verfy this would you mind performing the following test?:
Let's check if you can get virtual console with getty in VE
get displayed on HN monitor( just like like HN getty's which can be
accessed with Ctrl+Alt+F*)
1)First of all,if you have any, stop X server on HN, so that /dev/tty7 is not occupied by it.
2)In VE create for upstart /etc/event.d/tty7 (similar to
/etc/event.d/tty{1,2,3,4,5,6} in HN) and make sure it actually uses
tty7
3) Give VE access to /dev/tty{0,7}
vzctl set 101 --devnodes tty0:rw
vzctl set 101 --devnodes tty7:rw
(don't know if /dev/tty0 is needed)
4)start your VE
5)Check in front of HN monitor if Ctrl+Alt+F7 gives you
the virtual console of your VE.


Hi piavlo,


Ubuntu is running as Host here. The problem on Ubunut is without init 2/3/etc, only graphic and non-graphic modes. I can't do anything on grub menu. I tried it previously. On grub menu I have to select graphic/non graphic modes. On non-graphic mode it drops to root shell as rescue mode. I tried the OpenVZ kernel rescue mode. On root shell vzctl is not started. Nothing I can do.


I tried booting up Ubuntu. Pressed [Ctrl]+F3 switching to non graphic mode. However X is running. Ignoring it performed follows;

[Host]# vzctl stop 101

[Host]# initctl list
showing tty7 is not running

[Host]# vzctl create 101 --devnodes /etc/event.d/tty7
101: unrecognized option `--devnode'

[Host]# vzctl create 101 --device /etc/event.d/tty7
101: unrecognized option `--device'

Unable to proceed further.


Quote:


Anyway the proper way to go is to use vnc server or XDMCP (which do not require console access) like explained in. http://wiki.openvz.org/X_inside_VE. Anyway you need real X server
in VE only if you use the HN as your desktop station and want to run X server inside VE and not HN (hard to believe you actually want this).

I tried it before unable to to start/forward X. Then I tried entering VE to start X there to see whether it will work.


B.R.
satimis
Re: VE fails to startx [message #32708 is a reply to message #32701] Mon, 25 August 2008 08:51 Go to previous message
piavlo is currently offline  piavlo
Messages: 159
Registered: January 2007
Senior Member
/etc/event.d/tty7 is not a device, read more about upstart
And change your grub config to boot to non graphic runlevel
or simply stop X with one of /etc/init.d/{k,g,x}dm stop
Previous Topic: Troubleshooting VE start failure
Next Topic: booting kernel with raid and lvm
Goto Forum:
  


Current Time: Fri Mar 29 13:33:54 GMT 2024

Total time taken to generate the page: 0.01935 seconds