12 Replies Latest reply on Jan 12, 2012 7:23 AM by sannegrinovero

    Support for IPv6 in jgroups

    gaprashanth

      We are facing issues while using Infinispan cluster with IPv6 configurations. It worked when we changed the system property Djava.net.preferIPv4Stack=true  to use IPv4.

       

      So whats the actual issue of Jgroups with IPv6?

        • 1. Re: Support for IPv6 in jgroups
          belaban

          JGroups has supported IPv6 for quite some time, so you'll need to provide more information in order or me to give you a useful anwer, e.g. which version of JGroups do you use, what are the issues you're seeing ?

           

          I suggest try to configure and run a JGroups-only cluster on IPv6, before you try out an IPv6 Infinispan cluster.

           

          For IPv6 questions regarding JGroups, use one of the JGroups mailing lists.

          Cheers,

          1 of 1 people found this helpful
          • 2. Re: Support for IPv6 in jgroups
            gaprashanth

            The issue is cluster communication is not possible while we use IPv6 is enabled on the nodes. So in some of the discussions on this forum, it is suggested to disable the IPv6 by setting Djava.net.preferIPv4Stack=true which actually works fine.

             

            For avoiding the above workaround, should we prefix double colons to the mcast_address for the Jgroups configuration.

             

            For e.g, if the mcast_address=228.8.8.8  , should we fake the mcast as  ::228.8.8.8  so that it is converted as IPv6 ?

             

            Since Infinispan internally make use of JGroups for remote communications, I posted this issue here. Let me post this in the Jgroups forums also.

             

            The version of Jgroups shows as jgroups-2.12.0.CR5

            • 3. Re: Support for IPv6 in jgroups
              belaban

              You can leave out all IP addresses in the config and simply start a node, e.g.

               

              java -Djava.net.preferIPv6Addresses=true org.jgroups.demos.Draw -props ./udp.xml

               

              You can even leave the preferIPv6Addresses system property out, because this is the default anyway, if you've got IPv6 enabled on your host. JGroups picks IPv6 default addresses if an IPv6 stack is used, and IPv4 default addresses if an IPv4 stack is used.

               

              Or you can list IPv6 addresses, e.g. for bind_addr or mcast_addr.

               

              There were some changes some time ago, which even allowed for IPv4 addresses in the config, in conjunction with an IPv6 stak: JGroups would then automatically convert the IPv4 addresses to IPv6-mapped addresses.

               

              I suggest test this with 2.12.x.

              Cheers,

              • 4. Re: Support for IPv6 in jgroups
                gaprashanth

                If you leave out the all the IP addresses in the config, then JGroups replaces with default IPv4 values which will fail on a Ipv6 enabled host.

                 

                Yes, as you have mentioned setting java -Djava.net.preferIPv6Addresses=true  is not useful if the host is already enabled for IPv6.

                 

                Probably listing IPv6 addresses in the configuration looks like an option. 

                 

                • 5. Re: Support for IPv6 in jgroups
                  belaban

                  Prashanth ga wrote:

                   

                  If you leave out the all the IP addresses in the config, then JGroups replaces with default IPv4 values which will fail on a Ipv6 enabled host

                   

                  No, that's not correct: if you run an IPv6 stack, then JGroups will use *IPv6* addresses as defaults, *not* IPv4 addresses !

                  • 6. Re: Support for IPv6 in jgroups
                    gaprashanth

                    ok, but I guess we have tried leaving out the Ip addresses but it didn't work. But this was done without setting java -Djava.net.preferIPv6Addresses=true. ( but I assume this is not required on a IPv6 enabled host).  Anyways, we can give a try.

                    • 7. Re: Support for IPv6 in jgroups
                      gaprashanth

                      We did the following tests:

                       

                      A) Skipped all IP addresses in the config file, set set -Djava.net.preferIPv6Addresses=true. This doesnt work.

                       

                      B) Skipped all IP addresses in the config file, set set -Djava.net.preferIPv6Addresses=true and also manually set the mcast_address by supplying an IPv4 address 228.6.7.8. But it fails to convert from IPv4 to IPv6.

                       

                      C) only setting -Djava.net.preferIPv4Addresses=true works.

                       

                      So we are not possible to get the conversion done from IPv4 address to IPv6.  Is there any reason.

                      • 8. Re: Support for IPv6 in jgroups
                        belaban

                        A and B should work, this has been tested. Try with the latest 2.12.x version.

                         

                        "It doesn't work" isn't what's needed to fix this; I need more information such as version, trace logs (org.jgroups at TRACE) for all hosts. I suggest the following:

                        • Try with JGroups only, e.g. the Draw demo
                        • Run 2 processes on the same host, then on different hosts
                        • Collect and send me the logs at TRACE level (only startup)
                        • Also send the XML configuration used
                        • Check if firewall rules are discarding messages (iptables -L)
                        1 of 1 people found this helpful
                        • 9. Re: Support for IPv6 in jgroups
                          gaprashanth

                          Ok I would like to make one correction. The actual version used was earlier to 2.12x version which comes as part of Infinispan 4.x downloads.   I guess the jgroups 2.12x is packaged only after Inifnispan 5.0 onwards.

                          So probabaly we can expect this issue to get resolved once we start using the Inifnispan 5.x.   Will update the results on the same forum soon.

                          • 10. Re: Support for IPv6 in jgroups
                            gaprashanth

                            Ok I would like to make one correction. The actual version used was earlier to 2.12x version which comes as part of Infinispan 4.x downloads.   I guess the jgroups 2.12x is packaged only after Inifnispan 5.0 onwards.

                            So probabaly we can expect this issue to get resolved once we start using the Inifnispan 5.x.   Will update the results on the same forum soon.

                            • 11. Re: Support for IPv6 in jgroups
                              gaprashanth

                              Ok I would like to make one correction. The actual version used was earlier to 2.12x version which comes as part of Infinispan 4.x downloads.   I guess the jgroups 2.12x is packaged only after Inifnispan 5.0 onwards.

                              So probabaly we can expect this issue to get resolved once we start using the Inifnispan 5.x.   Will update the results on the same forum soon.

                              • 12. Re: Support for IPv6 in jgroups
                                sannegrinovero

                                Hi,

                                yes to use the latest JGroups version you should use the latest Infinispan; it's also a good idea to use 2.12.x or later to get most bugfixes and improvements, but IPv6 should work since longer, including the versions used by Infinispan 4.x

                                 

                                Also make sure you test IPv6 configuration first; I've seen several older Linux distributions failing to configure the interface and routing correctly for IPv6, if at all. Things are better in these days, just consider that JGroups doesn't need to do anything different between the two IP versions so it's possible the issue is to be identified outside of the Java code.