메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.


Hadoop Cluster의 인증을 위해서 Windows Server의 Active Directory Kerberos를 사용하는 경우 Active Directory GPO(Goup Policy Object) 설정을 변경해야 하는 경우가 있는데 그 방법과 절차를 기술 한다. (AD Kerberos의 경우 Linux에 설정되어 있는 /etc/krb5.conf의 설정을 적용받지 않음)


1. 상황 : 약 30시간 이상 수행되는 HDFS Replication Job이 "ERROR distcp.DelegationTokenRenewer: Ticket Cache renewal failed", "kinit: Ticket expired while renewing credentials"가 발생하면서 HDFS Replication이 실패함.

2. 원인 파악 : hdfs계정으로 kinit을 하고 klist를 수행해보면 TGT Cache유효기간이 10H, Ticket Renewal lieftime이 10H으로 설정되어 있어 장기간(15H이상) 수행시 Ticket Cache renewal이 실패하면서 전체 Job이 실패하게됨(10H에 바로 fail되지 않은것은 Replication job의 내부 로직상 인증되어 처리가 시작된것은 약 15H까지는 처리를 수행하는것 같음, 15H이 넘어가면 불특정한 시간에 fail됨)

3. 조치 방법 : AD kerberos의 설정값중 다음을 추천값으로 변경해준다. 

 - Maximum lifetime for user ticket : 10H

 - Maximum lifetime for user ticket renewal : 7D

4. 변경방법 : Windows 관리 도구 -> "그룹 정책 관리" 바로가기 아이콘에서 shift+우클릭 후 "다른 사용자로 실행" -> Domain Admins권한이 있는 관리자 계정의 id/pw 를 입력하고 실행한다.

  -> "그룹 정책 개체"에서 Default Domain Policy 우클릭 하여 편집 클릭 

  -> 정책->Windows설정->보안설정->계정정책->Kerberos정책 부분의 값을 적절한 값으로 변경해준다. 

  -> 변경 정책 반영을 위해서 cmd에서 "gpupdate /force"를 반드시 수행해줘야 변경 사항이 반영된다. 

5. hdfs계정으로 kinit을 수행후 klist하여 유효 기간이 원하는 기간으로 설정되어 있는지 확인한다. 


*변경전(cache lifetime 10H, ticket renewal lifetime 10H)

[hadoop@node10:~]$sudo -u hdfs kinit -kt /run/cloudera-scm-agent/process/1546546453-hdfs-DATANODE/hdfs.keytab hdfs/node10.gooper.com@GOOPER.COM

[hadoop@node10:~]$sudo -u hdfs klist

Ticket cache: FILE:/tmp/krb5cc_39998

Default principal: hdfs/node10.gooper.com@GOOPER.COM


Valid starting Expires Service principal

02/27/2024 13:36:16 02/27/2024 23:36:16 krbtgt/GOOPER.COM@GOOPER.COM

renew until 02/27/2024 23:36:16

[hadoop@node10:~]$date

Tue Feb 27 13:36:40 KST 2024


* 변경후(cache lifetime 10H, ticket renewal lifetime 10H)

[hadoop@gooper01:~]$sudo -u hdfs kinit -kt /run/cloudera-scm-agent/process/1546391195-hdfs-DATANODE/hdfs.keytab hdfs/gooper01.gooper.com

[hadoop@gooper01:~]$sudo -u hdfs klist

Ticket cache: FILE:/tmp/krb5cc_39998

Default principal: hdfs/gooper01.gooper.com@GOOPER.COM


Valid starting       Expires              Service principal

03/12/2024 11:23:14  03/12/2024 21:23:14  krbtgt/GOOPER.COM@GOOPER.COM

        renew until 03/19/2024 11:23:14



*참고

 : Maximum lifetime for user ticket renewal이 설정안됨, Maximum lifetime for user ticket이면 kinit수행시 renewal/cache lifetime 10H으로 설정됨.

번호 제목 날짜 조회 수
241 룰에 매칭되면 발생되는 엑티베이션 객체에 대한 작업(이전값 혹은 현재값)을 처리하는 클래스 파일 2016.07.21 346
240 collection생성혹은 collection조회시 Plugin init failure for [schema.xml] fieldType "pdate": Error loading class 'solr.IntField' 오류 조치사항 2022.04.07 343
239 tar를 이용한 리눅스 백업 2018.05.13 341
238 MongoDB에 있는 특정컬럼의 값을 casting(string->integer)하여 update하기 java 소스 2016.12.19 339
237 [SparkR]SparkR 설치 사용기 1 - Installation Guide On Yarn Cluster & Mesos Cluster & Stand Alone Cluster file 2016.11.04 339
236 [CDP7.1.7]impala-shell을 이용하여 kudu table에 insert/update수행시 발생하는 오류(Transport endpoint is not connected (error 107)) 발생시 확인할 내용 2023.11.30 338
235 hue.axes_accessattempt테이블 데이터 샘플 2020.02.10 337
234 한번에 여러값 update하기 2016.01.13 337
233 solrdf초기 기동시 "Caused by: java.lang.IllegalAccessError: tried to access field org.apache.solr.handler.RequestHandlerBase.log from class org.gazzax.labs.solrdf.handler.update.RdfUpdateRequestHandler" 오류가 발생시 조치사항 2016.04.22 336
232 Could not compute split, block input-0-1517397051800 not found형태의 오류가 발생시 조치방법 2018.02.01 333
231 python 2.6.6에서 print 'A=' 형태의 사용이 python 3.5.1에서 오류(SyntaxError: Missing parentheses in call to 'print') 발생함.. 2016.05.27 333
230 SPIN(SPARQL Inference Notation)이란.. file 2016.02.25 333
229 [CentOS 7.4]Hadoop NFS gateway기동시 Cannot connect to port 2049 오류 발생시 확인/조치 2022.03.02 332
228 Could not authenticate, GSSException: No valid credentials provided (Mechanism level: Failed to find any kerberos tgt) 2022.04.28 331
227 Hue Job Browser의 Queries탭에서 조건을 지정하는 방법 2018.05.10 328
226 missing block및 관련 파일명 찾는 명령어 2021.02.20 327
225 impala external 테이블 생성시 컬럼과 라인 구분자를 지정하여 테이블 생성하는 예시 2020.02.20 327
224 SQL문장과 Mongo에서 사용하는 명령어를 비교한 것입니다. 2015.09.30 327
223 JAVA_HOME을 명시적으로 지정하는 방법 2018.06.04 325
222 [postgresql 9.x] PostgreSQL Replication 구축하기 2018.07.17 324
위로