I've spent the last day getting NX working under Fedora Core 5 and I wanted to mention my fix. On my remote server, I'm running FreeNX latest from svn and NX 2.1.0. On my client, I'm running the most recent NX client. I'm also running FreeNX in usermode (as described here:
<a href="http://openfacts.berlios.de/index-en.phtml?title=FreeNX_Howto">http://openfacts.berlios.de/index-en.phtml?title=FreeNX_Howto</a>)<br><br>After fixing a few config bugs of my own doing, I ran into a show stopper along the same lines as the problem mentioned here:
<br><br>[FreeNX-kNX] NX 2.1.0 - <a href="http://mail.kde.org/pipermail/freenx-knx/2006-October/004169.html">http://mail.kde.org/pipermail/freenx-knx/2006-October/004169.html</a><br><br> NX> 596 Session startup failed.
<br> NX> 1004 Error: NX Agent exited with exit status 1.<br><br>After examining my session file on the server side, I noticed the nxagent was waiting for a connection from the remote clients IP address (we'll call it
<a href="http://192.168.0.100">192.168.0.100</a>) but the connection was actually coming in from the local interface (127.0.01) and was rejected.<br><br>Specifically, the session log looks like:<br><br> Info: Agent running with pid '19835'.
<br> Session: Starting session at 'Tue Dec 12 11:15:33 2006'.<br> Info: Proxy running in server mode with pid '19835'.<br> Info: Waiting for connection from '<a href="http://192.168.0.100">192.168.0.100</a>' on port '5001'.
<br> Warning: Refusing connection from '<a href="http://127.0.0.1">127.0.0.1</a>' on port '5001'.<br><br>If we go back and look at the source for nxnode, we find:<br><br> if [ "$ssl_tunnel" = "1" ]
<br> then<br> # we need to use the IP of the "calling" server now <br> userip=$(echo $SSH_CLIENT $SSH2_CLIENT | cut -d" " -f1 | sed 's/::ffff://g')<br><br> # TODO: This logic is broken ... ;-)
<br> [ -z "$userip" ] && userip="<a href="http://127.0.0.1">127.0.0.1</a>"<br> [ -z "$userip" -a "$host" != "<a href="http://127.0.0.1">127.0.0.1</a>
" ] && userip="*"<br> fi<br><br>I'm running in SSL tunnel mode and $userip is the key variable passed on to nxagent for accepting connections. The $userip is set to the remote client address in the "userip=$(echo $SSH_CLIENT $SSH2_CLIENT | cut -d" " -f1 | sed 's/::ffff://g')" line, where $SSH_CLIENT="
<a href="http://192.168.0.100">192.168.0.100</a> blah 49499 22". I got things working by adding a "userip=127.0.01" in there.<br><br>I'm not sure what the appropriate fix here is and the TODO line is a little ominous. Any thoughts?
<br>