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

nodetool fails to connect when ipv6 host is specified

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.2.19, 2.0.10, 2.1.0
    • Tool/nodetool
    • None
    • java version "1.7.0_65"
      Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
      Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

    • Low

    Description

      The NodeProbe fmtUrl does not account for ipv6 addresses specified for 'host'.

      nodetool -h with ipv6 host address fails with cryptic error message

      Adding square brackets as in http://www.ietf.org/rfc/rfc3986.txt section 3.2.2 corrects this behavior. Patch attached.

      Before
      aholmberg-rmbp15:cassandra-2.1.0-rc4 adamholmberg$ for h in localhost 127.0.0.1 ::1 0::1; do cmd="bin/nodetool -h $h -p 7100 version"; echo $cmd; eval $cmd; done
      bin/nodetool -h localhost -p 7100 version
      ReleaseVersion: 2.1.0-rc4-SNAPSHOT
      bin/nodetool -h 127.0.0.1 -p 7100 version
      ReleaseVersion: 2.1.0-rc4-SNAPSHOT
      bin/nodetool -h ::1 -p 7100 version
      nodetool: For input string: ":1:7100"
      See 'nodetool help' or 'nodetool help <command>'.
      bin/nodetool -h 0::1 -p 7100 version
      nodetool: For input string: ":1:7100"
      See 'nodetool help' or 'nodetool help <command>’.
      
      After
      aholmberg-rmbp15:cassandra-2.1.0-rc4 adamholmberg$ for h in localhost 127.0.0.1 ::1 0::1; do cmd="bin/nodetool -h $h -p 7100 version"; echo $cmd; eval $cmd; done
      bin/nodetool -h localhost -p 7100 version
      ReleaseVersion: 2.1.0-rc4-SNAPSHOT
      bin/nodetool -h 127.0.0.1 -p 7100 version
      ReleaseVersion: 2.1.0-rc4-SNAPSHOT
      bin/nodetool -h ::1 -p 7100 version
      ReleaseVersion: 2.1.0-rc4-SNAPSHOT
      bin/nodetool -h 0::1 -p 7100 version
      ReleaseVersion: 2.1.0-rc4-SNAPSHOT
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            aholmber Adam Holmberg Assign to me
            aholmber Adam Holmberg
            Adam Holmberg
            Robert Stupp
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment