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 77BF3200C30 for ; Tue, 7 Mar 2017 22:18:47 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 766E7160B68; Tue, 7 Mar 2017 21:18:47 +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 96F8A160B65 for ; Tue, 7 Mar 2017 22:18:46 +0100 (CET) Received: (qmail 78048 invoked by uid 500); 7 Mar 2017 21:18:45 -0000 Mailing-List: contact issues-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list issues@ambari.apache.org Received: (qmail 78039 invoked by uid 99); 7 Mar 2017 21:18:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Mar 2017 21:18:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 54CF21A0505 for ; Tue, 7 Mar 2017 21:18:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.453 X-Spam-Level: * X-Spam-Status: No, score=1.453 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652, URIBL_BLOCKED=0.001, WEIRD_PORT=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id GpBHpsj6XQq6 for ; Tue, 7 Mar 2017 21:18:42 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 2CF8B5F1EE for ; Tue, 7 Mar 2017 21:18:42 +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 9BD99E05F0 for ; Tue, 7 Mar 2017 21:18:38 +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 14B8424170 for ; Tue, 7 Mar 2017 21:18:38 +0000 (UTC) Date: Tue, 7 Mar 2017 21:18:38 +0000 (UTC) From: "Robert Levas (JIRA)" To: issues@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-20349) When SPNEGO authentication is enabled for Hadoop in a cluster with NN HA, PXF Process alert fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 07 Mar 2017 21:18:47 -0000 [ https://issues.apache.org/jira/browse/AMBARI-20349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15900180#comment-15900180 ] Robert Levas commented on AMBARI-20349: --------------------------------------- FYI, [~jaoki], [~bhuvnesh2703] > When SPNEGO authentication is enabled for Hadoop in a cluster with NN HA, PXF Process alert fails > ------------------------------------------------------------------------------------------------- > > Key: AMBARI-20349 > URL: https://issues.apache.org/jira/browse/AMBARI-20349 > Project: Ambari > Issue Type: Bug > Components: ambari-server > Affects Versions: 2.2.2 > Reporter: Robert Levas > Assignee: Robert Levas > Labels: PHD, PXF, kerberos > Fix For: 2.5.0 > > > When SPNEGO authentication is enabled for Hadoop in a cluster where NN HA is enabled, PXF Process alert fails with the following errors in the ambari-agent.log file > {noformat} > ERROR 2017-03-07 18:03:58,417 jmx.py:44 - Getting jmx metrics from NN failed. URL: http://c6401.ambari.apache.org:50070/jmx?qry=Hadoop:service=NameNode,name=FSNamesy > stem > Traceback (most recent call last): > File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/jmx.py", line 41, in get_value_from_jmx > data_dict = json.loads(data) > File "/usr/lib/python2.6/site-packages/ambari_simplejson/__init__.py", line 307, in loads > return _default_decoder.decode(s) > File "/usr/lib/python2.6/site-packages/ambari_simplejson/decoder.py", line 335, in decode > obj, end = self.raw_decode(s, idx=_w(s, 0).end()) > File "/usr/lib/python2.6/site-packages/ambari_simplejson/decoder.py", line 353, in raw_decode > raise ValueError("No JSON object could be decoded") > ValueError: No JSON object could be decoded > INFO 2017-03-07 18:04:02,769 logger.py:71 - call['ambari-sudo.sh su hdfs -l -s /bin/bash -c 'curl --negotiate -u : -s '"'"'http://c6402.ambari.apache.org:50070/jmx?qry=Hadoop:service=NameNode,name=FSNamesystem'"'"' 1>/tmp/tmphTXg76 2>/tmp/tmp5bm2nM''] {'quiet': False} > INFO 2017-03-07 18:04:02,797 logger.py:71 - call returned (0, '') > ERROR 2017-03-07 18:04:02,798 jmx.py:44 - Getting jmx metrics from NN failed. URL: http://c6402.ambari.apache.org:50070/jmx?qry=Hadoop:service=NameNode,name=FSNamesystem > Traceback (most recent call last): > File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/jmx.py", line 41, in get_value_from_jmx > data_dict = json.loads(data) > File "/usr/lib/python2.6/site-packages/ambari_simplejson/__init__.py", line 307, in loads > return _default_decoder.decode(s) > File "/usr/lib/python2.6/site-packages/ambari_simplejson/decoder.py", line 335, in decode > obj, end = self.raw_decode(s, idx=_w(s, 0).end()) > File "/usr/lib/python2.6/site-packages/ambari_simplejson/decoder.py", line 353, in raw_decode > raise ValueError("No JSON object could be decoded") > ValueError: No JSON object could be decoded > {noformat} > *Cause* > During the test for the {{PXF Process}} alert, the Active NN is found using a JMX call. This call requires SPNEGO authentication since SPNEGO authentication is turned on for the Hadoop web interfaces. However, a valid Kerberos ticket is not found in the configured user's Kerberos ticket cache. In this case, the configured users is the HDFS user - which technically is not necessary. > This occurs in > {code:title=common-services/PXF/3.0.0/package/alerts/api_status.py:137} > if CLUSTER_ENV_SECURITY in configurations and configurations[CLUSTER_ENV_SECURITY].lower() == "true": > if 'dfs.nameservices' in configurations[HDFS_SITE]: > namenode_address = get_active_namenode(ConfigDictionary(configurations[HDFS_SITE]), configurations[CLUSTER_ENV_SECURITY], configurations[HADOOP_ENV_HDFS_USER])[1] > else: > namenode_address = configurations[HDFS_SITE]['dfs.namenode.http-address'] > token = _get_delegation_token(namenode_address, > configurations[HADOOP_ENV_HDFS_USER], > configurations[HADOOP_ENV_HDFS_USER_KEYTAB], > configurations[HADOOP_ENV_HDFS_PRINCIPAL_NAME], > None) > commonPXFHeaders.update({"X-GP-TOKEN": token}) > {code} > Inside the call at > {code} > namenode_address = get_active_namenode(ConfigDictionary(configurations[HDFS_SITE]), configurations[CLUSTER_ENV_SECURITY], configurations[HADOOP_ENV_HDFS_USER])[1] > {code} > *Solution* > Ensure the configured user's Kerberos ticket cache contains a valid ticket before querying for the active NN. Possibly change the acting user to one executing the PXF component. -- This message was sent by Atlassian JIRA (v6.3.15#6346)