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 F298B200CD6 for ; Mon, 31 Jul 2017 23:27:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id F139F165DCE; Mon, 31 Jul 2017 21:27:08 +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 4272D163594 for ; Mon, 31 Jul 2017 23:27:08 +0200 (CEST) Received: (qmail 98484 invoked by uid 500); 31 Jul 2017 21:27:05 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 98473 invoked by uid 99); 31 Jul 2017 21:27:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Jul 2017 21:27:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id DB13118072C for ; Mon, 31 Jul 2017 21:27:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id nYl7WDK1_5qP for ; Mon, 31 Jul 2017 21:27:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E497C61120 for ; Mon, 31 Jul 2017 21:27:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 04342E0E4E for ; Mon, 31 Jul 2017 21:27:02 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 9838E24DC6 for ; Mon, 31 Jul 2017 21:27:00 +0000 (UTC) Date: Mon, 31 Jul 2017 21:27:00 +0000 (UTC) From: "Mithun Radhakrishnan (JIRA)" To: dev@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HIVE-17218) Canonical-ize hostnames for Hive metastore, and HS2 servers. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 31 Jul 2017 21:27:09 -0000 Mithun Radhakrishnan created HIVE-17218: ------------------------------------------- Summary: Canonical-ize hostnames for Hive metastore, and HS2 servers. Key: HIVE-17218 URL: https://issues.apache.org/jira/browse/HIVE-17218 Project: Hive Issue Type: Bug Components: HiveServer2, Metastore, Security Affects Versions: 2.2.0, 1.2.2, 3.0.0 Reporter: Mithun Radhakrishnan Assignee: Mithun Radhakrishnan Currently, the {{HiveMetastoreClient}} and {{HiveConnection}} do not canonical-ize the hostnames of the metastore/HS2 servers. In deployments where there are multiple such servers behind a VIP, this causes a number of inconveniences: # The client-side configuration (e.g. {{hive.metastore.uris}} in {{hive-site.xml}}) needs to specify the VIP's hostname, and cannot use a simplified CNAME, in the thrift URL. If the {{hive.metastore.kerberos.principal}} is specified using {{_HOST}}, one sees GSS failures as follows: {noformat} hive --hiveconf hive.metastore.kerberos.principal=hive/_HOST@GRID.MYTH.NET --hiveconf hive.metastore.uris="thrift://simplified-hcat-cname.grid.myth.net:56789" ... Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:542) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:677) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621) ... {noformat} This is because {{_HOST}} is filled in with the CNAME, and not the canonicalized name. # Oozie workflows that use HCat {{}} have to always use the VIP hostname, and can't use {{_HOST}}-based service principals, if the CNAME differs from the VIP name. If the client-code simply canonical-ized the hostnames, it would enable the use of both simplified CNAMEs, and _HOST in service principals. -- This message was sent by Atlassian JIRA (v6.4.14#64029)