Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-6951

the /etc/init.d/jbossas from an rpm install does not always/correctly detects an instance is still up during shutting it down

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • EAP_EWP 5.1.2 ER1
    • EAP 5.0.0, EAP 5.0.1, EAP 5.1.0 Post Release, 4.3.0.GA_CP09
    • Scripts and Commands
    • None
    • rmp install, all supported version

    • Hide

      start/stop an instance multiple times. The stop should last longer then 10 seconds. This can be simulated by changing the line
      sleep 10
      to
      sleep 1

      The proposed solution was also tested in a real environment where the instance took somewhat longer then 10 seconds to shutdown

      Show
      start/stop an instance multiple times. The stop should last longer then 10 seconds. This can be simulated by changing the line sleep 10 to sleep 1 The proposed solution was also tested in a real environment where the instance took somewhat longer then 10 seconds to shutdown
    • Hide

      Proposed solution:

      sleep=0
      while [ $sleep -lt $JBOSS_STOP_TIMEOUT -a $RETVAL -eq 1 ]; do
      #echo -n -e "\nwaiting for processes to stop";
      sleep 10
      sleep=`expr $sleep + 10`
      pid=0
      procrunning
      if [ $pid == '0' ]; then
      RETVAL=0
      fi
      done

      This way the loop simply checks on the process still being there - there should be no need to check on the actual shutdown message.

      Show
      Proposed solution: sleep=0 while [ $sleep -lt $JBOSS_STOP_TIMEOUT -a $RETVAL -eq 1 ]; do #echo -n -e "\nwaiting for processes to stop"; sleep 10 sleep=`expr $sleep + 10` pid=0 procrunning if [ $pid == '0' ]; then RETVAL=0 fi done This way the loop simply checks on the process still being there - there should be no need to check on the actual shutdown message.
    • Hide
      When the log <filename>$JBOSS_HOME/server/$JBOSSCONF/log/server.log</filename> contained more than one instance of a server start-stop sequence, the shutdown script mistakenly detected that the server had shut down before it had actually been shut down properly. This problem has been fixed by changing the the script to monitor the server's process ID (PID) instead of the log file.
      Show
      When the log <filename>$JBOSS_HOME/server/$JBOSSCONF/log/server.log</filename> contained more than one instance of a server start-stop sequence, the shutdown script mistakenly detected that the server had shut down before it had actually been shut down properly. This problem has been fixed by changing the the script to monitor the server's process ID (PID) instead of the log file.
    • Documented as Resolved Issue
    • NEW

    Description

      When an instance is stopped, the /etc/init.d/jbossas script goes into a loop:

      sleep=0
      while [ $sleep -lt $JBOSS_STOP_TIMEOUT -a $RETVAL -eq 1 ]; do
      #echo -n -e "\nwaiting for processes to stop";
      sleep 10
      sleep=`expr $sleep + 10`
      grep -q "Shutdown complete" $JBOSS_HOME/server/$JBOSSCONF/log/server.log > /dev/null 2>&1
      if [ $? -eq 0 ]; then
      RETVAL=0
      fi
      pid=0
      procrunning
      if [ $pid == '0' ]; then
      RETVAL=0
      fi
      done

      If the logfile contains 2 or more sequences of shutting the instance down, then the message "Shutdown complete" would be detected even while the instance is not yet down, and the loop would exit. The remainder of the script would then report the process to be still running while in fact the instance could have shut down meanwhile. Similarly, if the loglevel is set not to show INFO messages, this test would fail anyhow.

      Attachments

        Activity

          People

            permaine Permaine Cheung
            tfonteyn Tom Fonteyne (Inactive)
            Russell Dickenson Russell Dickenson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: