Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-12781

thrift2 listen port will bind always to the passed command line address

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.98.3
    • 1.0.0, 0.98.10, 1.1.0
    • Thrift
    • None
    • Reviewed

    Description

      In Thrift server, listen port will bind always to the address which is passed through command line argument.

      InetSocketAddress inetSocketAddress = bindToPort(cmd.getOptionValue("bind"), listenPort);
      
      private static InetSocketAddress bindToPort(String bindValue, int listenPort)
            throws UnknownHostException {
          try {
            if (bindValue == null) {
              return new InetSocketAddress(listenPort);
            } else {
              return new InetSocketAddress(InetAddress.getByName(bindValue), listenPort);
            }
          } catch (UnknownHostException e) {
            throw new RuntimeException("Could not bind to provided ip address", e);
          }
        }
      

      In case when bind address is not passed through argument then it is binding with any local address. It should read hbase.thrift.info.bindAddress value from configuration first.

      Attachments

        1. 12781-V1.patch
          2 kB
          Pankaj Kumar

        Activity

          People

            pankaj2461 Pankaj Kumar
            pankaj2461 Pankaj Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: