Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 15EB82009F8 for ; Thu, 19 May 2016 22:09:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 14A091609AE; Thu, 19 May 2016 20:09:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5C121160A00 for ; Thu, 19 May 2016 22:09:14 +0200 (CEST) Received: (qmail 33560 invoked by uid 500); 19 May 2016 20:09: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 33465 invoked by uid 99); 19 May 2016 20:09:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 May 2016 20:09:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 10C6C2C1F64 for ; Thu, 19 May 2016 20:09:13 +0000 (UTC) Date: Thu, 19 May 2016 20:09:13 +0000 (UTC) From: "Gary Helmling (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-15856) Cached Connection instances can wind up with addresses never resolved MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 19 May 2016 20:09:15 -0000 [ https://issues.apache.org/jira/browse/HBASE-15856?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Helmling updated HBASE-15856: ---------------------------------- Attachment: HBASE-15856.001.patch The attached patch forces a throw of UnknownHostException if we were unable to resolve the server hostname on rpc channel creation. This should force an early out and retries where appropriate, and will prevent unresolved ISA's from being cached. This also adds a test verifying that bad hostnames throw an exception. > Cached Connection instances can wind up with addresses never resolved > --------------------------------------------------------------------- > > Key: HBASE-15856 > URL: https://issues.apache.org/jira/browse/HBASE-15856 > Project: HBase > Issue Type: Bug > Components: Client > Reporter: Gary Helmling > Assignee: Gary Helmling > Priority: Critical > Fix For: 2.0.0, 1.3.0, 1.2.2 > > Attachments: HBASE-15856.001.patch > > > During periods where DNS is not working properly, we can wind up caching connections to master or regionservers where the initial hostname resolution and the resolution is never re-attempted. This means that clients will forever get UnknownHostException for any calls. > When constructing a BlockingRpcChannelImplementation, we instantiate the InetSocketAddress to use for the connection. This instance is then used in the rpc client connection, where we check isUnresolved() and throw an UnknownHostException if that returns true. However, at this point the rpc channel is already cached in the HConnectionImplementation map of stubs. So at this point it will never be resolved. > Setting the config for hbase.resolve.hostnames.on.failure masks this issue, since the stub key used is modified to contain the address. However, even in that case, if DNS fails, an rpc channel instance with unresolved ISA will still be cached in the stubs under the hostname only key. -- This message was sent by Atlassian JIRA (v6.3.4#6332)