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
$DAEMON -user "$TOMCAT5_USER" -cp "$JSVC_CLASSPATH" \
-outfile "$LOGFILE" -errfile '&1' \
-pidfile "$CATALINA_PID" $JAVA_OPTS "$BOOTSTRAP_CLASS"
**cat /var/log/tomcat5.5/catalina.out > /dev/null &**
else
log_progress_msg "(already running)"
fi
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/-" {
permission java.security.AllPermission;
};
(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
Comments
Paul C. Bryan
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: /home/pbryan/Programs/apache-tomcat-5.5.23 Also, using Debian/Ubuntu packages for server software can present problems when you want multiple instances.
Pat Patterson
Hi Paul - yeah - that’s certainly the easy way. I like to take the difficult road, and pave it as I go :-)
autooo
I use Tomcat 5.0
Forceflow
Hey, thanks man.
I was wondering why it was so hard to start tomcat5.5 on feisty.
grim
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
Your email address will not be published. Required fields are marked *