You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by j0llyr0g3r <ti...@wincor-nixdorf.com> on 2007/10/17 14:13:49 UTC
jmx remote not working
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#a13252442
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: jmx remote not working
Posted by j0llyr0g3r <ti...@wincor-nixdorf.com>.
Hey folks,
sorry for providing such poor information.
Here is precisely what i do:
I follow the instructions provided by the AMQ-website here:
http://activemq.apache.org/jmx.html
The relevant section is at the end of the page and called Advanced JMX
Configuration.
According to the page, i did the following:
- I enabled jmx in the broker but did NOT create a connector:
<broker xmlns="http://activemq.org/config/1.0" useJmx="true"
brokerName="localhost" >
<managementContext>
<managementContext createConnector="false"
jmxDomainName="org.apache.activemq"/>
</managementContext>
- Then i modified the activemq-startscript:
SUNJMX="-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=1616 \
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false"
Now if i start the broker via the script, a
netstat -tulpen | grep 1616
shows
tcp 0 0 :::1616 :::* LISTEN
1008 3538689 760/java
but i still can not connect via
service:jmx:rmi:///jndi/rmi://<your hostname>:1616/jmxrmi
Error is simply "connection failed"......
Any hints / clues?
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#a13290654
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: jmx remote not working
Posted by j0llyr0g3r <ti...@wincor-nixdorf.com>.
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.
Re: jmx remote not working
Posted by j0llyr0g3r <ti...@wincor-nixdorf.com>.
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#a13276110
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: jmx remote not working
Posted by ttmdev <jo...@ttmsolutions.com>.
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#a13254517
Sent from the ActiveMQ - User mailing list archive at Nabble.com.