You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Robbie Gemmell (Jira)" <ji...@apache.org> on 2021/04/16 11:17:02 UTC

[jira] [Comment Edited] (AMQ-8226) If ActiveMQ was started with low numer PID then activemq cli commands fails to check if ActiveMQ process is running.

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

Robbie Gemmell edited comment on AMQ-8226 at 4/16/21, 11:16 AM:
----------------------------------------------------------------

Clarity note for later context: The affects/fix versions listed look to be a little misleading, as the breaking commit referenced was apparently only pushed/picked into the branches on Mar 22nd 2021 and so was never actually released in any stream prior to this JIRA being raised to fix the issue it introduced following discovery of the problem during the 5.15.15 #2 vote (cancelled as result) and to rectify it before a #3 respin vote. 

(The author timestamp on the original commit introducing the issue is "Fri Sep 23 10:09:54 2016 +0200" making it rather difficult to see in the typical git log ordering [but --topo-order works for this particular case though], and it was seemingly added without any JIRA and so the changes wouldnt be visible in the release notes other than through JIRA)



was (Author: gemmellr):
Clarity note for later context: The affects/fix versions listed look to be a little misleading, as the breaking commit referenced was apparently only pushed/picked into the branches on Mar 22nd 2021 and so was never actually released in any stream prior to this JIRA being raised to fix the issue it introduced following discovery of the problem during the 5.15.15 #2 vote (cancelled as result) and to rectify it before a #3 respin vote. 

(The author timestamp on the original commit introducing the issue is "Fri Sep 23 10:09:54 2016 +0200" making it rather difficult to see in the typical git log ordering (--topo-order works for this particular case though), and it was seemingly added without any JIRA and so the changes wouldnt be visible in the release notes other than through JIRA)


> If ActiveMQ was started with low numer PID then activemq cli commands fails to check if ActiveMQ process is running.
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-8226
>                 URL: https://issues.apache.org/jira/browse/AMQ-8226
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Command Line Tools
>    Affects Versions: 5.15.15
>            Reporter: Roman Nieviezhyn
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: 5.17.0, 5.15.15, 5.16.2
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> h3. State of the world
> [This|https://github.com/apache/activemq/commit/1cb94f5e48b9265bd78ec01595d7f4d747d7c8e8] commit introduced a new approach to check if the ActiveMQ process is running.
> [The new approach|https://github.com/apache/activemq/commit/1cb94f5e48b9265bd78ec01595d7f4d747d7c8e8#diff-5306708c9411eee811fbf2bbb46578ed8d34abc2e7313d7e2c4d8db12b48b0f3R390] lists all processes with `ps` command and then greps it:
>  local RET="`ps -o "pid,args" | grep "^$activemq_pid\s.*java"`"
> h3. Issue
> If ActiveMQ process was started with N digit PID and `ps` command returns processes with M digit PID (such that M > N) then `bin/activemq` script won't be able to identify if ActiveMQ is running. 
> h3. Example
> {noformat}
> $ ps -o "pid,args"
>   PID COMMAND
>    XX ActiveMQ java PROCESS
>   XXX ANOTHER PROCESS 1
>  XXXX ANOTHER PROCESS 2
> XXXXX ANOTHER PROCESS N
> {noformat}
> In this example `ActiveMQ java PROCESS` is running with a two-digit PID `XX`.
>  `ANOTHER PROCESS N` is running with a five-digit PID `XXXXX`.
>  
> `ps` command will add additional spaces before the `ActiveMQ java PROCESS` to align it to the five-digit PID of `ANOTHER PROCESS N`.
>  
> In this case the grep experssion `^$activemq_pid\s.*java` wont be able to identify the `ActiveMQ java PROCESS` with PID `XX`.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)