activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wright, Peter" <Peter.Wri...@six-group.com>
Subject ActiveMQ multiple instances: start problems when passing config file
Date Wed, 31 Oct 2012 14:06:49 GMT
Hi,

I'm currently to migrating from IBM-WMQ to activemq.
On WMQ I have a number of separate queue managers
to separate the applications from each other
(so possible problems in one queue manager do not affect
other applications).

On activemq (5.7.0) I therefore want to configure multiple
broker instances on my linux server running SLES 11.
Q1: any disadvantages in this approach with activemq?

I'm able to create the instances, but if I try to start them
with the config file argument, then errors are issued (see further below).
If I start them without the config file argument, it seems to work OK, but
Q2: am I missing out on configuration options?

It also appears to me that the two files created at the start are never used:
- config file "/export/home/mqm/.activemqrc-instance-INSTANCE1" created by the setup command
- softlink "/export/home/mqm/activeMQ/apache-activemq-5.7.0/bin/activemq-instance-INSTANCE1"
Q3: Are these two files needed? Am I overlooking something?

Thanks for any help,

Best regards,
Peter

=========================================

Actions taken
=============

# 1. Move to the activeMQ root directory
% cd /export/home/mqm/activeMQ/apache-activemq-5.7.0

# 2. Create the instances:
# 2a. INSTANCE1
% bin/activemq create INSTANCE1
% bin/activemq setup /export/home/mqm/.activemqrc-instance-INSTANCE1
% ln -s activemq bin/activemq-instance-INSTANCE1

# 2b. INSTANCE2
% bin/activemq create INSTANCE2
% bin/activemq setup /export/home/mqm/.activemqrc-instance-INSTANCE2
% ln -s activemq bin/activemq-instance-INSTANCE2

# 3. Set unique ports for the instances in the conf/activemq.xml and conf/jetty.xml files
#    created by the "create" command above
#    i.e. in /export/home/mqm/activeMQ/apache-activemq-5.7.0
./INSTANCE1/conf/activemq.xml: <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
./INSTANCE1/conf/jetty.xml: <property name="port" value="8161" />
./INSTANCE2/conf/activemq.xml: <transportConnector name="openwire" uri="tcp://0.0.0.0:61626"/>
./INSTANCE2/conf/jetty.xml: <property name="port" value="8162" />

# 3. Start the instances

# 3a. Start without passing the config file: works correctly
% ./INSTANCE1/bin/INSTANCE1 start
% ./INSTANCE1/bin/INSTANCE2 start

# 3b. Start by passing the config file: errors "Invalid broker URI, no scheme specified" are
issued(!)
% ./INSTANCE1/bin/INSTANCE1 start /export/home/mqm/.activemqrc-instance-INSTANCE1
% ./INSTANCE1/bin/INSTANCE2 start /export/home/mqm/.activemqrc-instance-INSTANCE2


Error messages from Start command
=================================
INFO: Using default configuration
(you can configure options in one of these file: /etc/default/activemq /export/home/mqm/.activemqrc)

INFO: Invoke the following command to create a configuration file
/export/home/mqm/activeMQ/apache-activemq-5.7.0/bin/activemq setup [ /etc/default/activemq
| /export/home/mqm/.activemqrc ]

INFO: Using java '/usr/java/jdk1.6.0_27/bin/java'
Java Runtime: Sun Microsystems Inc. 1.6.0_27 /usr/java/jdk1.6.0_27/jre
  Heap sizes: current=1004928k  free=999683k  max=1004928k
    JVM args: -Xms1G -Xmx1G -Djava.util.logging.config.file=logging.properties -Dactivemq.classpath=/export/home/mqm/activeMQ/apache-activemq-5.7.0/INSTANCE1/conf;
-Dactivemq.home=/export/home/mqm/activeMQ/apache-activemq-5.7.0 -Dactivemq.base=/export/home/mqm/activeMQ/apache-activemq-5.7.0/INSTANCE1
-Dactivemq.conf=/export/home/mqm/activeMQ/apache-activemq-5.7.0/INSTANCE1/conf -Dactivemq.data=/export/home/mqm/activeMQ/apache-activemq-5.7.0/INSTANCE1/data
Extensions classpath:
  [/export/home/mqm/activeMQ/apache-activemq-5.7.0/INSTANCE1/lib,/export/home/mqm/activeMQ/apache-activemq-5.7.0/lib,/export/home/mqm/activeMQ/apache-activemq-5.7.0/INSTANCE1/lib/camel,/export/home/mqm/activeMQ/apache-activemq-5.7.0/INSTANCE1/lib/optional,/export/home/mqm/activeMQ/apache-activemq-5.7.0/INSTANCE1/lib/web,/export/home/mqm/activeMQ/apache-activemq-5.7.0/INSTANCE1/lib/extra,/export/home/mqm/activeMQ/apache-activemq-5.7.0/lib/camel,/export/home/mqm/activeMQ/apache-activemq-5.7.0/lib/optional,/export/home/mqm/activeMQ/apache-activemq-5.7.0/lib/web,/export/home/mqm/activeMQ/apache-activemq-5.7.0/lib/extra]
ACTIVEMQ_HOME: /export/home/mqm/activeMQ/apache-activemq-5.7.0
ACTIVEMQ_BASE: /export/home/mqm/activeMQ/apache-activemq-5.7.0/INSTANCE1
ACTIVEMQ_CONF: /export/home/mqm/activeMQ/apache-activemq-5.7.0/INSTANCE1/conf
ACTIVEMQ_DATA: /export/home/mqm/activeMQ/apache-activemq-5.7.0/INSTANCE1/data
Loading message broker from: /export/home/mqm/.activemqrc-instance-INSTANCE1
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: java.lang.IllegalArgumentException:
Invalid broker URI, no scheme specified: /export/home/mqm/.activemqrc-instance-INSTANCE1
java.lang.RuntimeException: Failed to execute start task. Reason: java.lang.IllegalArgumentException:
Invalid broker URI, no scheme specified: /export/home/mqm/.activemqrc-instance-INSTANCE1
        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:148)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:90)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
        at org.apache.activemq.console.Main.main(Main.java:115)
Caused by: java.lang.IllegalArgumentException: Invalid broker URI, no scheme specified: /export/home/mqm/.activemqrc-instance-INSTANCE1
        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:68)
        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
        at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:115)
        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:91)
        ... 10 more
ERROR: java.lang.Exception: java.lang.IllegalArgumentException: Invalid broker URI, no scheme
specified: /export/home/mqm/.activemqrc-instance-INSTANCE1
java.lang.Exception: java.lang.IllegalArgumentException: Invalid broker URI, no scheme specified:
/export/home/mqm/.activemqrc-instance-INSTANCE1
        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:99)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:148)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:90)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
        at org.apache.activemq.console.Main.main(Main.java:115)
Caused by: java.lang.IllegalArgumentException: Invalid broker URI, no scheme specified: /export/home/mqm/.activemqrc-instance-INSTANCE1
        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:68)
        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
        at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:115)
        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:91)
        ... 10 more



The content of this e-mail is intended only for the confidential use of the person addressed.

If you are not the intended recipient, please notify the sender and delete this email immediately.
Thank you.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message