tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Starting tomcat with a lowlevel user?
Date Thu, 12 Feb 2004 03:03:14 GMT
I am trying to start tomcat with the "tomcat" user on my debian box.  I am
using tomcat 5 untarred just now.  I can start tomcat with root manually
just fine but I would like tomcat to run as the "tomcat" user.  I created
the tomcat user:

I created a startup script modelled after the one that comes with debian,
it acts like it starts but doesnt.
And my start up script is:
       echo -n "Starting $DESC using Java from $JAVA_HOME: "
        touch "$PIDFILE" "$LOGDIR/catalina.out" || true
        chown --dereference "$TOMCAT_USER" "$PIDFILE" "$LOGDIR" \
            "$LOGDIR/catalina.out" "$CATALINA_HOME/work" \
            "$CATALINA_HOME/temp" || true
        if start-stop-daemon --test --start --pidfile "$PIDFILE" \
                --user $TOMCAT_USER --startas "$JAVA_HOME/bin/java" \
                >/dev/null; then
                # -p preserves the environment (for $JAVA_HOME etc.)
                # -s is required because tomcat's login shell is /bin/false
                su -p -s /bin/sh $TOMCAT_USER -c \
                         $DAEMON start $STARTUP_OPTS \
                        >>"$LOGDIR/catalina.out" 2>&1
                echo "$NAME."
                echo "(already running)."
==> /usr/share/tomcat/logs/catalina.out <==
Using CATALINA_BASE:   /usr/share/tomcat
Using CATALINA_HOME:   /usr/share/tomcat
Using CATALINA_TMPDIR: /usr/share/tomcat/temp
Using JAVA_HOME:       /usr/lib/java/javahome
Can't load server.xml
Can't load server.xml
Feb 11, 2004 6:59:02 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 0 ms
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.lang.reflect.Method.invoke(
        at org.apache.catalina.startup.Bootstrap.start(
        at org.apache.catalina.startup.Bootstrap.main(
Caused by: java.lang.NullPointerException
        at org.apache.catalina.startup.Catalina.await(
        at org.apache.catalina.startup.Catalina.start(
        ... 6 more
When I attempt to start it my log spits out this:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message