Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Invalid
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Right now in storage-conf we have:

      <ListenAddress>localhost</ListenAddress>

      We should probably change this to 0.0.0.0 by default for new comers, since setting up multi-node installation with localhost, isn't going to work right. Right now 0.0.0.0 might not work right, (leaving blank does). So we should check that in DatabaseDescriptor. Also a nice to have is maybe an XML doc comment.

        Activity

        Hide
        Hudson added a comment -

        Integrated in Cassandra #126 (See http://hudson.zones.apache.org/hudson/job/Cassandra/126/)
        add more explanation of what blank listenaddress does for

        Show
        Hudson added a comment - Integrated in Cassandra #126 (See http://hudson.zones.apache.org/hudson/job/Cassandra/126/ ) add more explanation of what blank listenaddress does for
        Hide
        Jonathan Ellis added a comment -

        added Eric's explanation to the conf file. I think that's as good as we're going to get here.

        Show
        Jonathan Ellis added a comment - added Eric's explanation to the conf file. I think that's as good as we're going to get here.
        Hide
        Eric Evans added a comment -

        0.0.0.0 is synonymous for "any", the expectation would be that cassandra will respond on "any" of the node's addresses, (that it is bound to all of them). That is definitely not going to work.

        Leaving it blank essentially leaves it up to InetAddress.getLocalHost(). This will always do the Right Thing if the node is properly configured (hostname, name resolution, etc), and the Right Thing is to use the address associated with the hostname (it might not be).

        Show
        Eric Evans added a comment - 0.0.0.0 is synonymous for "any", the expectation would be that cassandra will respond on "any" of the node's addresses, (that it is bound to all of them). That is definitely not going to work. Leaving it blank essentially leaves it up to InetAddress.getLocalHost(). This will always do the Right Thing if the node is properly configured (hostname, name resolution, etc), and the Right Thing is to use the address associated with the hostname (it might not be).
        Hide
        Jonathan Ellis added a comment -

        See CASSANDRA-43 for some historical background.

        Show
        Jonathan Ellis added a comment - See CASSANDRA-43 for some historical background.
        Hide
        Jonathan Ellis added a comment -

        The reason it defaults to localhost is that letting the JDK pick an address (which is what it does when it is left blank) does not always work. We want a default that will always work at least in the single node case.

        Using 0.0.0.0 to mean "pick one" is confusing to someone who understands what is going on. This value is the one that it tells other nodes connect to. Another node cannot connect to 0.0.0.0 so it does not make sense.

        We do need to document the blank=guess option. But again, I emphasize that it's not magic and it DOES pick the wrong one sometimes. This screwed a lot of people over in the early days, it's not just a hypothetical problem.

        Show
        Jonathan Ellis added a comment - The reason it defaults to localhost is that letting the JDK pick an address (which is what it does when it is left blank) does not always work. We want a default that will always work at least in the single node case. Using 0.0.0.0 to mean "pick one" is confusing to someone who understands what is going on. This value is the one that it tells other nodes connect to . Another node cannot connect to 0.0.0.0 so it does not make sense. We do need to document the blank=guess option. But again, I emphasize that it's not magic and it DOES pick the wrong one sometimes. This screwed a lot of people over in the early days, it's not just a hypothetical problem.

          People

          • Assignee:
            Unassigned
            Reporter:
            Chris Goffinet
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development