You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by den!s <ti...@caramail.com> on 2007/08/23 16:02:00 UTC

two instances of web amq - one webconsole

Hi all,
i'm using amq-4.1.1 and the web console that goes with it.
The console is deployed on a tomcat using those arguments

-Dwebconsole.type=properties
-Dwebconsole.jms.url=http://<ip1>:61616
-Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://<ip1>:1099/jmxrmi

as tomcat system properties.
My problem is that I want to administrate 2 instances of amq on two
different servers with the same web-console.
Isn't it possible to set those properties somewhere else than in tomcat
(like in web.xml or pom.xml or anything)

Thanks
Denis
-- 
View this message in context: http://www.nabble.com/two-instances-of-web-amq---one-webconsole-tf4317706s2354.html#a12294148
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: two instances of web amq - one webconsole

Posted by Mario Siegenthaler <ms...@inventsoft.ch>.
Ah, I think I see the problem. You need to use the webconsole of
activemq 5.0 (trunk-version). So instead of checking out the 4.1.1 tag
just use the trunk. The changes allowing to run activemq in a tomcat
are rather new and I don't think they've been backported. The 5.0
webconsole works just fine with a 4.x broker.
Actually we're doing the exact same thing you're trying to do with our
production and test activemq instances, so I'm sure we'll get your
running as well.

Once you've got it up and running you could also try to apply the
accumulated patches for the webconsole I sent to the dev-list last
week, this will fix some things and add a few features to the
webconsole. Esp. when your sending xml messages it could be helpfull
as it escapes the xml, so you can actually ready it.

Mario


On 8/28/07, den!s <ti...@caramail.com> wrote:
>
> Thank you for your answers mario but it still doesn't work.
> I'll write once again all i've done perhaps something will appear to you
>
> What i'm trying to do :
> Administrate an activemq already runnning with a web console deployed on
> tomcat.
>
> What i've done :
> 1) grab the amq4.1.1 zip on the site unzip it and launch the standard amq by
> typing
> bin\activemq.bat in a windows console.
>
> 2) grab the source of the 4.1.1 tag fron the svn server.
>
> 3) mvn clean install -Dmaven.test.skip=true to obtain a war
>
> 4) open my tomcat monitor
> http://www.nabble.com/file/p12369394/tomcat.png
> and put
> -Dwebconsole.type=properties
> -Dwebconsole.jms.url=tcp://localhost:61616
> -Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
> just like on the picture
>
> 5) deploy the webconsole war in tomcat (after restating tomcat)
>
> the result is that the web app doesn't start cause it is trying to launch an
> activemq but one is already launch and the port taken.  Perhaps the
> properties I put in the Tomcat monitor aren't at the right place.  But then
> where do I put them ?
>
> One more thing : i never saw a file called webconsole-properties.xml.  Do I
> have to create it ?
>
> Denis
>
>
> Mario Siegenthaler-2 wrote:
> >
> > If the console starts up an own ActiveMQ instance then you most likely
> > forgot to set -Dwebconsole.type=properties The webconsole supports
> > multiple types of configuration and the type is specified via a system
> > property. For every type there's an own spring configuration file
> > inside the webconsole (f.e. webconsole-properties.xml) and the system
> > property tells it which one to use.
> > Else your settings are looking good to me.
> >
> > Mario
> >
> > On 8/28/07, den!s <ti...@caramail.com> wrote:
> >>
> >>
> >> Mario Siegenthaler-2 wrote:
> >> >
> >> > Only if the two are a master/slave pair (only one running at a time).
> >> >
> >>
> >> This is what i'm using : master/slave with Shared File system.  But I
> >> realize that my main problem is (and was from the beginning) that when I
> >> deploy the console(4.1.1), it start a queue (i can configure it in
> >> WEB-INF/activemq.xml).
> >>
> >> Is it possible no to start this queue and to connect to the two queue
> >> with
> >> those params :
> >> -Dwebconsole.jms.url=failover:(tcp://serverA:61616,tcp://serverB:61616)
> >> -Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://serverA:1099/jmxrmi,service:jmx:rmi:///jndi/rmi://serverB:1099/jmxrmi
> >> ?
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/two-instances-of-web-amq---one-webconsole-tf4317706s2354.html#a12364752
> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/two-instances-of-web-amq---one-webconsole-tf4317706s2354.html#a12369394
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Re: two instances of web amq - one webconsole

Posted by den!s <ti...@caramail.com>.
Thank you for your answers mario but it still doesn't work.
I'll write once again all i've done perhaps something will appear to you

What i'm trying to do :
Administrate an activemq already runnning with a web console deployed on
tomcat.

What i've done :
1) grab the amq4.1.1 zip on the site unzip it and launch the standard amq by
typing
bin\activemq.bat in a windows console.

2) grab the source of the 4.1.1 tag fron the svn server.

3) mvn clean install -Dmaven.test.skip=true to obtain a war

4) open my tomcat monitor
http://www.nabble.com/file/p12369394/tomcat.png 
and put 
-Dwebconsole.type=properties
-Dwebconsole.jms.url=tcp://localhost:61616
-Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
just like on the picture

5) deploy the webconsole war in tomcat (after restating tomcat)

the result is that the web app doesn't start cause it is trying to launch an
activemq but one is already launch and the port taken.  Perhaps the
properties I put in the Tomcat monitor aren't at the right place.  But then
where do I put them ?

One more thing : i never saw a file called webconsole-properties.xml.  Do I
have to create it ?

Denis


Mario Siegenthaler-2 wrote:
> 
> If the console starts up an own ActiveMQ instance then you most likely
> forgot to set -Dwebconsole.type=properties The webconsole supports
> multiple types of configuration and the type is specified via a system
> property. For every type there's an own spring configuration file
> inside the webconsole (f.e. webconsole-properties.xml) and the system
> property tells it which one to use.
> Else your settings are looking good to me.
> 
> Mario
> 
> On 8/28/07, den!s <ti...@caramail.com> wrote:
>>
>>
>> Mario Siegenthaler-2 wrote:
>> >
>> > Only if the two are a master/slave pair (only one running at a time).
>> >
>>
>> This is what i'm using : master/slave with Shared File system.  But I
>> realize that my main problem is (and was from the beginning) that when I
>> deploy the console(4.1.1), it start a queue (i can configure it in
>> WEB-INF/activemq.xml).
>>
>> Is it possible no to start this queue and to connect to the two queue
>> with
>> those params :
>> -Dwebconsole.jms.url=failover:(tcp://serverA:61616,tcp://serverB:61616)
>> -Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://serverA:1099/jmxrmi,service:jmx:rmi:///jndi/rmi://serverB:1099/jmxrmi
>> ?
>>
>> --
>> View this message in context:
>> http://www.nabble.com/two-instances-of-web-amq---one-webconsole-tf4317706s2354.html#a12364752
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/two-instances-of-web-amq---one-webconsole-tf4317706s2354.html#a12369394
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: two instances of web amq - one webconsole

Posted by Mario Siegenthaler <ms...@inventsoft.ch>.
If the console starts up an own ActiveMQ instance then you most likely
forgot to set -Dwebconsole.type=properties The webconsole supports
multiple types of configuration and the type is specified via a system
property. For every type there's an own spring configuration file
inside the webconsole (f.e. webconsole-properties.xml) and the system
property tells it which one to use.
Else your settings are looking good to me.

Mario

On 8/28/07, den!s <ti...@caramail.com> wrote:
>
>
> Mario Siegenthaler-2 wrote:
> >
> > Only if the two are a master/slave pair (only one running at a time).
> >
>
> This is what i'm using : master/slave with Shared File system.  But I
> realize that my main problem is (and was from the beginning) that when I
> deploy the console(4.1.1), it start a queue (i can configure it in
> WEB-INF/activemq.xml).
>
> Is it possible no to start this queue and to connect to the two queue with
> those params :
> -Dwebconsole.jms.url=failover:(tcp://serverA:61616,tcp://serverB:61616)
> -Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://serverA:1099/jmxrmi,service:jmx:rmi:///jndi/rmi://serverB:1099/jmxrmi
> ?
>
> --
> View this message in context: http://www.nabble.com/two-instances-of-web-amq---one-webconsole-tf4317706s2354.html#a12364752
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Re: two instances of web amq - one webconsole

Posted by den!s <ti...@caramail.com>.

Mario Siegenthaler-2 wrote:
> 
> Only if the two are a master/slave pair (only one running at a time).
> 

This is what i'm using : master/slave with Shared File system.  But I
realize that my main problem is (and was from the beginning) that when I
deploy the console(4.1.1), it start a queue (i can configure it in
WEB-INF/activemq.xml).

Is it possible no to start this queue and to connect to the two queue with
those params :
-Dwebconsole.jms.url=failover:(tcp://serverA:61616,tcp://serverB:61616)
-Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://serverA:1099/jmxrmi,service:jmx:rmi:///jndi/rmi://serverB:1099/jmxrmi
?

-- 
View this message in context: http://www.nabble.com/two-instances-of-web-amq---one-webconsole-tf4317706s2354.html#a12364752
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: two instances of web amq - one webconsole

Posted by Mario Siegenthaler <ms...@inventsoft.ch>.
Only if the two are a master/slave pair (only one running at a time).
Else I'd recommend you to just deploy the activemq twice on a tomcat
and use jndi to configure it. You'd then have myhost/amqc1 and
myhost/amqc2 as urls to the webconsole.

Mario

On 8/23/07, den!s <ti...@caramail.com> wrote:
>
> Hi all,
> i'm using amq-4.1.1 and the web console that goes with it.
> The console is deployed on a tomcat using those arguments
>
> -Dwebconsole.type=properties
> -Dwebconsole.jms.url=http://<ip1>:61616
> -Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://<ip1>:1099/jmxrmi
>
> as tomcat system properties.
> My problem is that I want to administrate 2 instances of amq on two
> different servers with the same web-console.
> Isn't it possible to set those properties somewhere else than in tomcat
> (like in web.xml or pom.xml or anything)
>
> Thanks
> Denis
> --
> View this message in context: http://www.nabble.com/two-instances-of-web-amq---one-webconsole-tf4317706s2354.html#a12294148
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>