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

Comma at the end of the end of the seed list is interpretated as localhost

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Fix Version/s: 4.0
    • Component/s: Local/Config
    • Labels:
      None
    • Severity:
      Low

      Description

      Seeds: '10.1.20.10,10.1.21.10,10.1.22.10,'  cause a flood of the debug log with messages like this one.

      DEBUG [MessagingService-Outgoing-localhost/127.0.0.1-Gossip] 2018-02-28 15:53:57,314 OutboundTcpConnection.java:545 - Unable to connect to localhost/127.0.0.1

      This code provide by Nicolas Guyomar provide the reason of the issue.

      In SImpleSeedProvider : 
       
      String[] hosts = "10.1.20.10,10.1.21.10,10.1.22.10,".split(",", -1);
      List<InetAddress> seeds = new ArrayList<InetAddress>(hosts.length);
      for (String host : hosts)

      { System.out.println(InetAddress.getByName(host.trim())); }

       
      output : 
      /10.1.20.10
      /10.1.21.10
      /10.1.22.10
      localhost/127.0.0.1

        Attachments

          Activity

            People

            • Assignee:
              nicolas.guyomar Nicolas Guyomar
              Reporter:
              usernkey Marco
              Authors:
              Nicolas Guyomar
              Reviewers:
              Jordan West
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: