users@glassfish.java.net

Cannot connect to MBeanServer within Glassfish from a remote host

From: <forums_at_java.net>
Date: Fri, 11 Jan 2013 09:40:30 -0600 (CST)

I have a webapp running within Glassfish 3.1.2 on a host with IP address
10.0.0.2. I can connect to that JVM via jvisualvm using a JMX Connection from
the local server:
service:jmx:rmi://10.0.0.2:8686/jndi/rmi://10.0.0.2:8686/jmxrmi However if I
try to create a JMX Connection within jvisualvm running on another host in
the same network I get "Cannot connect to ..." error message dialog. No
authentication credentials were needed for either case. With much help from
Tomas Hurka (thanks!) I was able to get the remote connection to work by
editing the ~/glassfish-3.1.2/glassfish/domains/domain1/config/domain.xml and
adding the following system property line just before each occurance of :
-Djava.rmi.server.hostname=10.0.0.2 This sort of explains why above is needed
as an RMI limitation though I do not quite grok it. Oh well.
http://forum.springsource.org/showthread.php?64670-Why-do-I-need-to-define-java-rmi-server-hostname&p=219304#post219304
My problem is solved but I am summarizing it here for posterity :-) Thank
again Tomas for your terrific help!

--
[Message sent by forum member 'najmi']
View Post: http://forums.java.net/node/893799