You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "chris snow (JIRA)" <ji...@apache.org> on 2014/05/21 16:58:38 UTC
[jira] [Created] (AMQ-5197) Cannot start activemq using "ssh -c
/my_activemq_install_path/bin/activemq start"
chris snow created AMQ-5197:
-------------------------------
Summary: Cannot start activemq using "ssh -c /my_activemq_install_path/bin/activemq start"
Key: AMQ-5197
URL: https://issues.apache.org/jira/browse/AMQ-5197
Project: ActiveMQ
Issue Type: Bug
Components: Broker
Affects Versions: 5.9.1
Environment: Ubuntu 12.04
Reporter: chris snow
Activemq can't be started using "ssh -c /my_activemq_install_path/bin/activemq start".
Presumably this is because the startup script uses 'exec' which dies after the ssh session terminates.
As a work around, I have put a nasty hack in the startup script:
{code:shell}
...
# Execute java binary
if [ -n "$PIDFILE" ] && [ "$PIDFILE" != "stop" ];then
nohup $DOIT_PREFIX "$JAVACMD $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS \
-Dactivemq.classpath=\"${ACTIVEMQ_CLASSPATH}\" \
-Dactivemq.home=\"${ACTIVEMQ_HOME}\" \
-Dactivemq.base=\"${ACTIVEMQ_BASE}\" \
-Dactivemq.conf=\"${ACTIVEMQ_CONF}\" \
-Dactivemq.data=\"${ACTIVEMQ_DATA}\" \
$ACTIVEMQ_CYGWIN \
-jar \"${ACTIVEMQ_HOME}/bin/activemq.jar\" $COMMANDLINE_ARGS >/dev/null 2>&1 </dev/null &
RET=\"\$?\"; APID=\"\$!\";
echo \$APID > $PIDFILE;
echo \"INFO: pidfile created : '$PIDFILE' (pid '\$APID')\";exit \$RET" $DOIT_POSTFIX
RET="$?"
elif [ -n "$PIDFILE" ] && [ "$PIDFILE" = "stop" ];then
...
{code}
$EXEC_OPTION has been replaced with 'nohup', and, stdin has been redirected from /dev/null to prevent the nohup command stopping when the ssh session terminates.
--
This message was sent by Atlassian JIRA
(v6.2#6252)