This content has been marked as final. Show 6 replies
Could you be a little more specific about what you mean with 1):
It returns "Connection failed" when i tried toand 2):
connect to it from local.
If i use those options and start it locally, i amDo you mean that in 1) you started your server without any option?
able to connect.
What do you mean by 'start it locally'? Do you mean that in 2) you start
jconsole on the same machine whereas in 1 you started jconsole from
a remote machine?
You might also want to read this article:
Troubleshooting connection problems in JConsole:
hope this helps,
JMX, SNMP, Java, etc...
I have a similar problem. Only difference might be that I used password authentication.
I'm trying to connect to a Resin server running on a linux box from a windows machine. JConsole cannot connect:
When I run Resin locally on the windows machine with the same parameters, JConsole can connect, even when specified as a remote process.
Connection failed: Exception creating connection to 10.10.10.10; nested exception is java.net.SocketException: Network is unreachable: connect
Any help is much appreciated.
Have a look at the JConsole FAQ to see if this solves your problem:
Thanks for your reply, Luis. I had already read this.
I can telnet to the linux machine, so I think the connection is not blocked.
I also tried without authentication. Then JConsole just says "Connection Failed: Retry?"
Any other ideas?
I'm also running into this issue on a Linux machine running JDK 1.6.0_12:
I'm running with the following VM parameters:
java -version java version "1.6.0_12" Java(TM) SE Runtime Environment (build 1.6.0_12-b04) Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode)
From a windows machine I run jconsole:
-Dcom.sun.management.jmxremote.port=9958 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
JConsole version "1.6.0_10-rc2-b32" Java(TM) SE Runtime Environment (build 1.6.0_10-rc2-b32) Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)
It seems like the JConsole is able to partial connect to the remote JMX service but then fails somewhere in the process.
It appears to begin to connect (I see the JMX monitoring tabs and a progress bar) then it says: Connection Failed: Retry? The connection to 192.168.10.143:9958 did not succeed. Would you like to try again?
If I try to connect to a non-JMX listening port on 192.168.10.143 I receive a message in the connection selection dialogue:
If I connect to a port that the remote server isn't listening to I do not get the Connection Failed error, it ends up timing out then I sending me back to the New Connection window.
Connection failed: non-JRMP server at remote endpoint
Solution is here: http://blogs.sun.com/jmxetc/entry/troubleshooting_connection_problems_in_jconsole
If you're running on Linux, or if you're experimenting with SSH tunneling you might encounter issues with the way hostnames are resolved. See this comment and watch out for indications that RMI might use the address "127.0.1.1". This problem has also been described by Philipp Reichart (if you can read German). To solve it you might have to set the -Djava.rmi.server.hostname=<hostname or localhost or ip> property. If you're in local simply try with -Djava.rmi.server.hostname=localhost or -Djava.rmi.server.hostname=127.0.0.1. If you are running jconsole on a different host then have a look at the FAQ about JConsole on Linux.
Setting this property -Djava.rmi.server.hostname=IP_SERVER solved this problem.