activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Schöchlin (JIRA) <j...@apache.org>
Subject [jira] [Commented] (AMQ-5733) kill -9 always results in failure signal
Date Tue, 21 Apr 2015 04:01:00 GMT

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

Marc Schöchlin commented on AMQ-5733:
-------------------------------------

@James Green: i reviewed your problem and i agree

My intention was that a termination by "SIGKILL" should be something abnormal because the
broker should shutdown in regular way.
SIGKILL does not provide the possibility to run shutdown logic (shutdown hook)  for activemq
- you should really consider to shutdown activemq by jmx.

Nevertheless according to LSB (http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html)
the exit code should be 0 if activemq is really not running after running "/etc/init.d/activemq
stop". 
I changed this and appended it to merge request https://github.com/apache/activemq/pull/61



> kill -9 always results in failure signal
> ----------------------------------------
>
>                 Key: AMQ-5733
>                 URL: https://issues.apache.org/jira/browse/AMQ-5733
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Distribution
>    Affects Versions: 5.11.1
>            Reporter: James Green
>
> Using https://github.com/rgevaert/activemq2deb I am trying to distribute upgrades to
our fleet. This results in failure each time.
> Looking into the matter the activemq script tries to stop the broker via JMX. This is
not configured, so fails.
> It falls back to issuing "kill -9 <PID>" then immediately exits with code 1. This
code 1 causes the packaging script to bail and thus we end up with a mess.
> A possible solution is to return the "kill" command's own result. This doesn't necessarily
reflect whether "kill" succeeded in terminating the PID however.
> A second possible solution is to detect the presence of 'start-stop-daemon' and use this
in preference. Narrows down the cases in which it does not work at least.
> I am of the opinion that a script aiming of cross-platform compatibility is probably
never going to work completely so detecting and making use of per-system tooling is probably
best long term, meantime would returning "kill's" exit code help?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message