티스토리 뷰

Linux

Kerberos, Fedora 19, openjdk 1.7

나야 2014. 1. 7. 20:44

Fedora19에서 CDH client 사용시,  kerberos 인증을 사용하는데, kinit, klist 통해서 인증이 정상적으로 됨을 확인했는데도, hdfs dfs 를 실행할 때 인증이 실패하게 됩니다. 


14/01/07 20:33:38 ERROR security.UserGroupInformation: PriviledgedActionException as:sjlee (auth:KERBEROS) cause:javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]


14/01/07 20:33:38 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)]


14/01/07 20:33:38 ERROR security.UserGroupInformation: PriviledgedActionException as:sjlee (auth:KERBEROS) cause: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)]


검색해보니 다음 글이 있습니다. 

Bug 991170 - java does not use correct kerberos credential cache (/tmp/krb5cc_uid vs /run/user/uid/krb5cc/tkt)


댓글 중 

[rfc][icedtea7] Handle alternative Kerberos credential cache locations

가 있는데, 

Kerberos 1.11에서 기본 위치 위치가 변경되었는데,

기존에 FileCredentialsCache.getDefaultCacheName()라는 메소드에

기존 경로( /tmp/krb5cc_$UID ) 가 하드 코딩되어 있어서 버그라는.


검색해보니

http://fedoraproject.org/wiki/Features/KRB5CacheMove

도 있습니다. 바꾼데는 뭔가 이유가 있군요.


위에 Bug 991170 댓글을 보니을 보니 뭔가 패치가 된것 같은데, hdfs dfs -ls 실행시키면 

기존 경로만 찾고 있는 것 같으니,

-c 옵션을 사용해서 기존 경로로 cache를 생성하면 됩니다.

kinit -k -t /home/sjlee/bin/abcde.keytab -c /tmp/krb5cc_1000 abcde/abcde@ABCDE.COM


klist도 -c옵션을 사용할 수 있습니다. 

klist -c /tmp/krb5cc_1000


openjdk 버전만 보면 어떤 패치가 된 것같은데, CDH 코드가 오래되서 그런건지, 확인해보고 싶지만,

그런건 할일 없을 때 하기로 하고,

어쨌든 이제 하둡에 접속할 수 있게 되었으니, 퇴근해야겠습니다. 흐아암~~


2014년 1월 7일.

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함