Apache ActiveMq 5.11.1 doesn't start in Ubuntu -


i newbie apache active mq. following instructions here

i don't need multiple instances of active mq, trying helloworld using activemq. start following below error

vinod@bblpt0326:/srv/activemq/current$ /etc/init.d/activemq start

info: loading '/etc/default/activemq' info: using java '/opt/software/java/bin/java' info: starting - inspect logfiles specified in logging.properties , log4j.properties details /etc/init.d/activemq: 300: /etc/init.d/activemq: "/opt/software/java/bin/java" -xms1g -xmx1g -djava.util.logging.config.file=logging.properties -djava.security.auth.login.config=/srv/activemq/apache-activemq-5.11.1/conf/login.config -dcom.sun.management.jmxremote -djava.awt.headless=true -djava.io.tmpdir="/srv/activemq/apache-activemq-5.11.1/tmp" -dactivemq.classpath="/srv/activemq/apache-activemq-5.11.1/conf:" -dactivemq.home="/srv/activemq/apache-activemq-5.11.1" -dactivemq.base="/srv/activemq/apache-activemq-5.11.1" -dactivemq.conf="/srv/activemq/apache-activemq-5.11.1/conf" -dactivemq.data="/srv/activemq/apache-activemq-5.11.1/data" -jar "/srv/activemq/apache-activemq-5.11.1/bin/activemq.jar" start >/dev/null 2>&1 & ret="$?"; apid="$!"; echo $apid > /srv/activemq/apache-activemq-5.11.1/data/activemq.pid; echo "info: pidfile created : '/srv/activemq/apache-activemq-5.11.1/data/activemq.pid' (pid '$apid')";exit $ret: not found

when tried sudo different error below

vinod@bblpt0326:/srv/activemq/current$ sudo /etc/init.d/activemq start

info: loading '/etc/default/activemq' error: configuration variable java_home or javacmd not defined correctly. (java_home='', javacmd='java')

my java_home defined. verified same below.

vinod@bblpt0326:/srv/activemq/current$ echo $java_home

/opt/software/java

i referred solution here using ubuntu 14.0.4.

but not clear don't have path /etc/activemq/instances-enabled , should execute command sudo ln -s ../instances-available/main/

i answering own question here.

in ubuntu 14.0.4 root cause of problem

info: loading '/etc/default/activemq' error: configuration variable java_home or javacmd not defined correctly. (java_home='', javacmd='java')

even if define java_home in /etc/environment, active mq reads either of below locations ever if finds file first.

  1. /etc/default/activemq
  2. $home/.activemqrc
  3. $installdir/apache-activemq-/bin/env

so recommend defining java_home in /etc/default/activemq (which copied $installdir/apache-activemq-/bin/env)

i did below

java_home="/opt/software/java/jre" javacmd="/opt/software/java/jre/bin/java"


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -