Latest 'zypper update' broke NX

I had been using freenx on my 12.1 server to connect to for a good while now (NX client running on another 12.1 OpenSuSE machine) and it’s worked great!..up until the latest ‘zypper update’ I did on the server yesterday. I noticed it did update NX packages. Now NX/freenx is broken. When trying to connect with the client, I get this:

NX> 203 NXSSH running with pid: 4682
NX> 285 Enabling check on switch command
NX> 285 Enabling skip of SSH config files
NX> 285 Setting the preferred NX options
NX> 200 Connected to address: 10.10.69.210 on port: 22
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
HELLO NXSERVER - Version 3.2.0-73 OS (GPL, using backend: 3.5.0)
NX> 105 hello NXCLIENT - Version 3.2.0
NX> 134 Accepted protocol: 3.2.0
NX> 105 SET SHELL_MODE SHELL
NX> 105 SET AUTH_MODE PASSWORD
NX> 105 login
NX> 101 User: htpc
NX> 102 Password: 
NX> 103 Welcome to: htpc user: htpc
NX> 105 listsession --user="htpc" --status="suspended,running" --geometry="1280x800x24+render" --type="unix-gnome"
NX> 127 Sessions list of user 'htpc' for reconnect:

Display Type             Session ID                       Options  Depth Screen         Status      Session Name
------- ---------------- -------------------------------- -------- ----- -------------- ----------- ------------------------------


NX> 148 Server capacity: not reached for user: htpc
NX> 105 startsession  --link="lan" --backingstore="1" --encryption="1" --cache="16M" --images="64M" --shmem="1" --shpix="1" --strict="0" --composite="1" --media="0" --session="HTPC" --type="unix-gnome" --geometry="1280x774" --client="linux" --keyboard="pc102/us" --screeninfo="1280x774x24+render" 

NX> 1000 NXNODE - Version 3.2.0-73 OS (GPL, using backend: 3.5.0)
NX> 700 Session id: htpc-1001-C09EBECCF14659BDE8C65AE096A2DCB9
NX> 705 Session display: 1001
NX> 703 Session type: unix-gnome
NX> 701 Proxy cookie: 58ba39b5c5ebb0bf8cb752bbb8b0331b
NX> 702 Proxy IP: 10.10.69.210
NX> 706 Agent cookie: 58ba39b5c5ebb0bf8cb752bbb8b0331b
NX> 704 Session cache: unix-gnome
NX> 707 SSL tunneling: 1
NX> 105 /usr/bin/nxserver: line 1534:  8082 Terminated              sleep $AGENT_STARTUP_TIMEOUT
NX> 596 Session startup failed.
NX> 1004 Error: NX Agent exited with exit status 1. To troubleshoot set SESSION_LOG_CLEAN=0 in node.conf and investigate "/home/htpc/.nx/F-C-htpc-1001-C09EBECCF14659BDE8C65AE096A2DCB9/session". You might also want to try: ssh -X myserver; /usr/bin/nxnode --agent to test the basic functionality. Session log follows:
Can't open /var/lib/nxserver/db/running/sessionId{C09EBECCF14659BDE8C65AE096A2DCB9}: No such file or directory.
mv: cannot stat `/var/lib/nxserver/db/running/sessionId{C09EBECCF14659BDE8C65AE096A2DCB9}': No such file or directory
NX> 1006 Session status: closed
NX> 1001 Bye.
/usr/bin/nxserver: line 565: kill: (7788) - No such process
NX> 280 Exiting on signal: 15


This is where the error is:

NX> 105 /usr/bin/nxserver: line 1534:  8082 Terminated              sleep $AGENT_STARTUP_TIMEOUT
NX> 596 Session startup failed.
NX> 1004 Error: NX Agent exited with exit status 1. To troubleshoot  set SESSION_LOG_CLEAN=0 in node.conf and investigate  "/home/htpc/.nx/F-C-htpc-1001-C09EBECCF14659BDE8C65AE096A2DCB9/session".  You might also want to try: ssh -X myserver; /usr/bin/nxnode --agent to  test the basic functionality. Session log follows:
Can't open /var/lib/nxserver/db/running/sessionId{C09EBECCF14659BDE8C65AE096A2DCB9}: No such file or directory.
mv: cannot stat `/var/lib/nxserver/db/running/sessionId{C09EBECCF14659BDE8C65AE096A2DCB9}': No such file or directory
NX> 1006 Session status: closed
NX> 1001 Bye.
/usr/bin/nxserver: line 565: kill: (7788) - No such process
NX> 280 Exiting on signal: 15

Oddly, when running “nxsetup --test” on the server, it passes fine.

I can’t figure this out! I have removed and reinstalled freenx, configured it with custom keys and using the default nomachine key. The client does authenticate fine. The problem comes when it is starting the session after it authenticates (right before the X window is supposed to pop up) and it fails.

Any ideas?

Thank you in advance.

Where did you install NX from?
The FreeNX* version from my repo (it’s a different build) runs fine on several openSUSE 12.1 servers here, all up to date. It uses NX agent 3.5.0.
See this article: Setting up NX server (part I: FreeNX)

  • the package you have installed might have another name (?)

# zypper info FreeNX NX
Loading repository data...
Reading installed packages...


Information for package FreeNX:

Repository: PTA
Name: **FreeNX**
Version: **0.7.3-87.1**
Arch: x86_64
Vendor: obs://build.opensuse.org/home:please_try_again
Installed: Yes
Status: up-to-date
Installed Size: 463.0 KiB
Summary: FreeNX Application and Thin Client Server
Description: 
FreeNX application and thin client server based on NX technology
NoMachine. NX is the next-generation X compression and roundtrip
suppression scheme. It can operate remote X11 sessions over 56k modem
dial-up links or anything better. This package contains a free (GPL)
implementation of the nxserver component.

Information for package NX:

Repository: PTA
Name: **NX**
Version: **3.5.0-118.1**
Arch: x86_64
Vendor: obs://build.opensuse.org/home:please_try_again
Installed: Yes
Status: up-to-date
Installed Size: 9.0 MiB
Summary: Proxy System for X11
Description: 
NX provides a proxy system for the X Window System.

Hey there, PTA. Sorry about the delayed response. Been swamped the past few days. Thank you for the reply.

The version of FreeNX I was using was from the official repos. But after seeing your response, I did go back, removed NX and FreeNX, added your repo and refreshed it, and then reinstalled FreeNX and NX from your repo. After that, I ran “freenx-setup -n” per your guide in the link in your post. It ran successfully. I tried again to connect with the client and again the client passed authentication, but the session died right before the X window was going to appear (right after “Downloading Session Parameters” appears on the client). I changed the option SESSION_LOG_CLEAN to 0 in /etc/nxserver/node.conf, restarted the server and then tried to reconnect with the client. Same deal so I checked the log in the home directory. Here’s what it says:

xrdb: Connection refused
xrdb: Can't open display ':1001'

** (gnome-session:8533): WARNING **: Cannot open display: 

Not much info there. Bizarr as it was working great up until a few days ago!

Thank you for the reply, PTA!

Hmmm… It’s not a FreeNX error. It’s your gnome session which doesn’t get a display. That could explain which kind of update broke NX. The first thing to try is to remove any session file you might find in your ~/.nx directory. Further you could try to select Desktop: Unix XDM in NoMachine client (I assume you’re using NoMachine client). instead of starting a Gnome session directly. Your gdm has to accept xdmcp request though, meaning you need the following settings in your /etc/gdm/custom.conf:


[xdmcp]
Enable=true

I’m not sure it will help though - and if it does, it would be a workaround, not the solution. I’ve seen someone with a similar error couple months ago, but I can not remember if we were able to solve it. You might find his thread if you search the forum.

You can try to comment out

DISPLAY_BASE=1001

in /etc/nxserver/node.conf. But I don’t think it’s the problem. The default is 1000 (but I’ve seen 2000 too). I set it to 1001 to avoid conflicts with the NoMachine NX server (and I use 2000 as DISPLAY_BASE for NoMachine).

Also check if you have an .X1001-lock file in /tmp (if so remove it) and make sure that anyone has write access to /tmp (sound’s stupid but …).

