Distance Debugging Logo

Two items this week:

- The WordPress 2.1 upgrade has already been covered here and here.

- I don't discuss my day job very often, but I had a major investigation that finally got resolved today that I hope that the information will be helpful for others. It all started because I was trying to get a coworker set up with Subclipse, the Eclipse subversion plugin, on a new repository over ssh (using an svn+ssh URL). I'd gotten set up with no trouble, and was able to get a few others set up with no issue. However, whenever he tried to connect, it came back with a message saying

svn: Network Connection Closed Unexpectedly

The few hits on this on the web were in relation to failing to have svnserve in ones non-interactive shell path. Basically, when you use svn+ssh, it opens up an ssh non-interactive sesson, and then invokes svnserve in non-interactive mode. That means that often a different environment is created and it can mean that svnserve is not in ones path and so the command fails. However, that's easy enough to test, and it was clearly not the issue in this case. After uninstalling and reinstalling Subclipse, trying new keys, and dozen other small things, we were fairly stumped. As an experiment, I had him send me his private key and I tried to set up a connection posing as him. This worked fine so the problem was very likely tied to his machine, and not to his account.

Grasping at straws, I googled around a bit more and stumbled across this post from a few weeks ago on the Subclipse-users mailing list. It describes a similar problem and a workaround. Basically, when you try to connect to a repository for the first time, you are asked to enter an Author Name, which is associated with your commits and such. This can be different than your login name, if you so choose. My coworker chose to enter his full name, separated by a space, and it turns out that if you choose to do so, it will result in this connection closed problem. The real issue is that once you have entered it, Eclipse will store it deep down in its config and without explicitly deleting it, it is nearly impossible to get it to prompt you again. Because it is in Eclipse itself, reinstalling Subclipse, restarting Eclipse, and deleting and recreating the connection will have no effect. You have to delete the keyring file that stores the info.

So we started by deleting the keyring file, which is in ECLIPSE_HOME/configuration/org.eclipse.runtime.core/.keyring. If you are following these directions, I would make a copy of this file before deleting. I wasn't concerned about losing data in this case, and it's probably all information that ought to be recreateable anyway, but you never know. He then tried to connect again. This time, it did prompt him for his author name. He entered just his last name this time, and voila, the repository was all set. I posted a message to the Subclipse-Users list reporting the problem as replicable, so hopefully this will be fixed in a subsequent release. Hope this helps someone!