Uploaded image for project: 'Commons JCS'
  1. Commons JCS
  2. JCS-89

UDP Discovery fails to report correct IP address to peers for back-connect when InetAddress.getLocalHost() fails to return an externally-visible address (i.e. returns a local address)

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • jcs-2.0-beta-1
    • None
    • None

    Description

      On certain environments where reverse-lookup of the machine's IP address isn't available, or other IP configurations restrict the ability of the JVM to determine its own "canonical" local address, it's impossible to determine ahead of time what address should be sent into the UDP multicast in order for lateral peers to establish the back-connection.

      The fix for this is simple: when the packet is received with the discovery message, determine the source host address of the packet that was received and set that to the discovery message's host property (setHost(packet.getAddress().getHostAddress()). This way, it's 100% for certain we'll be back-connecting to the correct instance.

      A patch will be uploaded shortly.

      Attachments

        Activity

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

          People

            tv Thomas Vandahl
            diego.rivera.cr@gmail.com Diego Rivera
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified

                Slack

                  Issue deployment