Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have enabled JMX connection on remote Glassfish server and then I've restarted it. During starting server notified:

Standard JMX Clients (like JConsole) can connect to JMXServiceURL:
[service:jmx:rmi:///jndi/rmi://myserver:8686/jmxrmi] for domain management purposes.

Port 8686 is opened for connections.

But I can't connect to server with JConsole.. It says: Connection failed.

How can I solve this problem?

Thanks in advance.

share|improve this question

3 Answers 3

From what I understand, JMX is using 8686 as the port for the RMI registry, but JConsole connects there only to find the port to use for the JMX server, which is dynamically allocated. You might be running into an issue of having a firewall block access to this other port. You could verify this by using a remote desktop program to connect to the server, and then run JConsole locally (on the server). If it connects, then I bet this is your issue.

Hope this helps...

share|improve this answer
    
No, the firewall is disabled on this machine. If you are interesting the full discussion of the issue and more details are here forums.java.net/jive/thread.jspa?messageID=361607 It is still unresolved. –  Pavel Aug 22 '09 at 10:09
up vote 1 down vote accepted

The solution is to add -Djava.rmi.server.hostname= in the JVM Options of the instance of GlassFish.

share|improve this answer

on windows 7 I have experienced similar problems and the solution was to change address on jmx-connector to 127.0.0.1 in domain.xml

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.