Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 02-23-2016 03:42 AM
Here's what I did in my secure cluster:
1. Invokding webhdfs command: "curl -s -i --negotiate -u:anyUser http://sandbox.hortonworks.com:50070/webhdfs/v1/?op=LISTSTATUS" (this works)
2. Invoking hdfs command: "hadoop fs -ls /"
But get the following error. (I need to kdestroy and kinti again to renew the ticket to make it work). This is weird, how can I make the webhdfs command not affect the hdfs command ?
16/02/23 03:38:41 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)] ls: Failed on local exception: java.io.IOException: javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]; Host Details : local host is: "sandbox.hortonworks.com/10.0.2.15"; destination host is: "sandbox.hortonworks.com":8020;
The only difference after step 1 in klist is that I have 2 extra HTTP principal, but I still have my principal [email protected]
Default principal: [email protected] Valid starting Expires Service principal 02/23/16 03:20:05 02/24/16 03:20:05 krbtgt/[email protected] renew until 02/23/16 03:20:05 02/23/16 03:20:10 02/24/16 03:20:05 HTTP/sandbox.hortonworks.com@ renew until 02/23/16 03:20:05 02/23/16 03:20:10 02/24/16 03:20:05 HTTP/[email protected] renew until 02/23/16 03:20:05
Created 03-03-2016 02:44 PM
The instruction on https://steveloughran.gitbooks.io/kerberos_and_hadoop/content/sections/terrors.html can fix this issue
Fix: add a domain_realm in /etc/krb5.conf mapping hostnames to realms
[domain_realm]
sandbox.hortonworks.com = EXAMPLE.COM
Created 02-23-2016 06:06 AM
This is related to not having correct ticket from KDC. You can test by getting a ticket from hdfs keytab. kinit with hdfs headless and see if hdfs -ls works or not
Created 02-23-2016 06:08 AM
Yeah, I see this should due to ticket issue. But I don't understand why the webhdfs command corrupt my ticket. If I only invoke step 2, everything is OK.
Created 02-23-2016 06:20 AM
@jzhang You will be running curl from the client node and hdfs from edge or master node.
Created 02-23-2016 06:29 AM
No, I am running this in the same node. Actually I did it in sandbox. Only one node.
Created 02-23-2016 09:47 AM
@jzhang That's exactly my point that REST access will from the client so you should not worry about the kerberos ticket issue
Created 02-24-2016 09:54 AM
No, actually step 1 is spnego which require ticket, https://hadoop.apache.org/docs/stable/hadoop-auth/Examples.html
What I don't understand is that before step 1, I can invoke hdfs command, but after step 1, I can not run step 1, seems my ticket is corrupted.
Created 03-03-2016 11:44 AM
Well, this is "interesting".
I think it's that specific realmless principal, "HTTP/sandbox.hortonworks.com@"; you don't have a TGT ticket for that empty realm, so fail. I've heard of this before
https://steveloughran.gitbooks.io/kerberos_and_hadoop/content/sections/terrors.html
Follow the instructions there; if it makes it go away, then it's a sign that the krb5 in the sandbox needs fixing
Created 03-03-2016 01:27 PM
Created 03-03-2016 02:44 PM
The instruction on https://steveloughran.gitbooks.io/kerberos_and_hadoop/content/sections/terrors.html can fix this issue
Fix: add a domain_realm in /etc/krb5.conf mapping hostnames to realms
[domain_realm]
sandbox.hortonworks.com = EXAMPLE.COM