Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-628

java.net.SocketException: Invalid argument / java.net.NoRouteToHostException: Network is unreachable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 0.7.0 rc 1
    • Component/s: None
    • Labels:
      None
    • Environment:

      Linux, FreeBSD, (possibly others)

    • Severity:
      Normal

      Description

      This manifests as either a SocketException that occurs when starting a cassandra node, or a NoRouteToHostException which occurs when connecting with a client.

      On Linux systems this is caused by IPV6_V6ONLY being set true. The docs (ipv6(7)) say that when set this causes sockets to be created IPv6 only, while the previous behavior also allowed sending and receiving packets using an IPv4-mapped IPv6 address.

      The quick fix is to either launch applications using the -Djava.net.preferIPv4Stack=true property, or on Linux systems set net.ipv6.bindv6only=0 (see sysctl(8)).

      My limited understanding is that the previous behavior (IPV6_V6ONLY=0) was always considered a hack to be used until IPv6 was more mature/had gained traction and that a change in defaults was always inevitable, so in the long-term a Real Fix will be needed.

      http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6342561
      http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560056

        Attachments

          Activity

            People

            • Assignee:
              urandom Eric Evans
              Reporter:
              urandom Eric Evans
              Authors:
              Eric Evans
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: