Hello, all. We've seen a couple of postings in the past where users just could not connect and would get session errors about the X connection failing with a 111 Connection Refused and a message about channels with certain file descriptors and IDs not being closed. We've hit this in the past and have never gotten around it reliably. Any success seemed to be purely random luck.
Today, we cracked one definitively. The problem was a mangled /tmp/.X11-unix directory. It is very specific to our environment but it may jog someone else's mind to find what the ultimate underlying issue is.
We have been working on creating portable, encrypted boot sticks to boot a lightweight Linux desktop to connect to our X2Go systems as a way of getting around the poor performance of the Windows X2Go client as well as provide extra security, lower end user support requirements, further separation between the data center based "Content Network" and the unmanaged end devices, and portability between physical computers.
All the testing and builds were done with the same very old laptop with Debian Squeeze. The only differences was one boot stick was built by installing Debian from the netinstall CD and used LXDE and the other was built with debootstrap and used Xfce. In both cases, we had a script named settmp to move the /tmp directory into RAM if there was sufficient RAM in the machine. It did this by copying anything already in /tmp to a scratch directory, deleting everything in /tmp, remounting /tmp as a tmpfs, copying everything back in, and then erasing the contents of the scratch directory. File transfers were done with rsync to ensure easier and safer handling of hidden files (no rm -Rf /tmp/.* - which deletes /tmp/.. ! - thankfully did not learn that the hard way).
The LXDE system ran x2goclient perfectly well but the Xfce system almost never connected. Suspecting it was an SSH problem because of the channel error messages, I tried doing an ssh -X to the x2goserver and running xterm. It complained about a connection refused and pointed to .X11-unix which I remembered was in /tmp. I wondered if the moving and then moving back was mangling it. I then restarted X on the same system now that /tmp was already moved and x2goclient worked perfectly.
I then rewrote the script as a real init script and used insserv to place it before x11-common. After several reboots, it has worked flawlessly. x2goclient connects all the time. In retrospect, I had comment out the settmp script on the LXDE station while troubleshooting something else and had forgotten about it!
So, we successfully solved the dreaded X connection refused problem in our environment. Hopefully that will help the others who have been burned by it - John