Re: [jgroups-users] problem with v4.0.16 and IPv6

Questions/problems related to using JGroups <[email protected]> Thu, 2 May 2019 16:02:00 +0200
Newsgroups gmane.comp.java.javagroups.general
Message-ID <mailman.13539.1556805757.1476.javagroups-users@lists.sourceforge.net>

On 29.04.19 19:04, Questions/problems related to using JGroups wrote:
> 
> On Thu, Apr 25, 2019 at 3:28 AM Questions/problems related to using 
> JGroups <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>     The default in JGroups is IPv4, so you have to force use of IPv6. The
>     program below shows you how to do this.
> 
>     Start it with system property -Djava.net.preferIPv6Addresses=true and
>     this will work.
> 
> 
> Thanks. With that property it's working for me. Since users of our 
> product can set the bind address and many other things (and will forget 
> this detail), will have to put a little code into our "launcher" process 
> to add that property at actual app startup if it sees an ipv6 address is 
> being used. Something like:
> 
> if (InetAddress.getByName("<bind address>") instanceof Inet6Address) { etc }
> 
> Am nervous that some case may fail the above check though. Can you tell 
> me what happened between jgroups 4.0.15 and 4.0.16 that made our app not 
> work with ipv6 addresses without that JVM property? When I run the above 
> without it the check works as I'd expect.

I changed the way the stack uses addresses, see [1] for details. I never 
liked that fact that the JVM by default selects IPv6 addresses, so 
unless a property is set, JGroups prefers IPv4 addresses.

Hmm, this doesn't cover the case when you have an IPv4 stack, but do use 
at least 1 *IPv6* address. In this case, JGroups should pick IPv6 
addresses only.

I created [2] as a result. This will go into 4.1.1.
Cheers,

[1] https://issues.jboss.org/browse/JGRP-2305
[2] https://issues.jboss.org/browse/JGRP-2343

> Thanks,
> Bobby
> 
> 
> 
> _______________________________________________
> javagroups-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/javagroups-users
> 

-- 
Bela Ban | http://www.jgroups.org