Created attachment 167965 [details] activemq daemon script When running daemon script, activemq doesn't properly stop. Command: /usr/local/etc/rc.d/activemq stop Reports that script did not detect running activemq even though it is. Adding start command appears to solve the issue.
Created attachment 168383 [details] Change user to detect activemq process The rc.d script rely on jps(1) to detect the process, however on my system, running jps(1) as root produces: # jps -l 39223 -- process information unavailable 71545 -- process information unavailable 72668 sun.tools.jps.Jps Running jps(1) as the user activemq instead of root produce a better output: # sudo -u activemq jps -l 72761 sun.tools.jps.Jps 71545 /usr/local/lib/activemq/bin/activemq.jar A quick solution is to use sudo(1) to run jps(1) as the activemq user, but the maintainer may prefer to rework the detection code instead of adding a dependency?
I'm running FreeBSD 10.3-PRERELEASE by the way.
A commit references this bug: Author: tj Date: Fri Mar 25 15:29:57 UTC 2016 New revision: 411851 URL: https://svnweb.freebsd.org/changeset/ports/411851 Log: Update to 5.13.2 Changes: http://activemq.apache.org/activemq-5132-release.html Fix stop/status in rc script. PR: 207881 Changes: head/net/activemq/Makefile head/net/activemq/distinfo head/net/activemq/files/activemq.in head/net/activemq/pkg-plist
This is still an issue. Recently installed ActiveMQ 5.13.2 and daemon will not stop properly and is always killed. When killed, I have experienced corrupted kahadb and left over lock files which prevent next ActiveMQ instance from running properly. OS is 10.3-RELEASE
Is this still an issue?
Maintainer reset.
A commit references this bug: Author: tobik Date: Thu Apr 18 09:03:10 UTC 2019 New revision: 499241 URL: https://svnweb.freebsd.org/changeset/ports/499241 Log: net/activemq: Fix rc script stop command The stop command fails because it cannot connect to activemq, so the rc script currently always kills activemq which might lead to lost data, database corruption, left-over lock files, etc. Run the stop command under the activemq user too like the jps command in activemq_check_pidfile() so that it can actually shutdown activemq. - While here fix log files location PR: 207881 Reported by: bwilliamson@bex.net Changes: head/net/activemq/Makefile head/net/activemq/files/activemq.in head/net/activemq/files/patch-conf_log4j.properties
Should be fixed now, I hope.