hi Chuck

many thanks for the reply

here is the /etc/init.d/tomcat, it only hangs when run by /sbin/service tomcat 
start

----------------
#!/bin/bash
#
# Startup script for Tomcat, the Apache Servlet Engine
#
#zcw modified to report status so that it and can be used by service check 
script 20040114
#zcw modifed to accommdate different versions of tomcat
#
# chkconfig: 345 80 20
# description: Tomcat is the Apache Servlet Engine RI for Servlet 
# processname: tomcat
# pidfile: /var/run/tomcat.pid
# config:  /etc/tomcat/conf
#
# Gomez Henri <hgo...@users.sourceforge.net>
# Keith Irwin <keith_ir...@non.hp.com>
# Nicolas Mailhot <nicolas.mail...@one2team.com>
#

# Source function library.
. /etc/rc.d/init.d/functions

JAVA_HOME="/opt/java/jdk"
export JAVA_HOME
RETVAL=0
CATALINA_HOME="/var/tomcat"
TOMCAT_PROG="Tomcat"

# See how we were called.
start() {
 # Start Tomcat in debug mode
    SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep 8005|wc -l`
    if [ $SHUTDOWN_PORT -ne 0 ]; then
        echo "Tomcat already started"
    else
    
    echo -n "Starting $TOMCAT_PROG ... "
#    set
    ${CATALINA_HOME}/bin/startup.sh
    fi
}

stop() {
    SHUTDOWN_PORT=`netstat -vatn|grep LISTEN|grep 8005|wc -l`
    if [ $SHUTDOWN_PORT -eq 0 ]; then
        echo "Tomcat already stopped"
    else
    echo -n "Stopping $TOMCAT_PROG: "
    ${CATALINA_HOME}/bin/shutdown.sh
    fi    
}

status() {
    status ${TOMCAT_PROG}
}

# See how we were called.
case "$1" in
    start)
    start
    ;;
    stop)
    stop
    ;;
    restart)
    stop
    sleep 2    
    start
    ;;
    status)
    tompid=`/bin/ps -ef | /bin/grep tomcat |/bin/grep -v check | /bin/grep -v 
grep | /bin/grep -v status | /bin/sed -e 's/^  *//' -e 's/ .*//'`
    if [ "${tompid}" != "" ]
    then
    echo "${TOMCAT_PROG} pid ${tompid} is running ..."
    else
    echo "${TOMCAT_PROG} is dead ..."
    fi
    ;;
    
    *)
    echo "Usage: $TOMCAT_PROG {start|stop|restart|status}"
    exit 1
esac

exit $RETVAL

------------
ZCW

> From: chuck.caldar...@unisys.com
> To: users@tomcat.apache.org
> Date: Tue, 30 Jun 2009 12:12:39 -0500
> Subject: RE: tomcat hang when start with "service tomcat start"
> 
> > From: zhicheng wang [mailto:zcwli...@hotmail.co.uk]
> > Subject: RE: tomcat hang when start with "service tomcat start"
> > 
> > "main" prio=10 tid=0x08059000 nid=0x1b5c runnable [0xb749e000]
> >    java.lang.Thread.State: RUNNABLE
> >     at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
> >     at
> > java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
> >     at java.io.File.isDirectory(File.java:754)
> >     at
> > org.springframework.core.io.support.PathMatchingResourcePatternResolver
> > .doRetrieveMatchingFiles(PathMatchingResourcePatternResolver.java:596)
> >     at
> > org.springframework.core.io.support.PathMatchingResourcePatternResolver
> > .doRetrieveMatchingFiles(PathMatchingResourcePatternResolver.java:597)
> >     at
> > org.springframework.core.io.support.PathMatchingResourcePatternResolver
> > .doRetrieveMatchingFiles(PathMatchingResourcePatternResolver.java:597)
> 
> <many recursive calls snipped>
> 
> That's an awful lot of nested calls.  I wonder if your startup script has 
> created an infinite symlink loop?
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
> MATERIAL and is thus for use only by the intended recipient. If you received 
> this in error, please contact the sender and delete the e-mail and its 
> attachments from all computers.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

_________________________________________________________________

MSN straight to your mobile - news, entertainment, videos and more.

http://clk.atdmt.com/UKM/go/147991039/direct/01/

Reply via email to