Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-3118

jboss-as-standalone.sh status exit code should be non-zero when not running

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 7.1.0.Beta1
    • Fix Version/s: 7.1.0.CR1
    • Component/s: Scripts
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      Stop AS, or run "jboss-as-standalone.sh stop". Run "jboss-as-standalone.sh status", then "echo $?" and the output should be 3.

      Run AS via "jboss-as-standalone.sh start", then delete the pidfile (/var/run/jboss-as/jboss-as-standalone.pid). Run "jboss-as-standalone.sh status", then "echo $?" and the output should be 1.

      Show
      Stop AS, or run "jboss-as-standalone.sh stop". Run "jboss-as-standalone.sh status", then "echo $?" and the output should be 3. Run AS via "jboss-as-standalone.sh start", then delete the pidfile (/var/run/jboss-as/jboss-as-standalone.pid). Run "jboss-as-standalone.sh status", then "echo $?" and the output should be 1.
    • Estimated Difficulty:
      Low

      Description

      The jboss-as-standalone.sh script in build/src/main/resources/bin/init.d always reports an exit code of zero when called with "status", irrespective of whether AS is running or not.

      According to the Linux Standard Base, it should provide an exit code of 3 if it isn't running, an exit code of 1 if the /var/run pidfile is present but the process isn't and 0 if it's running correctly.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                brian.stansberry Brian Stansberry
                Reporter:
                dcleal Dominic Cleal
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: