You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by bhartsb <bh...@cox.net> on 2007/01/13 13:25:44 UTC

Accessing remote AMQ with JConsole.

Hi,

I am having trouble using JConsole to monitor a remote AMQ.  I can run AMQ
locally and JConsole works fine.

I have looked already at:
http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html#remote.

My batch file to run AMQ remote is:

java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1099
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false -jar AMQ.jar

I then try to launch JConsole is either: 

 jconsole service:jmx:rmi:///jndi/rmi://WAN_IP:1099/jmxrmi
or
jconsole WAN_IP:1099

Neither of these work remotely.  


If I launch jconsole on the same machine as AMQ, using the exact two methods
immediately above, the connection WILL be made.  The AMQ batch file then is
just (for this local mode): 

java -Dcom.sun.management.jmxremote -jar AMQ.jar

Thanks.





-- 
View this message in context: http://www.nabble.com/Accessing-remote-AMQ-with-JConsole.-tf2971096.html#a8313689
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Accessing remote AMQ with JConsole.

Posted by skimstercg <St...@uscg.mil>.
What worked for me was modifiying the /etc/hosts file on the Red Hat box so
that the machine hostname resolves to actual ip address instead of
127.0.0.1.  After changing, restart AMQ.  Hope that helps.



bhartsb wrote:
> 
> I have tried adding the line: -Djava.rmi.server.hostname=x.x.x.x, but this
> still doesn't do it.  I can connect fine from a remote machine on the LAN,
> even using the public WAN IP, but not from a machine not on the LAN, using
> the WAN IP.  I have eliminated firewalls, and set up virtual server
> settings (IP address/port forwarding) on my router also.  I'm running on
> Windows XP (it's firewall disabled also per testing).
> 


-- 
View this message in context: http://www.nabble.com/Accessing-remote-AMQ-with-JConsole.-tf2971096.html#a8711641
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Accessing remote AMQ with JConsole.

Posted by bhartsb <bh...@cox.net>.
I have tried adding the line: -Djava.rmi.server.hostname=x.x.x.x, but this
still doesn't do it.  I can connect fine from a remote machine on the LAN,
even using the public WAN IP, but not from a machine not on the LAN, using
the WAN IP.  I have eliminated firewalls, and set up virtual server settings
(IP address/port forwarding) on my router also.  I'm running on Windows XP
(it's firewall disabled also per testing).



skimstercg wrote:
> 
> I found a solution to my problem.  The answer was unrelated to AMQ or JMX. 
> It was due to weirdness in the /etc/hosts file on Red Hat Linux box. 
> Fixing this, fixed RMI, which fixed JMX and all's well.  More info can be
> found at:
> 
> http://www.jboss.com/index.html?module=bb&op=viewtopic&t=8092&postdays=0&postorder=asc&start=0
> 
> 
> 
> 
> skimstercg wrote:
>> 
>> I've got the exact same problem.  My set up: local box (Windows) with AMQ
>> and remote box (Red Hat Linux) with AMQ.  Both boxes are running JDK
>> 1.4.2.  I can use JConsole to monitor my local box but not the remote
>> box.  Another clue -- I tried using the "list" command in the
>> activemq/bin directory with the --jmxurl argument.  On local windows box,
>> it works fine to access local AMQ url but not remote AMQ url.  If I run
>> the list command on Linux box, I can access both the Windows AMQ url as
>> well as the Linux AMQ url.  So it appears to be some issue with Windows
>> box connecting outbound to port 1099 on another box.  My Linux admin
>> tells me port 1099 on the Linux box is not restristed by its firewall in
>> any way.  From windows box I can telnet to port 1099 on Linux box and I
>> can tell something's there listening. Anyone have any ideas?
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Accessing-remote-AMQ-with-JConsole.-tf2971096.html#a8704146
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Accessing remote AMQ with JConsole.

Posted by skimstercg <St...@uscg.mil>.
I found a solution to my problem.  The answer was unrelated to AMQ or JMX. 
It was due to weirdness in the /etc/hosts file on Red Hat Linux box.  Fixing
this, fixed RMI, which fixed JMX and all's well.  More info can be found at:

http://www.jboss.com/index.html?module=bb&op=viewtopic&t=8092&postdays=0&postorder=asc&start=0




skimstercg wrote:
> 
> I've got the exact same problem.  My set up: local box (Windows) with AMQ
> and remote box (Red Hat Linux) with AMQ.  Both boxes are running JDK
> 1.4.2.  I can use JConsole to monitor my local box but not the remote box. 
> Another clue -- I tried using the "list" command in the activemq/bin
> directory with the --jmxurl argument.  On local windows box, it works fine
> to access local AMQ url but not remote AMQ url.  If I run the list command
> on Linux box, I can access both the Windows AMQ url as well as the Linux
> AMQ url.  So it appears to be some issue with Windows box connecting
> outbound to port 1099 on another box.  My Linux admin tells me port 1099
> on the Linux box is not restristed by its firewall in any way.  From
> windows box I can telnet to port 1099 on Linux box and I can tell
> something's there listening. Anyone have any ideas?
> 
> 

-- 
View this message in context: http://www.nabble.com/Accessing-remote-AMQ-with-JConsole.-tf2971096.html#a8441334
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Accessing remote AMQ with JConsole.

Posted by skimstercg <St...@uscg.mil>.
I've got the exact same problem.  My set up: local box (Windows) with AMQ and
remote box (Red Hat Linux) with AMQ.  Both boxes are running JDK 1.4.2.  I
can use JConsole to monitor my local box but not the remote box.  Another
clue -- I tried using the "list" command in the activemq/bin directory with
the --jmxurl argument.  On local windows box, it works fine to access local
AMQ url but not remote AMQ url.  If I run the list command on Linux box, I
can access both the Windows AMQ url as well as the Linux AMQ url.  So it
appears to be some issue with Windows box connecting outbound to port 1099
on another box.  My Linux admin tells me port 1099 on the Linux box is not
restristed by its firewall in any way.  From windows box I can telnet to
port 1099 on Linux box and I can tell something's there listening. Anyone
have any ideas?



bhartsb wrote:
> 
> Hi,
> 
> I am having trouble using JConsole to monitor a remote AMQ.  I can run AMQ
> locally and JConsole works fine.
> 
> I have looked already at:
> http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html#remote.
> 
> My batch file to run AMQ remote is:
> 
> java -Dcom.sun.management.jmxremote
> -Dcom.sun.management.jmxremote.port=1099
> -Dcom.sun.management.jmxremote.authenticate=false
> -Dcom.sun.management.jmxremote.ssl=false -jar AMQ.jar
> 
> I then try to launch JConsole is either: 
> 
>  jconsole service:jmx:rmi:///jndi/rmi://WAN_IP:1099/jmxrmi
> or
> jconsole WAN_IP:1099
> 
> Neither of these work remotely.  
> 
> 
> If I launch jconsole on the same machine as AMQ, using the exact two
> methods immediately above, the connection WILL be made.  The AMQ batch
> file then is just (for this local mode): 
> 
> java -Dcom.sun.management.jmxremote -jar AMQ.jar
> 
> Thanks.
> 
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Accessing-remote-AMQ-with-JConsole.-tf2971096.html#a8421755
Sent from the ActiveMQ - User mailing list archive at Nabble.com.