Results 1 to 2 of 2

Thread: tomcat6 status results into dead state

  1. #1

    Default tomcat6 status results into dead state

    Hi,

    When i start tomcat6 (on a SLES 11 box) two times without a stop in between, rctomcat6 status results into dead state.

    I checked the rctomcat6 start script, in this case when the tomcat6 is already running and a rctomcat6 start is done, it display a msg that "process already running", but it continues in the start function further down & executes the TOMCAT_SCRIPT(dtomcat6) script with the start argument. And after that pid in the tomcat6.pid file gets changed but the process keeps running with the old pid, and hence when we do a rctomcat6 status, it results into dead state(bcoz it doesn't find any process running with that pid).

    I think it shouldn't execute the TOMCAT_SCRIPT in this case, so in case when checkpid is success(in start function), i put an exit after the echo msg " process already running", this solves the problem, but is this the correct solution ?





    function start() {
    echo -n "Starting Tomcat ($CATALINA_BASE)"
    if [ -f "/var/lock/subsys/${NAME}" ] ; then
    if [ -f "/var/run/${NAME}.pid" ]; then
    read kpid < /var/run/${NAME}.pid
    if checkpid $kpid 2>&1; then
    echo "$NAME process already running"
    rc_failed 0
    #The below exit i have put to exit from the func in case java is already running with #the pid in the tomcat6.pid file
    exit

    else
    echo -n "lock file found but no process running for pid $kpid, continuing"
    rc_failed 7
    fi
    fi
    fi
    .........................
    .........................


    ~ rahul

  2. #2
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: tomcat6 status results into dead state

    On 02/17/2011 07:36 AM, rahulvatsa wrote:
    >
    > When i start tomcat6 (on a SLES 11 box)


    you are welcome to hang here and see if one of the SLE_ users here in
    the openSUSE forums have an answer for you, but you might be better
    and quicker served in one of the actual SLE_ forums hosted by the
    maker, at forums.novell.com

    the pass/ID you used here works there too..

    (and, there *are* some quite a lot differences between openSUSE 11.3
    [which most here are using] and SLES 11, so . . .)

    --
    DenverD
    CAVEAT: http://is.gd/bpoMD
    [NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.0.11, nVidia
    173.14.28 3D, Athlon 64 3000+]
    "It is far easier to read, understand and follow the instructions than
    to undo the problems caused by not." DD 23 Jan 11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •