Jconsole plugin to Jmx IPv6 Support URL

I am having problems connecting to the JMX service url with 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 failed.

As for some background,

  • I start jconsole from a windows 7 window and connect to the jmx server on linux.
  • The jmx server is a double stacked Redhat linux box, and I can connect via jconsole using an IPv4 address.
  • Not sure if this is important, there are 2 network interfaces on the host I'm trying to connect to, and one of them is used for management purposes only.
+3
source share
1 answer

, , .

    if ( aHost instanceof Inet4Address ) {
       this.hostAddress = aHost.getHostAddress();
    }
    else if ( aHost instanceof Inet6Address ) {
       this.hostAddress = "[" + aHost.getHostAddress() + "]";
    }
    else {
       throw someException();
    }

.............some other stuff.................

    registry = LocateRegistry.getRegistry( this.hostAddress, ... );

, . , , , .

.properties file

hostName = [fd02: c9e3: a6c0: 4306: 0: 0: 0: 27]

+1

Source: https://habr.com/ru/post/1789295/


All Articles