I’m generally not a big Ubuntu user on the desktop and am rather fond of my usual choice of Gentoo that I’ve grown quite accustomed to setting up.  Desktops get plain old Gentoo and the laptops get Sabayon (so I don’t spend all of my time configuring wireless).  On the other hand, I’ve gained quite a bit of respect for Ubuntu Server over the past year or so.

In the usual Ubuntu fashion, its extremely quick and very easy to get a LAMP server up and running.  This is a nice plus for me when I seem to have a habit of installing and trashing virtual machines on a near weekly basis.  I’d gotten to like it so much that I even started setting it up on dedicated hardware, that’s right: machines of importance.  Dodging the occasional quirk here or there (in one release I had to change my version of Vi to get syntax highlighting working and properly configurable), its worked admirably.

I even had a good experience come from a bad one which was an Apache update that caused a server to stop serving PHP files.  Of course, this happened over a weekend so by the time I got to access the box on Monday I was furious and hesitant to touch Ubuntu anymore.  After realizing that the only install disk I had around was an Ubuntu Server CD. I convinced myself that the problem was caused by Synaptic and went on my way.  Once again the install blew me away in its speed and I was back up in a few hours.

Recently though, I’ve encountered an oddity that is simply too much to bear.  I’ve had Hudson set up and running on an old Debian install for a long time.  I like it for its simplicity, price, and awesome mascot-man.  Oh yeah, and it works quite well!  Distribution as a WAR file makes deployment easy.  I just set up a home directory for Hudson, drop it into an application server, and build away.

When it came time to set up continuous integration for Betaville’s server software, I apt-getted in the usual Ubuntu fashion and grabbed Tomcat 6.  The install went and port 8080 brought me to Tomcat’s “It Works!” page it which point I praised the Canonical gods just a little more.  As soon as wget had completed downloading the Hudson WAR, I dropped it in and waited for Tomcat to do its thing.

And I kept waiting.  I now started wondering what was going on.  I remembered having seen two Tomcat directories, /usr/share/tomcat6 and /var/lib/tomcat6, each with their own webapps folder.  The version in /var seemed like the logical place to put one’s webapps, but I changed it just in case.  No joy in the /usr directory either.  Now I’m flustered.

As the number of tabs in firefox grew I began to sense desperation setting in.  More and more tabs were showing up where I’d find a Google result or two which would promptly be closed.  As the minutes ticked on I was reduced to a bunch of useless tabs of Google results that had gotten me nowhere.

I eventually got myself to Hudson’s dashboard.  In Ubuntu’s wonky wisdom, their Tomcat package has the security manager set to ON by default.  Is it smart thinking?  Probably.  I just find it strange that Tomcat is totally locked down in an operating system that leaves iptables completely open immediately post installation.  Now, back to the task at hand.

So I sort of made it to the Hudson dashboard, in that I now had some errors having to do with Hudson not being able to create some folder.  The good folks at that project handily provide a link right in the error page to their wiki which details how to sort it all out.

This is the page that I was brought to.

Now, it says I need to set CATALINA_OPTS, or failing that, create an environmental variable called HUDSON_HOME.  After I do one or the other, I’m to run “catalina.sh start”.  Now the fun starts again as I come across this beauty of an error:

/usr/share/tomcat6/bin/catalina.sh: 357: cannot create /usr/share/tomcat6/logs/catalina.out

Cool!  A permissions error!  I know how to fix those!  Long story short, I tried a seemingly endless number of permissions and users to no avail.  Heck, I tried things that no one should allow a machine talking to the internet to do and still came up empty.

After devoting an embarrassing amount of time to this, I tried to jump ship to Jetty.  Of course, I already had Tomcat installed so getting Jetty to serve on 8080 took a moment, and eventually never happened (this is once again an installation done from an Ubuntu package).  I was now installing OpenSUSE in a virtual machine on my desktop thinking I’d just get Hudson working and build and SCP the application JAR’s up to the server when it detected a change in the SVN repository.

Before I could finish, however, I came across an interesting tidbit on my last remaining friend, the Hudson wiki.  It seems that Hudson comes with an application server, one that I’d never heard of, already bundled.  In under fifteen seconds I had Hudson running on the Winstone (incidentally, there is a pretty funny, if raunchy story behind the name) container with a single command:

java -jar hudson.war

After recognizing my mistake, I quickly recanted and added nohup to the command, allowing me to keep the application running after I’d closed my shell.  With this, I’d put to rest hours of frustration with literally a single command.  It doesn’t get much sweeter than that.  Hudson and Winstone have been running like clockwork for the better part of 48 hours now.  Now I can finally get back to the projects that were waiting on it!

Needless to say, I think my days of using Ubuntu Server are numbered.  Too much about how it handles itself just isn’t normal.  Because of this, I’m forced to restrict most of my troubleshooting to looking around Ubuntu-centric hangouts.  I was fairly impressed with OpenSUSE’s installation process the last time I went through it, perhaps its time to put Novell to test one more time?