Running multiple activemq instances on the same server

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Running multiple activemq instances on the same server

JohnTom
Hi

I was following this:
https://sbforge.org/display/BITMAG/Running+multiple+activemq+instances+on+the+same+server

However when i issue:
  bin/activemq create instance1

then i get this error:

ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: java.lang.IllegalArgumentException: Invalid broker URI, no scheme specified: create
java.lang.RuntimeException: Failed to execute start task. Reason: java.lang.IllegalArgumentException: Invalid broker URI, no scheme specified: create

Can anyone help me please?
Reply | Threaded
Open this post in threaded view
|

Re: Running multiple activemq instances on the same server

dejanb
Seems like you're using some older version of the broker. Try 5.5.0

Regards
--
Dejan Bosanac - http://twitter.com/dejanb
-----------------
The experts in open source integration and messaging - http://fusesource.com
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Sun, Aug 21, 2011 at 3:31 PM, JohnTom <[hidden email]> wrote:

> Hi
>
> I was following this:
>
> https://sbforge.org/display/BITMAG/Running+multiple+activemq+instances+on+the+same+server
>
> https://sbforge.org/display/BITMAG/Running+multiple+activemq+instances+on+the+same+server
>
> However when i issue:
>  bin/activemq create instance1
>
> then i get this error:
>
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
> java.lang.IllegalArgumentException: Invalid broker URI, no scheme
> specified:
> create
> java.lang.RuntimeException: Failed to execute start task. Reason:
> java.lang.IllegalArgumentException: Invalid broker URI, no scheme
> specified:
> create
>
> Can anyone help me please?
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Running-multiple-activemq-instances-on-the-same-server-tp3758394p3758394.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Running multiple activemq instances on the same server

JohnTom
Hi

I was already using active MQ 5.5.0

On Mon, Aug 22, 2011 at 10:58 AM, Dejan Bosanac [via ActiveMQ] <[hidden email]> wrote:
Seems like you're using some older version of the broker. Try 5.5.0

Regards
--
Dejan Bosanac - http://twitter.com/dejanb
-----------------
The experts in open source integration and messaging - http://fusesource.com
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net



On Sun, Aug 21, 2011 at 3:31 PM, JohnTom <[hidden email]> wrote:

> Hi
>
> I was following this:
>
> https://sbforge.org/display/BITMAG/Running+multiple+activemq+instances+on+the+same+server
>
> https://sbforge.org/display/BITMAG/Running+multiple+activemq+instances+on+the+same+server
>

> However when i issue:
>  bin/activemq create instance1
>
> then i get this error:
>
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
> java.lang.IllegalArgumentException: Invalid broker URI, no scheme
> specified:
> create
> java.lang.RuntimeException: Failed to execute start task. Reason:
> java.lang.IllegalArgumentException: Invalid broker URI, no scheme
> specified:
> create
>
> Can anyone help me please?
>
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/Running-multiple-activemq-instances-on-the-same-server-tp3758394p3759510.html
To unsubscribe from Running multiple activemq instances on the same server, click here.

Reply | Threaded
Open this post in threaded view
|

Re: Running multiple activemq instances on the same server

JohnTom
In reply to this post by dejanb
Hi

I was already using ActiveMQ 5.5.0
Reply | Threaded
Open this post in threaded view
|

Re: Running multiple activemq instances on the same server

dejanb
In reply to this post by JohnTom
Think not. It works here with 5.5.0, but you can expect that kind of error
on older versions as activemq script wasn't supporting commands

Regards
--
Dejan Bosanac - http://twitter.com/dejanb
-----------------
The experts in open source integration and messaging - http://fusesource.com
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Mon, Aug 22, 2011 at 11:05 AM, JohnTom <[hidden email]> wrote:

> Hi
>
> I was already using active MQ 5.5.0
>
> On Mon, Aug 22, 2011 at 10:58 AM, Dejan Bosanac [via ActiveMQ] <
> [hidden email]> wrote:
>
> > Seems like you're using some older version of the broker. Try 5.5.0
> >
> > Regards
> > --
> > Dejan Bosanac - http://twitter.com/dejanb
> > -----------------
> > The experts in open source integration and messaging -
> > http://fusesource.com
> > ActiveMQ in Action - http://www.manning.com/snyder/
> > Blog - http://www.nighttale.net
> >
> >
> >
> > On Sun, Aug 21, 2011 at 3:31 PM, JohnTom <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=3759510&i=0>>
> > wrote:
> >
> > > Hi
> > >
> > > I was following this:
> > >
> > >
> >
> https://sbforge.org/display/BITMAG/Running+multiple+activemq+instances+on+the+same+server
> > >
> > >
> >
> https://sbforge.org/display/BITMAG/Running+multiple+activemq+instances+on+the+same+server
> > >
> > > However when i issue:
> > >  bin/activemq create instance1
> > >
> > > then i get this error:
> > >
> > > ERROR: java.lang.RuntimeException: Failed to execute start task.
> Reason:
> > > java.lang.IllegalArgumentException: Invalid broker URI, no scheme
> > > specified:
> > > create
> > > java.lang.RuntimeException: Failed to execute start task. Reason:
> > > java.lang.IllegalArgumentException: Invalid broker URI, no scheme
> > > specified:
> > > create
> > >
> > > Can anyone help me please?
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://activemq.2283324.n4.nabble.com/Running-multiple-activemq-instances-on-the-same-server-tp3758394p3758394.html
> > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > >
> >
> >
> > ------------------------------
> >  If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://activemq.2283324.n4.nabble.com/Running-multiple-activemq-instances-on-the-same-server-tp3758394p3759510.html
> >  To unsubscribe from Running multiple activemq instances on the same
> > server, click here<
> >.
> >
> >
>
>
> --
> View this message in context:
>
http://activemq.2283324.n4.nabble.com/Running-multiple-activemq-instances-on-the-same-server-tp3758394p3759608.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Running multiple activemq instances on the same server

oseymen
In reply to this post by JohnTom
Can you try activemq-admin instead of activemq? I.e. "bin\activemq-admin create instance1"?

Ozan
Reply | Threaded
Open this post in threaded view
|

Re: Running multiple activemq instances on the same server

Joe Niski
Ozan is correct, that wiki page is in error; "activemq-admin create "
does the simple job of copying basic config files for a new instance.

When i ran it against my installation, which includes a number of
additional config files for families of Camel Routes, and a custom
properties file (because we've externalized a lot of parameter values
into properties file and use Spring's PropertyPlaceholderConfigurer in
our xml), it isn't very useful - it doesn't copy the entire contents of
<$ACTIVEMQ_HOME>/conf, so our custom config files would need to be
pulled in manually.

For me, it's actually easier to do a filesystem copy of the entire AMQ
tree and hand-edit the ports in our properties files.

Also, note that when "activemq-admin create" copies the xml files, it
encodes the ">" wildcard character as "&gt;". This doesn't appear to
cause any runtime problems.

*Joe Niski*
Senior Developer - Information Services  |  NWEA™

PHONE 503.548.5207 | FAX 503.639.7873

NWEA.ORG <http://www.nwea.org/> | Partnering to help all kids learn™


On 08/22/2011 08:19 AM, oseymen wrote:
> Can you try activemq-admin instead of activemq? I.e. "bin\activemq-admin
> create instance1"?
>
> Ozan
>
Reply | Threaded
Open this post in threaded view
|

Re: Running multiple activemq instances on the same server

papa nagy
"we've externalized a lot of parameter values into properties file and
use Spring's PropertyPlaceholderConfigurer in our xml"

this is what i am trying to do, unfortunately using xbean <broker> tags,
the spring placeholder are ignored. i want to run multiple "embedded"
brokers with tomcat using different ports for each instance. could you
post your broker configuration with the spring property placeholders?

> Ozan is correct, that wiki page is in error; "activemq-admin create "
> does the simple job of copying basic config files for a new instance.
>
> When i ran it against my installation, which includes a number of
> additional config files for families of Camel Routes, and a custom
> properties file (because we've externalized a lot of parameter values
> into properties file and use Spring's PropertyPlaceholderConfigurer in
> our xml), it isn't very useful - it doesn't copy the entire contents
> of <$ACTIVEMQ_HOME>/conf, so our custom config files would need to be
> pulled in manually.
>
> For me, it's actually easier to do a filesystem copy of the entire AMQ
> tree and hand-edit the ports in our properties files.
>
> Also, note that when "activemq-admin create" copies the xml files, it
> encodes the ">" wildcard character as "&gt;". This doesn't appear to
> cause any runtime problems.
>
> *Joe Niski*
> Senior Developer - Information Services  |  NWEA™
>
> PHONE 503.548.5207 | FAX 503.639.7873
>
> NWEA.ORG <http://www.nwea.org/> | Partnering to help all kids learn™
>
>
> On 08/22/2011 08:19 AM, oseymen wrote:
>> Can you try activemq-admin instead of activemq? I.e. "bin\activemq-admin
>> create instance1"?
>>
>> Ozan
>>

Reply | Threaded
Open this post in threaded view
|

Re: Running multiple activemq instances on the same server

Joe Niski
Here's the top of my activemq.xml:

<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:amq="http://activemq.apache.org/schema/core"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
             http://www.springframework.org/schema/beans/spring-beans.xsd
             http://activemq.apache.org/schema/core
             http://activemq.apache.org/schema/core/activemq-core.xsd">


<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>file:${activemq.base}/conf/messaging.conf</value>
<value>file:${activemq.base}/conf/credentials.properties</value>
</list>
</property>
</bean>

As you can see, i'm using Spring, in our case because we're driving
Camel routing configurations via imported xml files, too.

Here's a an example of using property placeholders from further down the
file, standard Spring:

<managementContext>
<managementContext createConnector="true"
connectorPort="${remote_jmxConnectorPort}"/>
</managementContext>

and another:

<transportConnectors>
<!-- by convention we use 51616 and 51617 (for ssl) so as not to
conflict with Geronimo's embedded ActiveMQ defaults (61616 & 61617) -->
<transportConnector name="openwire"
uri="tcp://0.0.0.0:${remote_openwirePortNumber}?keepAlive=true&amp;soTimeout=30000"/>
<transportConnector name="ssl" uri="ssl://0.0.0.0:${remote_sslPortNumber}"/>
</transportConnectors>

i hope this helps,
Joe

*Joe Niski*
Senior Developer - Information Services  |  NWEA™

PHONE 503.548.5207 | FAX 503.639.7873

NWEA.ORG <http://www.nwea.org/> | Partnering to help all kids learn™


On 08/24/2011 11:44 AM, papa nagy wrote:
> "we've externalized a lot of parameter values into properties file and
> use Spring's PropertyPlaceholderConfigurer in our xml"
>
> this is what i am trying to do, unfortunately using xbean<broker>  tags,
> the spring placeholder are ignored. i want to run multiple "embedded"
> brokers with tomcat using different ports for each instance. could you
> post your broker configuration with the spring property placeholders?