<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Best practices with Ranger security in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Best-practices-with-Ranger-security/m-p/142556#M48252</link>
    <description>&lt;P&gt;all the activities that I used to perform as hdfs should now be performed as which user since hdfs user is not in KDC by default ? &lt;/P&gt;&lt;P&gt;or do I have to add the hdfs user to KDC and then add it to the HIVE/HDFS plugins?&lt;/P&gt;&lt;P&gt;I tried using the dfsadmin command but its failing .&lt;/P&gt;&lt;PRE&gt;[root@hadoop1 ~]# sudo -u hdfs hdfs balancer -threshold 1
16/12/07 17:30:01 INFO balancer.Balancer: Using a threshold of 1.0
16/12/07 17:30:01 INFO balancer.Balancer: namenodes  = [hdfs://hadoop1.tolls.dot.state.fl.us:8020]
16/12/07 17:30:01 INFO balancer.Balancer: parameters = Balancer.BalancerParameters [BalancingPolicy.Node, threshold = 1.0, max idle iteration = 5, #excluded nodes = 0, #included nodes = 0, #source nodes = 0, #blockpools = 0, run during upgrade = false]
16/12/07 17:30:01 INFO balancer.Balancer: included nodes = []
16/12/07 17:30:01 INFO balancer.Balancer: excluded nodes = []
16/12/07 17:30:01 INFO balancer.Balancer: source nodes = []
Time Stamp               Iteration#  Bytes Already Moved  Bytes Left To Move  Bytes Being Moved
16/12/07 17:30:01 WARN ipc.Client: Exception encountered while connecting to the server :
javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]
&lt;/PRE&gt;</description>
    <pubDate>Thu, 08 Dec 2016 06:30:55 GMT</pubDate>
    <dc:creator>aliyesami</dc:creator>
    <dc:date>2016-12-08T06:30:55Z</dc:date>
    <item>
      <title>Best practices with Ranger security</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Best-practices-with-Ranger-security/m-p/142556#M48252</link>
      <description>&lt;P&gt;all the activities that I used to perform as hdfs should now be performed as which user since hdfs user is not in KDC by default ? &lt;/P&gt;&lt;P&gt;or do I have to add the hdfs user to KDC and then add it to the HIVE/HDFS plugins?&lt;/P&gt;&lt;P&gt;I tried using the dfsadmin command but its failing .&lt;/P&gt;&lt;PRE&gt;[root@hadoop1 ~]# sudo -u hdfs hdfs balancer -threshold 1
16/12/07 17:30:01 INFO balancer.Balancer: Using a threshold of 1.0
16/12/07 17:30:01 INFO balancer.Balancer: namenodes  = [hdfs://hadoop1.tolls.dot.state.fl.us:8020]
16/12/07 17:30:01 INFO balancer.Balancer: parameters = Balancer.BalancerParameters [BalancingPolicy.Node, threshold = 1.0, max idle iteration = 5, #excluded nodes = 0, #included nodes = 0, #source nodes = 0, #blockpools = 0, run during upgrade = false]
16/12/07 17:30:01 INFO balancer.Balancer: included nodes = []
16/12/07 17:30:01 INFO balancer.Balancer: excluded nodes = []
16/12/07 17:30:01 INFO balancer.Balancer: source nodes = []
Time Stamp               Iteration#  Bytes Already Moved  Bytes Left To Move  Bytes Being Moved
16/12/07 17:30:01 WARN ipc.Client: Exception encountered while connecting to the server :
javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]
&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Dec 2016 06:30:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Best-practices-with-Ranger-security/m-p/142556#M48252</guid>
      <dc:creator>aliyesami</dc:creator>
      <dc:date>2016-12-08T06:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Best practices with Ranger security</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Best-practices-with-Ranger-security/m-p/142557#M48253</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10115/sahmad43.html" nodeid="10115"&gt;@Sami Ahmad&lt;/A&gt; you are receiving this error because you do not have a valid TGT for the hdfs user. You need to kinit with the keytab for the hdfs principal. You should be able to see the principal by running&lt;/P&gt;&lt;PRE&gt;klist -kte /etc/security/keytabs/hdfs.headless.keytab&lt;/PRE&gt;&lt;P&gt;This hdfs Kerberos principal was created when you kerberized the cluster. You can get a TGT from the KDC by running &lt;/P&gt;&lt;PRE&gt;kinit -kt /etc/security/keytabs/hdfs.headless.keytab &amp;lt;hdfs-principal&amp;gt;&lt;/PRE&gt;&lt;P&gt;You can run dfsadmin commands with any user that belongs to the dfs.permissions.supergroup group, it would be a better practice to run this using an admin principal that belonged to this group.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2016 06:42:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Best-practices-with-Ranger-security/m-p/142557#M48253</guid>
      <dc:creator>slachterman</dc:creator>
      <dc:date>2016-12-08T06:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Best practices with Ranger security</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Best-practices-with-Ranger-security/m-p/142558#M48254</link>
      <description>&lt;P&gt;Hi Sami,&lt;/P&gt;&lt;P&gt;Since the above command requires superuser privilege I would do it like this.&lt;/P&gt;&lt;P&gt;To your example,  &lt;/P&gt;&lt;PRE&gt;[root@chupa1 ~]# sudo su - hdfs

hdfs@chupa1 ~]$ klist -kt /etc/security/keytabs/hdfs.headless.keytab 
Keytab name: FILE:/etc/security/keytabs/hdfs.headless.keytab
KVNO Timestamp         Principal
---- ----------------- --------------------------------------------------------
   3 12/05/16 17:05:04 hdfs-chupa@CHUPA.COM
   3 12/05/16 17:05:04 hdfs-chupa@CHUPA.COM
   3 12/05/16 17:05:04 hdfs-chupa@CHUPA.COM
   3 12/05/16 17:05:04 hdfs-chupa@CHUPA.COM
   3 12/05/16 17:05:04 hdfs-chupa@CHUPA.COM

[hdfs@chupa1 ~]$ kinit -kt /etc/security/keytabs/hdfs.headless.keytab hdfs-chupa@CHUPA.COM

[hdfs@chupa1 ~]$ klist
Ticket cache: FILE:/tmp/krb5cc_503
Default principal: hdfs-chupa@CHUPA.COM

Valid starting     Expires            Service principal
12/07/16 22:47:23  12/08/16 22:47:23  krbtgt/CHUPA.COM@CHUPA.COM
	renew until 12/07/16 22:47:23


hdfs@chupa1 ~]$ hdfs balancer -threshold 1
16/12/07 22:47:47 INFO balancer.Balancer: Using a threshold of 1.0
16/12/07 22:47:47 INFO balancer.Balancer: namenodes  = [hdfs://chupa1.openstacklocal:8020]
16/12/07 22:47:47 INFO balancer.Balancer: parameters = Balancer.BalancerParameters [BalancingPolicy.Node, threshold = 1.0, max idle iteration = 5, #excluded nodes = 0, #included nodes = 0, #source nodes = 0, #blockpools = 0, run during upgrade = false]
16/12/07 22:47:47 INFO balancer.Balancer: included nodes = []
16/12/07 22:47:47 INFO balancer.Balancer: excluded nodes = []
16/12/07 22:47:47 INFO balancer.Balancer: source nodes = []
Time Stamp               Iteration#  Bytes Already Moved  Bytes Left To Move  Bytes Being Moved
16/12/07 22:47:49 INFO balancer.KeyManager: Block token params received from NN: update interval=10hrs, 0sec, token lifetime=10hrs, 0sec
16/12/07 22:47:49 INFO block.BlockTokenSecretManager: Setting block keys
16/12/07 22:47:49 INFO balancer.KeyManager: Update block keys every 2hrs, 30mins, 0sec
16/12/07 22:47:50 INFO balancer.Balancer: dfs.balancer.movedWinWidth = 5400000 (default=5400000)
16/12/07 22:47:50 INFO balancer.Balancer: dfs.balancer.moverThreads = 1000 (default=1000)
16/12/07 22:47:50 INFO balancer.Balancer: dfs.balancer.dispatcherThreads = 200 (default=200)
16/12/07 22:47:50 INFO balancer.Balancer: dfs.datanode.balance.max.concurrent.moves = 5 (default=5)
16/12/07 22:47:50 INFO balancer.Balancer: dfs.balancer.getBlocks.size = 2147483648 (default=2147483648)
16/12/07 22:47:50 INFO balancer.Balancer: dfs.balancer.getBlocks.min-block-size = 10485760 (default=10485760)
16/12/07 22:47:50 INFO block.BlockTokenSecretManager: Setting block keys
16/12/07 22:47:50 INFO balancer.Balancer: dfs.balancer.max-size-to-move = 10737418240 (default=10737418240)
16/12/07 22:47:50 INFO balancer.Balancer: dfs.blocksize = 134217728 (default=134217728)
16/12/07 22:47:50 INFO net.NetworkTopology: Adding a new node: /default-rack/172.26.76.168:1019
16/12/07 22:47:50 INFO net.NetworkTopology: Adding a new node: /default-rack/172.26.76.166:1019
16/12/07 22:47:50 INFO net.NetworkTopology: Adding a new node: /default-rack/172.26.76.167:1019
16/12/07 22:47:50 INFO balancer.Balancer: 0 over-utilized: []
16/12/07 22:47:50 INFO balancer.Balancer: 0 underutilized: []
The cluster is balanced. Exiting...
Dec 7, 2016 10:47:50 PM           0                  0 B                 0 B                0 B
Dec 7, 2016 10:47:50 PM  Balancing took 3.202 seconds


&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Dec 2016 07:25:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Best-practices-with-Ranger-security/m-p/142558#M48254</guid>
      <dc:creator>dvillarreal</dc:creator>
      <dc:date>2016-12-08T07:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Best practices with Ranger security</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Best-practices-with-Ranger-security/m-p/142559#M48255</link>
      <description>&lt;P&gt;yes that did the trick , but its a different command than I was using ,so how does this command works?   &lt;/P&gt;&lt;P&gt;so far I am using "kinit &amp;lt;username&amp;gt;" to get tickets and when I do this it asks for a password but your command did not ask for a password , why ?  &lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2016 10:56:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Best-practices-with-Ranger-security/m-p/142559#M48255</guid>
      <dc:creator>aliyesami</dc:creator>
      <dc:date>2016-12-08T10:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Best practices with Ranger security</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Best-practices-with-Ranger-security/m-p/142560#M48256</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10115/sahmad43.html" nodeid="10115"&gt;@Sami Ahmad&lt;/A&gt; because this version of the command uses the keytab. With Keberos, access to the keytab file is equivalent to knowledge of the password. Please see &lt;A href="https://web.mit.edu/kerberos/krb5-1.12/doc/basic/keytab_def.html"&gt;https://web.mit.edu/kerberos/krb5-1.12/doc/basic/keytab_def.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please accept this answer if it was helpful in resolving your issue.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2016 02:27:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Best-practices-with-Ranger-security/m-p/142560#M48256</guid>
      <dc:creator>slachterman</dc:creator>
      <dc:date>2016-12-09T02:27:15Z</dc:date>
    </item>
  </channel>
</rss>

