Closed brianoliver closed 8 years ago
According to the transports available for remote debugging (http://docs.oracle.com/javase/8/docs/technotes/guides/jpda/conninv.html#Transports), only IPv4 is supported.
Hence we need to ensure that only an IPv4 InetAddress is chosen for RemoteDebugging.TransportAddresses
Occasionally we've seen the following error message when attempting to launch a JavaApplication with RemoteDebugging enabled (or automatically detected).
When this occurs, the Java Options look something like:
Even though IPv4 is chosen:
It appears that the InetAddress chosen from the AvailablePortIterator in the RemoteDebugging.TransportAddress constructor:
picks the first InetAddress, which may be an IPv6 address. Instead we need to carefully filter the addresses to ensure that we're choosing an appropriate type, like we do when launching the server-sockets.