activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j0llyr0g3r <timo.roess...@wincor-nixdorf.com>
Subject Re: jmx remote not working
Date Fri, 19 Oct 2007 12:26:08 GMT

Ok folks, 

i finally solved it like this:

Broker:

First you have to enable JMX in the broker itself in the
$AMQ_HOME/conf/activemq.xml:

<broker xmlns="http://activemq.org/config/1.0" brokerName="localhost"
useJmx="true">

and

<managementContext>
   <managementContext connectorPort="1099" />
</managementContext>


JVM:

Now you have to enable JMX in the JVM parameters in $AMQ_HOME/bin/activemq:

Locate the line

ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $SUNJMX $SSL_OPTS"

and change it to:

ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS $SUNJMX $SSL_OPTS
-Dcom.sun.management.jmxremote  
 -Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.authenticate=false"

In order to browse the jmx-interface, call up "jconsole" and connect to the
broker via:

service:jmx:rmi:///jndi/rmi://your_host:1099/jmxrmi

HTH and thx for the help...


j0llyr0g3r wrote:
> 
> Hi Joe,
> 
> unfortunately this didn't help.
> 
> Scince I start activemq via the shell-scipt provided in
> $AMQ_HOME/bin/activemq i located the section where amq finally is started:
> 
> 
> ACTIVEMQ_TASK="start"
> if [ -n "$CYGHOME" ]; then
>     exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS
> -Dactivemq.classpath="${ACTIVEMQ_CLASSPATH}"
> -Dactivemq.home="${ACTIVEMQ_HOME}" -Dactivemq.base="${ACTIVEMQ_BASE}"
> -Dcygwin.user.home="$CYGHOME" -jar "${ACTIVEMQ_HOME}/bin/run.jar"
> $ACTIVEMQ_TASK $@
> else
>     exec "$JAVACMD" $ACTIVEMQ_DEBUG_OPTS $ACTIVEMQ_OPTS
> -Dactivemq.classpath="${ACTIVEMQ_CLASSPATH}"
> -Dactivemq.home="${ACTIVEMQ_HOME}" -Dactivemq.base="${ACTIVEMQ_BASE}" -jar
> "${ACTIVEMQ_HOME}/bin/run.jar" $ACTIVEMQ_TASK $@
> fi
> 
> Scince the first "if" seems to correspond to  a cygwin environment, i
> added the following to the end of the "else":
> 
> -Dcom.sun.management.jmxremote.authenticate=false
> -Dcom.sun.management.jmxremote.ssl=false
> -Dcom.sun.management.jmxremote.host=:172.18.47.69
> -Dcom.sun.management.jmxremote.port=1099
> 
> The jmx-port of the broker is 1099, so the same as in 
> 
> -Dcom.sun.management.jmxremote.port=1099
> 
> This port is listening when i start the broker.
> 
> Unfortunately, when i try to connect now, i get the same error like
> before.........
> 
> Did i forget something?
> 
> 
> ttmdev wrote:
>> 
>> Did you set the following properties for your remote broker's jvm?
>> 
>> com.sun.management.jmxremote 
>> com.sun.management.jmxremote.host=<ip address that remote jvm will listen
>> on>
>> com.sun.management.jmxremote.port=<port that remote jvm will listen on>
>> 
>> Also, set the following to disable security for the remote jvm. 
>> 
>> com.sun.management.jmxremote.authenticate=false 
>> com.sun.management.jmxremote.ssl=false
>> 
>> Hope this helps,
>> Joe
>> 
>> 
>> 
>> j0llyr0g3r wrote:
>>> 
>>> Hi folks,
>>> 
>>> i have a strange problem here:
>>> 
>>> When i start a broker on localhost i can connect to it via jconsole.
>>> 
>>> But if i try the same with a remote broker, i get the error:
>>> 
>>> The connection to myhost:2099 did not succeed.
>>> 
>>> The remote broker is up and running and i can send and receive messages
>>> from it.
>>> 
>>> A 
>>> 
>>>     telnet myhost 2099
>>> 
>>> or a 
>>> 
>>>     netstat -tulpen | grep 2099
>>> 
>>> on the remote host shows me that activemq listens to that port.
>>> 
>>> I also enabled jmx in the broker via:
>>> 
>>>    <broker xmlns="http://activemq.org/config/1.0" useJmx="true"
>>> brokerName="localhost" >
>>> 
>>> and 
>>> 
>>>    <managementContext>
>>>        <managementContext connectorPort="2099"
>>> jmxDomainName="org.apache.activemq"/>
>>>     </managementContext>
>>>  
>>> What am i doing wrong here?
>>> 
>>> P.S. I use the latest Version 5 of amq.
>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/jmx-remote-not-working-tf4640173s2354.html#a13293442
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message