Hi there, PTA. Thank you again for the reply and help!

So I first removed all files in the ~./.nx directory. Then, I add the line “Enable=true” under [xdmcp] in /etc/gdm/custom.conf. Then I changed the session in the client to XDM. But no dice. Got the same error in the client and in ~/.nx on the server.

Then I checked /etc/nxserver/node.conf for the DISPLAY_BASE line. It was already commented out by default in the file. I uncommented it and changed the value to 2000 (like yours). Stopped and restarted the nxserver daemon and tried to connect again. Failed with this in the ~/.nx session file:

Error: Aborting session with 'Server is already active for display 0
    If this server is no longer running, remove /tmp/.X0-lock
    and start again'.
Session: Aborting session at 'Sat Aug 11 19:49:18 2012'.
Session: Session aborted at 'Sat Aug 11 19:49:18 2012'.

So I did what it said and deleted .X0-lock in /tmp and tried again. Failed again with this in the ~/.nx session file:

Error: Aborting session with 'Cannot establish any listening sockets - Make sure an X server isn't already running'.
Session: Aborting session at 'Sat Aug 11 19:52:12 2012'.
Session: Session aborted at 'Sat Aug 11 19:52:12 2012'.

I did also check /tmp to make sure .X1001-lock was not there. It was not. There is only a .X0-lock and .nx1000-lock in /tmp. I made sure everyone has write access to /tmp as well.

Something is definitely weird here.

Thank you for your continued help, PTA. I really appreciate your time and knowledge!

I actually use 1001 for FreeNX (instead of the default 1000). I think I tried 2000 and it didn’t work - surprisingly because I’ve seen other versions of FreeNX using 2000 as default. I use 2000 for NoMachine.

If DISPLAY_BASE is commented out in /etc/nxserver/node.conf, it will use the one defined in /usr/bin/nxloadconfig (which should be 1000):

# grep DISPLAY_BASE /usr/bin/nxloadconfig
DISPLAY_BASE=1000
         -z $(echo "$DISPLAY_BASE" | egrep "^[1-9][0-9]{0,4}$") ] && \
                ERROR="yes" && echo "Error: Invalid value \"DISPLAY_BASE=$DISPLAY_BASE\""

No, you should not delete X0-lock. It’s your main X session. The error you got is normal then.

I just tried. What I see - with DISPLAY_BASE=1001 - is /tmp/.nx1002.lock owned by user nx and /tmp/.X1002.lock owned by the user who logged in.

Yes, I agree. I wish I knew what’s wrong here. Set NX_LOG_LEVEL=7 and SESSION_LOG_CLEAN=0 in /etc/nxserver/node.conf, then restart FreeNX

service freenx-server restart

Start a FreeNX session and see what you have in /var/log/nxserver.log. But again, I’m afraid this issue is beyond FreeNX (not sure though). :frowning:

That’s the problem or more exactcly the consequence. A lock file was not created because the NX server could not open a display. The only question is why.

Ok, so I recommented the DISPLAY_BASE line in /etc/nxserver/node.conf and freenx seems to be using 1001 again (I think). How do I change the NoMachine one to 2000 (if it matters)?

So far still just have .nx1000-lock in /tmp owned by user nx.

Done. The log basically shows the same messages as the client log:

-- NX SERVER START: -c /usr/bin/nxserver - ORIG_COMMAND=
-- NX SERVER START:  - ORIG_COMMAND=
Info: Using fds #4 and #3 for communication with nxnode.
HELLO NXSERVER - Version 3.2.0-73 OS (GPL, using backend: 3.5.0)
NX> 105 hello NXCLIENT - Version 3.2.0
NX> 134 Accepted protocol: 3.2.0
NX> 105 SET SHELL_MODE SHELL
NX> 105 SET AUTH_MODE PASSWORD
NX> 105 login
NX> 101 User: htpc
NX> 102 Password: 
Info: Auth method: ssh Password:
NX> 1000 NXNODE - Version 3.2.0-73 OS (GPL, using backend: 3.5.0)
NX> 716 Slave mode started successfully.
nxnode_reader: NX> 1000 NXNODE - Version 3.2.0-73 OS (GPL, using backend: 3.5.0)
nxnode_reader: NX> 716 finished
nxnode_reader: NX> 1001 Bye.

