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 5B21E200B67 for ; Tue, 2 Aug 2016 00:40:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5978A160AA7; Mon, 1 Aug 2016 22:40:16 +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 A4D1E160A6C for ; Tue, 2 Aug 2016 00:40:15 +0200 (CEST) Received: (qmail 92888 invoked by uid 500); 1 Aug 2016 22:40:14 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Delivered-To: moderator for user@hbase.apache.org Received: (qmail 9144 invoked by uid 99); 1 Aug 2016 18:34:58 -0000 X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.313 X-Spam-Level: ** X-Spam-Status: No, score=2.313 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_NONE=-0.0001, URI_HEX=1.313] autolearn=disabled Date: Mon, 1 Aug 2016 11:34:24 -0700 (MST) From: maychau To: user@hbase.apache.org Message-ID: <1470076464904-4081486.post@n3.nabble.com> Subject: HBase replication on secured clusters MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Mon, 01 Aug 2016 22:40:16 -0000 Hello everyone, I'm trying to write a Scala application to test HBase replication on secured (Kerberized) clusters. I'm using Cloudera CDH5.5.2 version. My keytab is hbase user. The program did pickup the keytab and is able to log in with it based on INFO message, however I'm getting error "KeeperErrorCode = NoAuth for /hbase/replication/peers". Does anyone know why it is not able to access that znode using hbase keytab even though I believe it should be able to as that work through hbase zkcli shell client. def main(args: Array[String]) { val conf = HBaseConfiguration.create() val keytab = "path_to_hbase.keytab" val principle = "" System.setProperty("java.security.auth.login.config", "path_to_jaas.conf_file"); UserGroupInformation.setConfiguration(conf) UserGroupInformation.loginUserFromKeytab(principle, keytab) val connection = ConnectionFactory.createConnection(conf) //FAILED HERE WHEN TRYING TO CONNECT TO ZK TO GET CHILDREN NODE val replAdmin = new ReplicationAdmin(conf) } [main] INFO org.apache.hadoop.security.UserGroupInformation - Login successful for user using keytab file [main-EventThread] INFO org.apache.zookeeper.ClientCnxn - EventThread shut down Exception in thread "main" java.io.IOException: Error initializing the replication admin client. at org.apache.hadoop.hbase.client.replication.ReplicationAdmin.(ReplicationAdmin.java:151) at com.thomsonreuters.bigdata.HbaseTest$.main(HbaseTest.scala:201) at com.thomsonreuters.bigdata.HbaseTest.main(HbaseTest.scala) Caused by: org.apache.hadoop.hbase.replication.ReplicationException: Error getting the list of peer clusters. at org.apache.hadoop.hbase.replication.ReplicationPeersZKImpl.addExistingPeers(ReplicationPeersZKImpl.java:361) at org.apache.hadoop.hbase.replication.ReplicationPeersZKImpl.init(ReplicationPeersZKImpl.java:104) at org.apache.hadoop.hbase.client.replication.ReplicationAdmin.(ReplicationAdmin.java:132) ... 2 more Caused by: org.apache.zookeeper.KeeperException$NoAuthException: KeeperErrorCode = NoAuth for /hbase/replication/peers at org.apache.zookeeper.KeeperException.create(KeeperException.java:113) at org.apache.zookeeper.KeeperException.create(KeeperException.java:51) at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1472) at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.getChildren(RecoverableZooKeeper.java:296) at org.apache.hadoop.hbase.zookeeper.ZKUtil.listChildrenNoWatch(ZKUtil.java:575) at org.apache.hadoop.hbase.replication.ReplicationPeersZKImpl.addExistingPeers(ReplicationPeersZKImpl.java:359) ... 4 more Thank you -- View this message in context: http://apache-hbase.679495.n3.nabble.com/HBase-replication-on-secured-clusters-tp4081486.html Sent from the HBase User mailing list archive at Nabble.com.