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

Håkan Johansson commented on AMQ-8411:
--------------------------------------

Attached {color:#FF0000}{{amq-8411.patch}}{color} that contains a solution that 
"works for me".
Feel free to improve as you see fit.

> ActiveMQ does not stop if ACTIVEMQ_USER is set
> ----------------------------------------------
>
>                 Key: AMQ-8411
>                 URL: https://issues.apache.org/jira/browse/AMQ-8411
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.16.3
>         Environment: Platform: Linux - Red Hat Enterprise Linux release 8.4 
> (Ootpa)
>            Reporter: Håkan Johansson
>            Priority: Major
>         Attachments: amq-8411.patch
>
>
> After upgrading from version 5.15.7 to 5.16.3 the broker no longer stops on 
> command.
> Step-by-step:
> * tar zxf apache-activemq-5.16.3-bin.tar.gz
> * cd apache-activemq-5.16.3
> * vi bin/env
> ** Set: ACTIVEMQ_USER="<current_user>"
> * sudo bin/activemq start
> * sudo bin/activemq stop
> The "sudo" part is important. In our prod system we run this script as root 
> so that is can change the user to $ACTIVEMQ_USER.
> Output from start command:
> {noformat}
> INFO: Loading '/home/hakjo/Downloads/apache-activemq-5.16.3//bin/env'
> INFO: Using java '/usr/bin/java'
> INFO: Starting - inspect logfiles specified in logging.properties and 
> log4j.properties to get details
> INFO: changing to user 'hakjo' to invoke java
> INFO: pidfile created : 
> '/home/hakjo/Downloads/apache-activemq-5.16.3//data/activemq.pid' (pid 
> '40650')
> {noformat}
> Output from stop command:
> {noformat}
> INFO: Loading '/home/hakjo/Downloads/apache-activemq-5.16.3//bin/env'
> INFO: Using java '/usr/bin/java'
> ERROR: No or outdated process id in 
> '/home/hakjo/Downloads/apache-activemq-5.16.3//data/activemq.pid'
> INFO: Removing /home/hakjo/Downloads/apache-activemq-5.16.3//data/activemq.pid
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to