Superpatterns Pat Patterson on the Cloud, Identity and Single Malt Scotch


Tomcat on Ubuntu Feisty

A while ago, I blogged about running OpenSSO on Tomcat in Ubuntu. I recently upgraded Ubuntu to 7.04 'Feisty Fawn', which, while most things work great, seems to have caused some issues with Tomcat...

The first is this bug - when you start Tomcat, it just hangs. Apparently it's to do with /var/lib/tomcat5.5/logs/catalina.out being a named pipe. The workaround that works for me is to add the following line (shown in bold) to the start block in /etc/init.d/tomcat5.5

-outfile "$LOGFILE"  -errfile '&1' \
cat /var/log/tomcat5.5/catalina.out > /dev/null &
log_progress_msg "(already running)"

The second issue is that Tomcat seems to have changed where it puts its web applications. They were in /usr/share/tomcat5.5/webapps; they are now in /var/lib/tomcat5.5/webapps. This breaks the security policy I blogged about last time - you now need to add the following to /etc/tomcat5.5/policy.d/50user.policy:

grant codeBase "file:${catalina.base}/webapps/openfm/-" {

(i.e. switch from ${catalina.home} to ${catalina.base})

And before anyone asks "Why aren't you using Glassfish?" - I am, I'm just using Tomcat as well, since a lot of the OpenSSO contributors use it. Their pain is my pain

Filed under: General Leave a comment
Comments (5) Trackbacks (0)
  1. This is where Debian/Ubuntu sometimes seems to go too far in its directory placement policy.
    I avoid this pain by always downloading the Tomcat binary and putting it somewhere in my home directory. Example:
    Also, using Debian/Ubuntu packages for server software can present problems when you want multiple instances.

  2. Hi Paul – yeah – that’s certainly the easy way. I like to take the difficult road, and pave it as I go 🙂

  3. I use Tomcat 5.0

  4. Hey, thanks man.

    I was wondering why it was so hard to start tomcat5.5 on feisty.

  5. Many thanks for this, I was struggling. Somewhat surprised that they’ve not sorted it out for Feisty by now though (Gutsy’s due out in 10 days or something.)

Leave a comment

No trackbacks yet.