Jetty
  1. Jetty
  2. JETTY-738

If jetty.sh finds a pid file is does not check to see if a process with that pid is still running

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.1.11
    • Fix Version/s: 7.0.0pre4, 6.1.12.rc3, 6.1.12
    • Component/s: None
    • Labels:
      None
    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      The jetty.sh script contains checks to see if a PID file exists and refuses to start Jetty if one does. If the Jetty process dies without being shutdown cleanly from jetty.sh the PID file is not removed and Jetty refuses to start without manual intervention.

      The jetty.sh script needs a check to see if the PID stored is still running. I've attached a patch for jetty.sh that does this.

      1. jetty.sh.patch
        0.5 kB
        Michael Stringer

        Activity

        Hide
        David Yu added a comment -

        Michael,

        If you change the ff:
        ps `cat $JETTY_PID` > /dev/null 2>&1
        if [ $? = 0 ]

        to:
        if running $JETTY_PID

        Does that work for you?

        Cheers

        Show
        David Yu added a comment - Michael, If you change the ff: ps `cat $JETTY_PID` > /dev/null 2>&1 if [ $? = 0 ] to: if running $JETTY_PID Does that work for you? Cheers
        Hide
        Michael Stringer added a comment -

        David,

        Yes it does. I didn't notice the running function in the script.

        Thanks

        Show
        Michael Stringer added a comment - David, Yes it does. I didn't notice the running function in the script. Thanks
        Hide
        David Yu added a comment -

        the fix applies to both jetty 6&7.
        Thanks!

        Show
        David Yu added a comment - the fix applies to both jetty 6&7. Thanks!
        Hide
        Michael Stringer added a comment -

        Thanks for the quick fix David!

        Show
        Michael Stringer added a comment - Thanks for the quick fix David!

          People

          • Assignee:
            David Yu
            Reporter:
            Michael Stringer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: