1. HBase
  2. HBASE-4109

Hostname returned via reverse dns lookup contains trailing period if configured interface is not "default"


    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.90.3
    • Fix Version/s: 0.90.4
    • Component/s: master, regionserver
    • Labels:
    • Hadoop Flags:


      If you are using an interface anything other than 'default' (literally that keyword) DNS.java 's getDefaultHost will return a string which will
      have a trailing period at the end. It seems javadoc of reverseDns in DNS.java (see below) is conflicting with what that function is actually doing.
      It is returning a PTR record while claims it returns a hostname. The PTR record always has period at the end , RFC: http://irbs.net/bog-4.9.5/bog47.html

      We make call to DNS.getDefaultHost at more than one places and treat that as actual hostname.

      Quoting HRegionServer for example

      String machineName = DNS.getDefaultHost(conf.get(
              "hbase.regionserver.dns.interface", "default"), conf.get(
              "hbase.regionserver.dns.nameserver", "default"));

      This causes inconsistencies. An example of such inconsistency was observed while debugging the issue "Regions not getting reassigned if RS is brought down". More here

      We may want to sanitize the string returned from DNS class. Or better we can take a path of overhauling the way we do DNS name matching all over.

        Issue Links


          Robert Dyer made changes -
          Link This issue is related to HBASE-7693 [ HBASE-7693 ]
          Eli Collins made changes -
          Link This issue relates to HADOOP-8156 [ HADOOP-8156 ]
          Harsh J made changes -
          Link This issue relates to HADOOP-8134 [ HADOOP-8134 ]
          Jean-Daniel Cryans made changes -
          Assignee Shrijeet Paliwal [ shrijeet ]
          stack made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Hadoop Flags [Reviewed]
          Resolution Fixed [ 1 ]
          stack made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Shrijeet Paliwal made changes -
          Field Original Value New Value
          Attachment 0001-HBASE-4109-Sanitize-hostname-returned-from-DNS-class.patch [ 12486707 ]
          Shrijeet Paliwal created issue -


            • Assignee:
              Shrijeet Paliwal
              Shrijeet Paliwal
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: