At work we have two PCs with Windows XP and JDK 1.6.0_07 (no update of Java is possible for now), both with two network interfaces (NICs), the first has IPs in the form of 190.1.XXX.XXX (lets call it IA), and the second has 190.2.XXX.XXX (IB). "ipconfig /all" brings the host name HOSTNAME for both NICs, so do "nbtstat /a IA" and "nbtstat /a IB". No ping exists from IB to IA (I imagine, there isn't from IA to IB, although didn't check it). We should ensure that our real application works with JMX on both NICs for the sake of robustness. And here the problems start. The same behaviour may be observed with the following:
java -Dcom.sun.management.jmxremote.port=9000 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -jar <JDK_HOME>/demo/jfc/Java2D/Java2Demo.jar
On the second PC bring JConsole and attach to the remote process with one of: IA:9000 or IB:9000 or HOSTNAME:9000. They all work. But if I disable IA on the first PC (where Java2Demo is running), no attachment is possible at all (neither by IB, nor by HOSTNAME). Ping by IB works, so do mstsc (so there is a connection by IB). But if I disable IB, I get the attachment both by IA and by HOSTNAME.
- I just don't get how it is possible, that JConsole won't attach on IB in such a case. AFAIK, JMX uses 0.0.0.0 and listens on both NICs, if we don't define java.rmi.server.hostname. If this has something to do with the network itself, please give advice what to ask the IT department for.
- Our real application has a workaround: on first PC it starts 2 separate processes, each having JMX on one NIC only, and third process that merges data from the client with third JMX. The three processes are started from .bat file separately. I really would like to change this, having one process with one JMX on both NICs; or at least, start one process with two JMX, one for each NIC, if this is possible. Is it?
Thank you very much.