You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We develop a plugin for an IDE that was recently updated to use JRE 17 (17.0.5). After that, the multi-cast DNS service we used to discover devices in the local network (thanks to the JMDSN library) stopped working. The only output we receive from the library is a socket exception with message Invalid argument: no further information when the JmDNS.create() method is called.
Yesterday, we were able to figure out a possible cause of this issue. By default and due to some limitations in our intranet, we have IPv6 protocol disabled in our local network interfaces. We have tried enabling it and... voila, the exception was gone and the service started working again.
Haven't made a deep debug yet, but the library seems to fail when trying to open the multicast socket.
Do you have any idea about what could be happening or do you have any workaround that does not imply enabling the IPv6 protocol?
Thanks.
PS: In JRE 11 and 15 it works fine.
The text was updated successfully, but these errors were encountered:
I investigated it a bit more... Java's NET library has changed in version 17 and it seems that by default the local IP address used for net operations corresponds to IPv6 protocol instead of IPv4. The exception is thrown when creating the multicast socket of the jmdns service if your network interface has IPv6 protocol disabled.
Possible workarounds:
Enable IPv6 protocol in the network interface =)
Force the use of IPv4 protocol in your application by setting the java.net.preferIPv4Stack system property to true before making use of the Java NET library. This can be easily done with System.setProperty("java.net.preferIPv4Stack", "true")
Force the use of IPv4 protocol by executing the application with the VM argument java.net.preferIPv4Stack configured as true. To do so add -Djava.net.preferIPv4Stack=true to your vm launch parameters.
Hello,
We develop a plugin for an IDE that was recently updated to use JRE 17 (17.0.5). After that, the multi-cast DNS service we used to discover devices in the local network (thanks to the JMDSN library) stopped working. The only output we receive from the library is a socket exception with message
Invalid argument: no further information
when theJmDNS.create()
method is called.Yesterday, we were able to figure out a possible cause of this issue. By default and due to some limitations in our intranet, we have IPv6 protocol disabled in our local network interfaces. We have tried enabling it and... voila, the exception was gone and the service started working again.
Haven't made a deep debug yet, but the library seems to fail when trying to open the multicast socket.
Do you have any idea about what could be happening or do you have any workaround that does not imply enabling the IPv6 protocol?
Thanks.
PS: In JRE 11 and 15 it works fine.
The text was updated successfully, but these errors were encountered: