Troubleshooting NX Connections

Having trouble connecting to a server with NX Client? Read on.

First off, if you are running Satra's nipype stuff and you have the following line in your .bashrc file:

source /software/python/SetupNiPy26.sh

... well, uh, remove that line. We're not sure why it breaks things, but it will cause NX to fail every time.

NX, a remote access client/server system from NoMachine (http://www.nomachine.com), is one of the most common means of logging into the Mindhive system. It gives the user a full GNOME desktop environment, effectively allowing one to work on the servers from anywhere in the world. The most common errors that people have with NX stem from a corruption of an individual person's settings on the client (that is, the user's laptop or desktop computer), the server (one or more of the BA servers) or both. Here's a quick way to troubleshoot and get your NX back up and running.

Summary

1) Terminate any existing NX sessions you have open.
2) Log into any BA node via SSH - not NX!
3) In your home directory, move your .nx directory to .nx-OFF by running the following command:

mv ~/.nx ~/.nx-OFF

4) Launch a new NX Client session.
5) If the connection works, and you get logged in, you're all set. If not, move on to step 6.
6) Click on the "Details" button in the "Failed Connection" dialog and copy and paste the error message into a mail message... but don't send it yet.
7) Close the NX client application.
8) On your personal workstation or laptop, also remove the .nx directory in your home directory. On Windows platform, you might need to select to view hidden files to see it.
9) Launch a new NX Client session.
10) If it works, you are all set. If not, go ahead and email the error message to your friendly neighborhood sysadmin.

Details


How do I figure out which servers I'm logged into via NX anyway?

One way is to use the NX Session Administrator application that was installed alongside NX Client. It will at least tell you which sessions your laptop/desktop thinks you currently have open. The other approach is to log into each server and run the following command:


ps x | grep nx | grep -v grep

This command says " show me all of my own processes on this computer, but only the ones that have the string 'nx' in them, and don't show me ones that actually say 'grep' (since that is the command I am running right now!"

If anything comes up, you have an NX session on this computer. You can kill it by getting the process ID number from the first column of the output and running the following command:

kill -9 <PID>

where <PID> is the process ID from the first column.