Superpatterns

Pat Patterson on Identity Management, Federation and Single Malt Scotch
         

accessmanager adoption authentication bloggers burtongroup catalyst community extensions federation google identity libertyalliance lightbulb links opends openid opensource opensso php saml sdn security sso sun webservices
 
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

@ 11:26 AM PDT Comments [5]
 
 
 
Comments:

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.

Posted by Paul C. Bryan on May 03, 2007 at 12:07 PM PDT #

Hi Paul - yeah - that's certainly the easy way. I like to take the difficult road, and pave it as I go :-)

Posted by Pat Patterson on May 03, 2007 at 12:10 PM PDT #

I use Tomcat 5.0

Posted by autooo on May 21, 2007 at 07:03 PM PDT #

Hey, thanks man.

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

Posted by Forceflow on August 20, 2007 at 03:57 AM PDT #

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.)

Posted by grim on October 07, 2007 at 01:30 PM PDT #

Post a Comment:

Comments are closed for this entry.
 

    OpenSSO - Get It Now

    Identity Management Buzz Podcast
    Stay connected to news, show notes and leave your feedback.
    Listening To
    Listen to Radio Pat
    www.flickr.com
    superpat7's photos More of superpat7's photos
    Technorati
Valid XHTML or CSS?
[This is a Roller site]
Original theme by Rowell Sotto. Heavily modified by Pat Patterson.