activemq launched from QSH cannot find its pid

Issue #116 resolved
Jack Woehr created an issue

QSH CMD('/QOpenSys/pkgs/bin/bash -c "/QOpenSys/pkgs/bin/activemq start >> /home/driveway/jwoehr/amqfoo.txt"')

results in …

$ cat amqfoo.txt
INFO: Loading '/QOpenSys/pkgs/lib/activemq//bin/env'
INFO: Using java '/QOpenSys/usr/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details
INFO: pidfile created : '/QOpenSys/pkgs/lib/activemq//data/activemq.pid' (pid '')

… with the result that …

$ activemq stop

… will no longer work as the pid file is empty.

Variations of the invocation from QSH QP2SHELL etc. with various shell syntax all fail in the exact same, including changing the shebang in the activemq launcher script /QOpenSys/pkgs/bin/activemq

Comments (5)

  1. Jack Woehr reporter

    Found a workaround:

    QSH CMD('/QOpenSys/pkgs/bin/bash -c "/QOpenSys/pkgs/bin/activemq start >> /home/driveway/jwoehr/amqfoo.txt" &')
    

    works.

  2. Jesse G

    It’s something related to process groups when run non-interactively, I think. Even a ps command shows an empty list with no arguments (which is what’s causing this AMQ issue).

    Will look into a workaround

  3. Jesse G

    This is a permanent restriction of ActiveMQ with JV1. Recommendation is to use RPM java for ActiveMQ deployments or to start via SSH

  4. Log in to comment