Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop, mail # user - Keep Kerberos credentials valid after logging out


Copy link to this message
-
Re: Keep Kerberos credentials valid after logging out
Rahul Bhattacharjee 2013-05-21, 13:34
I think you can have a keytab file for the user and use that for
authentication. It would renew the credentials when it expires.

On Tue, May 21, 2013 at 4:01 PM, zheyi rong <[EMAIL PROTECTED]> wrote:

> Hi all,
>
> I would like to run my hadoop job in a bash file for several times, e.g.
> #!/usr/bin/env bash
> for i in {1..10}
>     do
>         my-hadoop-job
>     done
>
> Since I don't want to keep my laptop on for hours, I run this bash script
> on a server
> via a SSH session.
>
> However, the bash script always terminated after my logging out of that
> server by
> 'ctrl-z, bg, disown, exit'.
>
> Using GNU 'screen' detaching and reattaching, I can see the following
> exceptions:
>
> Caused by: 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)]
>         at org.apache.hadoop.ipc.Client$Connection$1.run(Client.java:554)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.Subject.doAs(Subject.java:396)
>         at
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1278)
>         at
> org.apache.hadoop.ipc.Client$Connection.handleSaslConnectionFailure(Client.java:499)
>         at
> org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:601)
>         at
> org.apache.hadoop.ipc.Client$Connection.access$2300(Client.java:212)
>         at org.apache.hadoop.ipc.Client.getConnection(Client.java:1292)
>         at org.apache.hadoop.ipc.Client.call(Client.java:1121)
>         ... 30 more
> Caused by: javax.security.sasl.SaslException: GSS initiate failed [Caused
> by GSSException: No valid credentials provided (Mechanism level: Failed to
> find any Kerberos tgt)]
>         at
> com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:194)
>         at
> org.apache.hadoop.security.SaslRpcClient.saslConnect(SaslRpcClient.java:134)
>         at
> org.apache.hadoop.ipc.Client$Connection.setupSaslConnection(Client.java:415)
>         at
> org.apache.hadoop.ipc.Client$Connection.access$1100(Client.java:212)
>         at org.apache.hadoop.ipc.Client$Connection$2.run(Client.java:594)
>         at org.apache.hadoop.ipc.Client$Connection$2.run(Client.java:591)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.Subject.doAs(Subject.java:396)
>         at
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1278)
>         at
> org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:590)
>         ... 33 more
> Caused by: GSSException: No valid credentials provided (Mechanism level:
> Failed to find any Kerberos tgt)
>         at
> sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:130)
>         at
> sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:106)
>         at
> sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:172)
>         at
> sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:209)
>         at
> sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:195)
>         at
> sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:162)
>         at
> com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:175)
>         ... 42 more
>
> The cluster is deployed with cdh3.
>
> so how can I keep my script running after logging out ?
>
> Thank you in advance.
>
> Regards,
> Zheyi Rong
>