NX> 103 Welcome to: htpc user: htpc
NX> 105 listsession --user="htpc" --status="suspended,running" --geometry="1280x800x24+render" --type="unix-xdm"
NX> 127 Sessions list of user 'htpc' for reconnect:

Display Type             Session ID                       Options  Depth Screen         Status      Session Name
------- ---------------- -------------------------------- -------- ----- -------------- ----------- ------------------------------


NX> 148 Server capacity: not reached for user: htpc
NX> 105 startsession  --xdm_port="-1" --link="lan" --backingstore="1" --encryption="1" --cache="16M" --images="64M" --shmem="1" --shpix="1" --strict="0" --composite="1" --media="0" --session="HTPC" --type="unix-xdm" --geometry="1280x774" --client="linux" --keyboard="pc102/us" --screeninfo="1280x774x24+render" 

&xdm_port=-1&link=lan&backingstore=1&encryption=1&cache=16M&images=64M&shmem=1&shpix=1&strict=0&composite=1&media=0&session=HTPC&type=unix-xdm&geometry=1280x774&client=linux&keyboard=pc102/us&screeninfo=1280x774x24+render&clientproto=3.2.0&user=htpc&userip=10.10.69.101&uniqueid=6C0A38373E496EC4FA7191DC0E850821&display=1001&host=127.0.0.1 
nxnode_reader: NX> 1000 NXNODE - Version 3.2.0-73 OS (GPL, using backend: 3.5.0)
NX> 1000 NXNODE - Version 3.2.0-73 OS (GPL, using backend: 3.5.0)
server_nxnode_echo: NX> 1000 NXNODE - Version 3.2.0-73 OS (GPL, using backend: 3.5.0)
nxnode_reader: NX> 700 Session id: htpc-1001-6C0A38373E496EC4FA7191DC0E850821
nxnode_reader: NX> 705 Session display: 1001
nxnode_reader: NX> 703 Session type: unix-xdm
nxnode_reader: NX> 701 Proxy cookie: b9ea28fd2a218a78c98f03e909f4b6c7
NX> 700 Session id: htpc-1001-6C0A38373E496EC4FA7191DC0E850821
NX> 705 Session display: 1001
NX> 703 Session type: unix-xdm
NX> 701 Proxy cookie: b9ea28fd2a218a78c98f03e909f4b6c7
nxnode_reader: NX> 702 Proxy IP: 10.10.69.210
nxnode_reader: NX> 706 Agent cookie: b9ea28fd2a218a78c98f03e909f4b6c7
server_nxnode_echo: NX> 700 Session id: htpc-1001-6C0A38373E496EC4FA7191DC0E850821
nxnode_reader: NX> 704 Session cache: unix-xdm
server_nxnode_echo: NX> 705 Session display: 1001
nxnode_reader: NX> 707 SSL tunneling: 1
NX> 702 Proxy IP: 10.10.69.210
NX> 706 Agent cookie: b9ea28fd2a218a78c98f03e909f4b6c7
NX> 704 Session cache: unix-xdm
NX> 707 SSL tunneling: 1
server_nxnode_echo: NX> 703 Session type: unix-xdm
server_nxnode_echo: NX> 701 Proxy cookie: b9ea28fd2a218a78c98f03e909f4b6c7
server_nxnode_echo: NX> 702 Proxy IP: 10.10.69.210
server_nxnode_echo: NX> 706 Agent cookie: b9ea28fd2a218a78c98f03e909f4b6c7
server_nxnode_echo: NX> 704 Session cache: unix-xdm
server_nxnode_echo: NX> 707 SSL tunneling: 1
nxnode_reader: NX> 1004 Error: NX Agent exited with exit status 1. To troubleshoot set SESSION_LOG_CLEAN=0 in node.conf and investigate "/home/htpc/.nx/F-C-htpc-1001-6C0A38373E496EC4FA7191DC0E850821/session". You might also want to try: ssh -X myserver; /usr/bin/nxnode --agent to test the basic functionality. Session log follows:
NX> 1004 Error: NX Agent exited with exit status 1. To troubleshoot set SESSION_LOG_CLEAN=0 in node.conf and investigate "/home/htpc/.nx/F-C-htpc-1001-6C0A38373E496EC4FA7191DC0E850821/session". You might also want to try: ssh -X myserver; /usr/bin/nxnode --agent to test the basic functionality. Session log follows:
NX> 105 nxnode_reader: Error: Aborting session with 'Server is already active for display 0
nxnode_reader: If this server is no longer running, remove /tmp/.X0-lock
nxnode_reader: and start again'.
nxnode_reader: Session: Aborting session at 'Sun Aug 12 17:31:38 2012'.
nxnode_reader: Session: Session aborted at 'Sun Aug 12 17:31:38 2012'.
nxnode_reader: NX> 1006 Session status: closed
Error: Aborting session with 'Server is already active for display 0
If this server is no longer running, remove /tmp/.X0-lock
and start again'.
Session: Aborting session at 'Sun Aug 12 17:31:38 2012'.
Session: Session aborted at 'Sun Aug 12 17:31:38 2012'.
NX> 1006 Session status: closed
server_nxnode_echo: NX> 596 Session startup failed.
NX> 596 Session startup failed.
server_nxnode_echo: NX> 1004 Error: NX Agent exited with exit status 1. To troubleshoot set SESSION_LOG_CLEAN=0 in node.conf and investigate "/home/htpc/.nx/F-C-htpc-1001-6C0A38373E496EC4FA7191DC0E850821/session". You might also want to try: ssh -X myserver; /usr/bin/nxnode --agent to test the basic functionality. Session log follows:
session_close 6C0A38373E496EC4FA7191DC0E850821
server_nxnode_echo: NX> 1006 Session status: closed
nxnode_reader: NX> 1001 Bye.
NX> 1001 Bye.
server_nxnode_echo: NX> 1001 Bye.
Info: Closing connection to slave with pid 7201.
Info: Closing connection to slave with pid 7201.

Here’s something interesting, that command does not work on my box but “nxserver --restart” does. Shown here:

htpc:~ # service freenx-server restart
service: no such service freenx-server
htpc:~ # nxserver --restart
No processes found.
NX> 100 NXSERVER - Version 3.2.0-73 OS (GPL, using backend: 3.5.0)
NX> 123 Service stopped
NX> 122 Service started
NX> 999 Bye
htpc:~ #

I hope we can get this figured out. I really appreciate your help, PTA.

It definitely seems the problem is elsewhere besides freenx. Upon some searching, I found the suggestion someone had posted to try to log out of the x-session on the server and then try the NX client again. So I did a:

init 3

on the server and checked to make sure /tmp/.X0-lock was not there. It was not because X was no longer running. Upon trying the client again, it actually gets a little bit farther! Still no display, but it doesn’t stop at the same point it did before. Here’s the log from the client:

NXPROXY - Version 3.5.0

Copyright (C) 2001, 2011 NoMachine.
See http://www.nomachine.com/ for more information.

Info: Proxy running in client mode with pid '4367'.
Session: Starting session at 'Sun Aug 12 18:29:39 2012'.
Info: Connection with remote proxy completed.
Warning: Unrecognized session type 'unix-xdm'. Assuming agent session.
Info: Using LAN link parameters 1536/24/1/0.
Info: Using pack method 'adaptive-9' with session 'unix-xdm'.
Info: Not using NX delta compression.
Info: Not using ZLIB data compression.
Info: Not using ZLIB stream compression.
Info: Not using a persistent cache.
Info: Forwarding X11 connections to display ':0'.
Info: Listening to font server connections on port '11001'.
Session: Session started at 'Sun Aug 12 18:29:39 2012'.
Info: Established X server connection.
Error: Connection with remote peer broken.
Error: Please check the state of your network and retry.
Session: Terminating session at 'Sun Aug 12 18:29:39 2012'.
Session: Session terminated at 'Sun Aug 12 18:29:39 2012'.


It’s strange that it’s saying to check the status of my network connection. My network connection is solid and hasn’t changed. I doubt it’s that but it is revealing that logging out of X on the server seems to do something. However, this is a temporary thing and cannot be permanent. The server is a media PC running XBMC so I need to have X running to display that, while I use freenx from my laptop to do things in the background (running a couple of wine programs and such). It always worked great until now. Very odd.

I did try the client several times and it stops at the same point each time. The client log looks the same each time I try.

EDIT: I restarted the nxserver and tried again with the client. This time, the client just stops here:

http://i61.photobucket.com/albums/h61/Audiomechanic/Screenshotat2012-08-12184151.png

On 08/08/2012 04:26 AM, shane2943 wrote:
> up until the latest ‘zypper update’

‘zypper updated’ is always more likely to break a production server
than is ‘zypper patch’ (which is the same as running YaST Online Update
(YOU), which does not attempt to upgrade to a newer version any
packages from any repo…instead ‘patch’ and YOU come from only the
most often safe and stable update repo (containing mostly security
update patches and major bug fixes))


dd

Comment out that buggy AGENT_EXTRA_OPTIONS line in /etc/nxserver/node.conf, wich tries to parse FontPath (even if there is no FontPath defined in /etc/X11/xorg.conf and even in there is no /etc/X11/xorg.conf at all. I have been trying to fix too many bugs. That one is my fault. I have to revert this patch.

THAT DID IT!!!..but only when X isn’t running. CLOSER!!! I can establish the X display through the NX client now, but only if I “init 3” on the server first. We’re much closer! Seems I get the same error as before when X is running (even when the user is logged out):

htpc:~ # cat /home/htpc/.nx/F-C-htpc-1001-8A7BB8468C43A734D5D7DC97EFEBBCCA/session
xrdb: Connection refused
xrdb: Can't open display ':1001'

It’s like X doesn’t want to open more than one connection or display. Weird because it used to just fine.

If we can fix this, I will definitely heed dd@home.dk’s advice about running “zypper patch” instead of “zypper update.”

Thank you again for your time and expertise, PTA. I hope this thread will also be of help to others if they run into issues like this as well.

FIXED!!!11111one1

Did some further digging and found this:
problems w/ freenx 0.7.3 w/ latest nomachine sources on RHEL5… - User Support for FreeNX Server and kNX Client - ArchiveOrange

Down towards the bottom, the suggestion was the problem might be a permissions issue. So I did:

# chmod 1777 /tmp/.X11-unix

And then tried the client again. POOF! Got a display. Even while logged into X on the server. So it was a permissions issue on that directory the whole time. LOL! At least it’s working!!!

Again, thank you for your help, PTA. I do appreciate your time and the time anyone else sacrifices to help a poor newb like myself. :slight_smile: I hope this thread is a help to someone.

Can a mod edit the title of the thread to show [SOLVED]?

Yes, but that wasn’t related to the first error you got (and still have). This was just a new bug I introduced. :shame:
The package is fixed now.

Yes. I don’t know why either. I just installed a fresh 12.1 in a virtual machine (kvm), added my repo, installed FreeNX and ran freenx-setup. It first didn’t work because of AGENT_EXTRA_OPTIONS_X line I added (works OK on my systems because I have /etc/X11/xorg.cong with FontPath defined). But this bug is fixed now. I’m going to do a full update on this virtual machine and see if NX still works afterwards.

Arf! I didn’t see your post before posting. You wouldn’t have such problems if you would clear /tmp automatically: http://forums.opensuse.org/english/get-technical-help-here/install-boot-login/470607-clear-tmp-boot-doesnt-work-systemd.html#post2425829.

This directory should be created with the right permissions at system start. It used to be missing on some systems, and I remember that I had to create it in rc.local (or atfer.local under openSUSE):

This is from an Ubuntu’s /etc/rc.local - but as you can see it is commented out - meaning it’s not needed anymore:

echo "creating /tmp/.cache directory"
# create /tmp/.cache directory
test -d /tmp/.cache || mkdir -m 1777 /tmp/.cache
#test -d /tmp/.ICE-unix || mkdir -m 1777 /tmp/.ICE-unix
#test -d /tmp/.X11-unix || mkdir -m 1777 /tmp/.X11-unix

And well done btw. :slight_smile: