Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 169C5100B7 for ; Tue, 30 Dec 2014 16:34:14 +0000 (UTC) Received: (qmail 60942 invoked by uid 500); 30 Dec 2014 16:34:13 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 60908 invoked by uid 500); 30 Dec 2014 16:34:13 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 60810 invoked by uid 99); 30 Dec 2014 16:34:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Dec 2014 16:34:13 +0000 Date: Tue, 30 Dec 2014 16:34:13 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-12781) thrift2 listen port will bind always to the passed command line address MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-12781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-12781: --------------------------- Fix Version/s: 1.1.0 0.98.10 2.0.0 Hadoop Flags: Reviewed > thrift2 listen port will bind always to the passed command line address > ----------------------------------------------------------------------- > > Key: HBASE-12781 > URL: https://issues.apache.org/jira/browse/HBASE-12781 > Project: HBase > Issue Type: Bug > Components: Thrift > Affects Versions: 0.98.3 > Reporter: Pankaj Kumar > Assignee: Pankaj Kumar > Fix For: 2.0.0, 0.98.10, 1.1.0 > > Attachments: 12781-V1.patch > > > 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. -- This message was sent by Atlassian JIRA (v6.3.4#6332)