Hi everybody ,
when I run a script from the command line it works but returns a failure if I run it from crontab.
Basically I wanted to send a file to hdfs,
I thought it was related to the fact that crontab do not know the path to hdfs so I put the full path but it still does not work: here is the piece of code that fails :
/usr/bin/hdfs dfs -put -f $source_directory/$file $hdfs_target_directory
And here is the error message
put: 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: "aocsv155bed0p.foo.acme.net/10.12.11.133";
destination host is: "aocsv155bna1p.foo.acme.net":8020;
My interactive environment and my cron environment are different.
my active tickets will not be available in the cron environment.
I need to save the kerberos ticket in such a way my script can pick it up, using kinit in my script.
How to do that ? thanks in advance