Forum / NoMachine for Linux / No session on headless server
- This topic has 9 replies, 6 voices, and was last updated 10 years, 2 months ago by Haven.
-
AuthorPosts
-
April 29, 2014 at 08:04 #3361AnamonParticipant
I’m trying to run nxserver on a headless RHEL system (no screens attached) in order to access the desktop environment. I’m running into the exact same issues as discussed in this thread: https://www.nomachine.com/forums/topic/nxclient-unable-to-find-session-on-headless-x-server
The thread ends with a possible but unconfirmed solution, which however doesn’t seem to make any difference in my case.
The remote access setup works fine if a screen is connected (and then removed) from the server while it is booting up. Any NoMachine client can connect to the machine and interact with the desktop. However, if not screen is present during system boot, the X server isn’t started and no displays are set up for it, so nxclient fails with the message “<No available sessions on this server>” and detailed reason “<The server was unable to make the local display available or access to the local display is disabled.>”
I tried following both the procedures in https://www.nomachine.com/AR10K00710 and the thread mentioned above, to use Xvfb as an in-memory screen for the X server to run on.
The command to start Xvfb ends with the message “Initializing built-in extension GLX” (and seemingly hanging there, although it turns out I’m correctly sent back to the shell, just the prompt doesn’t show anymore). Starting gnome-desktop seems to work fine as well, returning me to shell with a background process ID and a lot of Gnome-related child processes running.
However, none of this makes a difference as far as NoMachine client is concerned. I still get the same messages about no sessions/displays being available on the server machine (even if, as pointed out in the thread, I set a 24-bit display mode for Xvfb). So either something goes wrong while setting up the framebuffer-X, or maybe the nxserver services aren’t correctly invoked (or at all) if the X server is started this way, as opposed to a regular GUI boot.
Does anyone have any more pointers regarding where I could continue looking for the problem?
I’m using NoMachine 4.2.21_1 x86_64 on RHEL6 for the server, and NoMachine 4.2.21_1 on Windows 7 x64 as the client, both free versions (no built-in virtual desktop feature).
April 29, 2014 at 10:52 #3374rezaParticipantPlease try the procedure from attachment.
It was adjusted to RHEL paths and tested on RHEL 6.5.Attachments:
July 11, 2014 at 13:20 #4120cescarpaParticipantI am running the free version of NoMachine 4-2-26 as display server in a opensuse 13.1, and same NoMachine version under OSX for the client side.
As the starting mail reports, i can access the linux server whenever it has a monitor connected, otherwise i get connected to a black screen that does not allow me to login or access the server
I followed the configuration recommendations provided in the article https://www.nomachine.com/AR10K00710 and did not get it to work.
after executing:
COOKIE=
ps -ef | md5sum | cut -f 1 -d " "
xauth -f ~/Xvfb-0.auth add :0 MIT-MAGIC-COOKIE-1 $COOKIE xauth add :0 MIT-MAGIC-COOKIE-1 $COOKIE Xvfb :0 -auth ~/Xvfb-0.auth -screen 0 1024x768x24 & DISPLAY=:0 nohup /etc/gdm/Xsession gnome-session & I can see the Xvfb running: (ps -ax |grep -i x) but after i run DISPLAY=:0 nohup /etc/gdm/Xsession gnome-session & it results in an error shown in ~/.xsession-errors-:0 Invalid MIT-MAGIC-COOKIE-1 key/etc/X11/xim.d/es/40-ibus started sucessfully Invalid MIT-MAGIC-COOKIE-1 keyxrdb: Resource temporarily unavailable xrdb: Can't open display ':0' Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 key ** (gnome-session-check-accelerated:13488): WARNING **: Could not open X display Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server (gnome-session-check-accelerated:13488): Gtk-WARNING **: cannot open display: :0 Invalid MIT-MAGIC-COOKIE-1 keyJuly 11, 2014 at 15:41 #4135rezaParticipantWe just verified procedure from AR10K00710 on OpenSUSE 13.1 and it works correctly.
Your logs suggests that there is something wrong with authorization cookie.
Please execute following commands to assure that cookie is correct and equal in both cases:
xauth -f ~/Xvfb-0.auth list :0
xauth list :0July 17, 2014 at 11:42 #4192smartinParticipantHi Anamon,
I had similar problems on a headless Debian box. The free version of NoMachine 4 only shares the physical screen. In my case Debian booted up with a default VGA configuration (640×480), totally useless for doing any work, but at least a connection. The Workstation license enables virtual desktops, this allows you to connect to the remote box using a screen with the same resolution as your client computer.
This configuration works OK for me, however personally I would prefer XRANDR support so I can resize the client window size.
Regards.
July 21, 2014 at 10:04 #4219dtc42ParticipantI also followed the instructions here for NoMachine_4.2.26
https://www.nomachine.com/AR10K00710
And was able to get the basic functionality to work on an AWS debian instance. On AWS, typically an “admin” or “ec2-user” is provided with sudo privileges. My goal is to allow NoMachine access to a gnome desktop as the ec2-user.
Following the KnowledgeBase article as “root”, then I can connect to a desktop using nxplayer — but *only* as the “root” user. (To make this work I also had to modify /usr/NX/etc/server.cfg and change the default values for: VirtualDesktopAuthorization 0, and PhysicalDesktopAuthorization 0)
If I try to follow the KnowledgeBase procedure as the “ec2-user” then the nxserver –restart fails.
> /usr/NX/bin/nxserver –restart
NX> 500 ERROR: Only a user with administrative privileges
NX> 500 ERROR: can use option: restart.Running nxserver –restart as sudo does work, but then the proper Desktop connections are not displayed in nxplayer.
Is there any way to provide a headless Desktop connection to a non-root user?
Thanks!
-daveJuly 21, 2014 at 11:16 #4249rezaParticipantPlease assure that you are following most recent version of article.
Couple of weeks ago the article was modified to let non root users use it and didn’t include a command for restarting a server anymore. It is no longer needed.July 22, 2014 at 09:15 #4257dtc42ParticipantThank you for your quick reply. I did a
1) clean install of nomachine_4.2.26_1_amd64.deb,
2) and followed the instructions to start Xvfb on display :0 as a non-root userps -ef shows:
1002 10252 1 0 18:09 pts/1 00:00:00 Xvfb :0 -auth /home/googlestudent/Xvfb-0.auth -screen 0 1280x1024x24
and netstat -l shows:
tcp 0 0 *:4000 *:* LISTEN
When I try to attach using nxplayer, it actually connects and lets me enter the password for the non-root user, but instead of connecting to the Desktop I get the attached error screen instead (Ooops! Could not start the display server. Error is 5: Input/output error). I will attach the error logs.
When I try this same sequence as the *root* user, then the final connection to a Desktop is successful, but I would like to do this as a non-root user.
Thanks!
-daveJuly 22, 2014 at 10:52 #4280HavenParticipantHello dtc42,
We will need nxserver and nxnode logs to investigate further. Please follow the instructions here:
https://www.nomachine.com/AR07K00677
Send them to issues[at]nomachine[dot]com
July 30, 2014 at 11:45 #4347HavenParticipantHello dtc42,
I logs you submitted we found that session because nxserver choose wrong X server to attach to. In user processes we can found two running X servers:
vnc4 Xvnc4 :1 -desktop localhost:1 (googlestudent) -auth /home/googlestudent/.Xauthority -geometry 1280×1024 -depth 16 -rfbwait 30000 -rfbauth /home/googlestudent/.vnc/passwd -rfbport 5901 -pn -fp /usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/,/usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ -co /etc/X11/rgb
and
Xvfb Xvfb :0 -auth /home/googlestudent/Xvfb-0.auth -screen 0 1280x1024x2
Please try to disable other X server before connecting to session or uncomment in node.cfg file key:
#
# Specify on which physical display the server must connect.
#
#DisplayDefault :0Then nxserver will always choose X server with display defined in this key.
- This reply was modified 10 years, 2 months ago by Haven.
-
AuthorPosts
Closed because the user did not provide further feedback. Please notify us if you confirm that it is resolved or open a new topic if you have the same problem.