Looks like a permissions problem. The files should all be owned by user tomcat..

[EMAIL PROTECTED] wrote:

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:
tomcat4:x:103:65534::/usr/share/tomcat4:/bin/false

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."
       else
               echo "(already running)."
       fi
==> /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
java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
Caused by: java.lang.NullPointerException
       at org.apache.catalina.startup.Catalina.await(Catalina.java:661)
       at org.apache.catalina.startup.Catalina.start(Catalina.java:621)
       ... 6 more
When I attempt to start it my log spits out this:




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




-- Sunitha Kumar Software Engineer http://www.cisco.com




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to