I have trouble connecting to a JMX Service URL having an IPv6 address through jconsole. I tried
service:jmx:rmi:///jndi/rmi://[fd02:c9e3:a6c0:4306:0:0:0:27]:5500/jmx
and I get
Connection did not succeed to ..
As for some background,
- I am running the jconsole from my Windows 7 box and connect to the jmx server on linux.
- the jmx server is a dual stacked Redhat linux box and I am able to connect through the jconsole using the IPv4 address.
- Not sure if this is relevant, the host I am trying to connect to has 2 network interfaces and one of them is used for management purposes only.
OK, I added the below condition to wrap the server host address in square brackets.
In fact, the host address is specified as a name value pair in a properties file. Hence I could have done like below but it didn't work for other reasons.
.properties file
hostName = [fd02:c9e3:a6c0:4306:0:0:0:27]