activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-3936) activemq status return codes should be LSB compliant
Date Tue, 17 Jul 2012 20:18:35 GMT

    [ https://issues.apache.org/jira/browse/AMQ-3936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13416555#comment-13416555
] 

Timothy Bish commented on AMQ-3936:
-----------------------------------

This looks like a duplicate of AMQ-3831 can you check out the trunk versions and confirm.
                
> activemq status return codes should be LSB compliant 
> -----------------------------------------------------
>
>                 Key: AMQ-3936
>                 URL: https://issues.apache.org/jira/browse/AMQ-3936
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>         Environment: [root@esb1 ~]# uname -a
> Linux esb1 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 x86_64 x86_64
GNU/Linux
> [root@esb1 ~]# cat /etc/redhat-release 
> Red Hat Enterprise Linux Server release 6.0 (Santiago)
> Active MQ was installed with an rpm built using https://github.com/shdwjk/apache-activemq
>            Reporter: Ben Mathews
>
> The activemq status command should return error codes matching the status. (See http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html)

> The file I tested in the download is apache-activemq-5.6.0/bin/linux-x86-64/activemq.
There is code in it that appears to return 1 on a stopped state
> status() {
>     getpid
>     if [ "X$pid" = "X" ]
>     then
>         echo "$APP_LONG_NAME is not running."
>         exit 1
>     else
>         echo "$APP_LONG_NAME is running ($pid)."
>         exit 0
>     fi
> }
> However, a 0 is always returned. Running with a -x shows that some other commands are
getting run which results in a 0 return value.
> + IDEXE=/usr/bin/id
> + '[' '!' -x /usr/bin/id ']'
> ++ /usr/bin/id -u -n
> + '[' root = activemq ']'
> + '[' Xactivemq '!=' X ']'
> + '[' Xwrapper.lockfile=/var/lock/subsys/ActiveMQ '!=' X ']'
> + '[' X '!=' X ']'
> + su -m activemq -c '/etc/rc.d/init.d/activemq status'
> ActiveMQ Broker is not running.
> + '[' Xwrapper.lockfile=/var/lock/subsys/ActiveMQ '!=' X ']'
> + getpid
> + '[' -f /var/run/activemq//ActiveMQ.pid ']'
> + '[' X = X ']'
> + '[' -f /var/lock/subsys/ActiveMQ ']'
> + exit 0

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message