15.3. Troubleshooting

The following sections hint at some of the most frequent problems encountered when using FreeNX and provide possible solutions to these problems.

15.3.1. knx Hangs When Trying to Establish a Connection

You are trying to establish a connection to your NX server using knx. When initiating the connection, knx fails to authenticate the user and no remote session is ever started.

To determine why this happens and how the problem can be solved, proceed as follows:

  1. Check whether Novell AppArmor is running on the server machine and proceed as described in Section 15.3.2, “Connection to NX Server Cannot Be Established”.

  2. Retry establishing a connection between knx and the server.

  3. Check whether the firewall on the client side allows SSH traffic by starting the YaST Firewall module and checking whether SSH is listed among Allowed Services for the External Zone. Enable SSH if it has not already been enabled.

  4. Check the firewall on the server side for SSH and for the NX ports listed in Section 15.1, “Getting Started with NX”. Open these ports if they had previously been closed.

  5. Retry establishing a connection between knx and the server.

  6. Log in to the server as root and proceed as follows:

    1. Enter the /tmp directory and check for lock files of the NX server:

      cd /
      ls -ltr .nX*
    2. If there are any of these old lock files, remove them.

    3. Log out.

  7. Retry establishing a connection between knx and the server.

  8. On the client machine, delete and reinstall the knx client using the YaST Software Management module.

    You should be able to connect to the server now, provided you followed all the instructions above.

15.3.2. Connection to NX Server Cannot Be Established

After starting knx and initiating the connection, you get the following error message:

Connection to NX server could not be established. Connection timed out.

To determine the source of this problem, proceed as follows:

  1. Log in to the server as root.

  2. Check the output of the dmesg command for an entry like the following:

    SubDomain: REJECTING r access to /var/lib/nxserver/home/.ssh/authorized_keys2 (sshd(31247) profile /usr/sbin/sshd active /usr/sbin/sshd)
    

    This entry tells you that Novell AppArmor running on the server does not allow the ssh daemon to access some NX-specific files.

  3. Stop AppArmor on the server machine

    or

    Put the sshd profile into learning mode and add permissions for accessing the NX files to the existing profile. This is described in more detail in the Novell AppArmor 2.0 Administration Guide.

  4. Reconnect to the server.

15.3.3. User Authentication Succeeds, Remote Connection Not Established

After you have run knx and initiated the session, knx succeeds in authenticating the user, but instead of a terminal window opening with the new session, you get an error message like the following:

Could not yet establish the connection to the remote proxy. Do you
    want to terminate the current session?

The connection failed due to the higher ports used in negotiating the NX remote session not being opened on the server's firewall. To adjust the firewall settings on the server, proceed as described in Section 15.1, “Getting Started with NX”.