Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-2023

Network unreachable with localhost addresses if -Djava.net.preferIPv4Stack=true isn't specified

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 3.6.7, 3.6.8
    • None
    • Hide

      Run the Draw demo from target/classes directory with:

      java -cp .:org/jgroups/demos/ org.jgroups.demos.Draw -bind_addr 127.0.0.1
      

      or

      java -cp .:org/jgroups/demos/ -Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true org.jgroups.demos.Draw -bind_addr ::1
      
      Show
      Run the Draw demo from target/classes directory with: java -cp .:org/jgroups/demos/ org.jgroups.demos.Draw -bind_addr 127.0.0.1 or java -cp .:org/jgroups/demos/ -Djava.net.preferIPv4Stack= false -Djava.net.preferIPv6Addresses= true org.jgroups.demos.Draw -bind_addr ::1

    Description

      When setting -bind_addr to localhost (either 127.0.0.1 or ::1) without specifying -Djava.net.preferIPv4Stack=true, JGroups fail to connect. The following errors are logged:

      -------------------------------------------------------------------
      GMS: address=rjanik-24069, cluster=draw, physical address=0:0:0:0:0:0:0:1:37921
      -------------------------------------------------------------------
      Mar 03, 2016 11:41:12 AM org.jgroups.protocols.TP$BaseBundler sendSingleMessage
      SEVERE: JGRP000029: rjanik-24069: failed sending message to cluster (108 bytes): java.io.IOException: Network is unreachable, headers: PING: [type=GET_MBRS_REQ, cluster=draw], TP: [cluster_name=draw]
      ** View=[rjanik-24069|0] (1) [rjanik-24069]
      Mar 03, 2016 11:41:15 AM org.jgroups.protocols.TP$BaseBundler sendSingleMessage
      SEVERE: JGRP000029: rjanik-24069: failed sending message to cluster (56 bytes): java.io.IOException: Network is unreachable, headers: NAKACK2: [MSG, seqno=1], TP: [cluster_name=draw]
      

      I'm not sure if there's some other configuration option that I forgot to add, but the example (in Steps to Reproduce) works with previous versions (3.6.6 for example), so I assume not.

      Attachments

        Activity

          People

            rhn-engineering-bban Bela Ban
            rjanik@redhat.com Richard Janik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: