2015-01-02 5 views
0

나는 그래서 난 오류가 아래 얻고 직선 또는 색조 하이브를 연결하려고하이브 -있는 InvocationTargetException 널

2015-01-01 11:56:18,312 ERROR sentry.org.apache.thrift.transport.TSaslTransport: SASL negotiation failure 
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:212) 
     at sentry.org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94) 
     at sentry.org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:253) 
     at sentry.org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:1) 
     at org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClient$UgiSaslClientTransport.baseOpen(SentryPolicyServiceClient.java:115) 
     at org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClient$UgiSaslClientTransport.access$000(SentryPolicyServiceClient.java:77) 
     at org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClient$UgiSaslClientTransport$1.run(SentryPolicyServiceClient.java:101) 
     at org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClient$UgiSaslClientTransport$1.run(SentryPolicyServiceClient.java:99) 
     at java.security.AccessController.doPrivileged(Native Method) 
     at javax.security.auth.Subject.doAs(Subject.java:415) 
     at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1554) 
     at org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClient$UgiSaslClientTransport.open(SentryPolicyServiceClient.java:99) 
     at org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClient.<init>(SentryPolicyServiceClient.java:151) 
     at org.apache.sentry.provider.db.SimpleDBProviderBackend.<init>(SimpleDBProviderBackend.java:52) 
     at org.apache.sentry.provider.db.SimpleDBProviderBackend.<init>(SimpleDBProviderBackend.java:48) 
     at sun.reflect.GeneratedConstructorAccessor12.newInstance(Unknown Source) 
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
     at java.lang.reflect.Constructor.newInstance(Constructor.java:526) 
     at org.apache.sentry.binding.hive.authz.HiveAuthzBinding.getAuthProvider(HiveAuthzBinding.java:247) 
     at org.apache.sentry.binding.hive.authz.HiveAuthzBinding.<init>(HiveAuthzBinding.java:88) 
     at org.apache.sentry.binding.hive.authz.HiveAuthzBinding.<init>(HiveAuthzBinding.java:81) 
     at org.apache.sentry.binding.hive.HiveAuthzBindingHook.<init>(HiveAuthzBindingHook.java:98) 
     at sun.reflect.GeneratedConstructorAccessor11.newInstance(Unknown Source) 
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
     at java.lang.reflect.Constructor.newInstance(Constructor.java:526) 
     at java.lang.Class.newInstance(Class.java:374) 
     at org.apache.hadoop.hive.ql.hooks.HookUtils.getHooks(HookUtils.java:59) 
     at org.apache.hadoop.hive.ql.Driver.getHooks(Driver.java:1162) 
     at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:440) 
     at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:352) 
     at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:995) 
     at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:988) 
     at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:98) 
     at org.apache.hive.service.cli.operation.SQLOperation.run(SQLOperation.java:163) 
     at org.apache.hive.service.cli.session.HiveSessionImpl.runOperationWithLogCapture(HiveSessionImpl.java:514) 
     at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:222) 
     at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatement(HiveSessionImpl.java:204) 
     at org.apache.hive.service.cli.CLIService.executeStatement(CLIService.java:168) 
     at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:316) 
     at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1373) 
     at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1358) 
     at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) 
     at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) 
     at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge20S$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge20S.java:608) 
     at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:244) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
     at java.lang.Thread.run(Thread.java:745) 
Caused by: GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt) 
     at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:147) 
     at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:121) 
     at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:187) 
     at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:223) 
     at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212) 
     at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179) 
     at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:193) 
     ... 47 more 
2015-01-01 11:56:18,313 WARN org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:hive/[email protected] (auth:KERBEROS) cause:sentry.org.apache.thrift.transport.TTransportException: GSS initiate failed 
2015-01-01 11:56:18,313 ERROR org.apache.hadoop.hive.ql.Driver: FAILED: InvocationTargetException null 
java.lang.reflect.InvocationTargetException 
     at sun.reflect.GeneratedConstructorAccessor12.newInstance(Unknown Source) 
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
     at java.lang.reflect.Constructor.newInstance(Constructor.java:526) 
     at org.apache.sentry.binding.hive.authz.HiveAuthzBinding.getAuthProvider(HiveAuthzBinding.java:247) 
     at org.apache.sentry.binding.hive.authz.HiveAuthzBinding.<init>(HiveAuthzBinding.java:88) 
     at org.apache.sentry.binding.hive.authz.HiveAuthzBinding.<init>(HiveAuthzBinding.java:81) 
     at org.apache.sentry.binding.hive.HiveAuthzBindingHook.<init>(HiveAuthzBindingHook.java:98) 
     at sun.reflect.GeneratedConstructorAccessor11.newInstance(Unknown Source) 
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
     at java.lang.reflect.Constructor.newInstance(Constructor.java:526) 
     at java.lang.Class.newInstance(Class.java:374) 
     at org.apache.hadoop.hive.ql.hooks.HookUtils.getHooks(HookUtils.java:59) 
     at org.apache.hadoop.hive.ql.Driver.getHooks(Driver.java:1162) 
     at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:440) 
     at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:352) 
     at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:995) 
     at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:988) 
     at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:98) 
     at org.apache.hive.service.cli.operation.SQLOperation.run(SQLOperation.java:163) 
     at org.apache.hive.service.cli.session.HiveSessionImpl.runOperationWithLogCapture(HiveSessionImpl.java:514) 
     at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:222) 
     at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatement(HiveSessionImpl.java:204) 
     at org.apache.hive.service.cli.CLIService.executeStatement(CLIService.java:168) 
     at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:316) 
     at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1373) 
    at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1358) 
     at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) 
     at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) 
     at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge20S$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge20S.java:608) 
     at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:244) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
     at java.lang.Thread.run(Thread.java:745) 
Caused by: java.lang.reflect.UndeclaredThrowableException 
     at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1567) 
     at org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClient$UgiSaslClientTransport.open(SentryPolicyServiceClient.java:99) 
     at org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClient.<init>(SentryPolicyServiceClient.java:151) 
     at org.apache.sentry.provider.db.SimpleDBProviderBackend.<init>(SimpleDBProviderBackend.java:52) 
     at org.apache.sentry.provider.db.SimpleDBProviderBackend.<init>(SimpleDBProviderBackend.java:48) 
     ... 33 more 
Caused by: sentry.org.apache.thrift.transport.TTransportException: GSS initiate failed 
     at sentry.org.apache.thrift.transport.TSaslTransport.sendAndThrowMessage(TSaslTransport.java:221) 
     at sentry.org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:297) 
     at sentry.org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:1) 
     at org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClient$UgiSaslClientTransport.baseOpen(SentryPolicyServiceClient.java:115) 
     at org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClient$UgiSaslClientTransport.access$000(SentryPolicyServiceClient.java:77) 
     at org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClient$UgiSaslClientTransport$1.run(SentryPolicyServiceClient.java:101) 
     at org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClient$UgiSaslClientTransport$1.run(SentryPolicyServiceClient.java:99) 
     at java.security.AccessController.doPrivileged(Native Method) 
     at javax.security.auth.Subject.doAs(Subject.java:415) 
     at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1554) 
     ... 37 more 

내가 찾은 일시적 해상도 :

내가 매일 하이브 서비스를 다시 시작하면 그때는 잘 작동하고 하지만 매일 다시 시작해야합니다.

나는 영구적 인 해결책을 원합니다. 아무도 나를 해결할 수 있도록 도와 주시겠습니까?

답변

0

Kerberos 자격 증명으로 생성 된 티켓은 Hive가 아닙니다. Ticket Granting Service에서 생성 한 티켓은 만료 된 후 특정 시간 동안 활성 상태를 유지합니다. 하이브를 실행하기 전에 kinit를 실행하여 TGS 티켓을 생성해야합니다. 그렇게하면 매번 하이브 서비스를 다시 시작할 필요가 없습니다.

간단한 테스트는 하이브 서비스를 실행하기 전후에 klist 명령을 실행하는 것입니다.

+0

하지만 kinit를 매번 실행하는 것이 가능합니다. krbtgt의 갱신 시간을 7 일로 설정했습니다. – Viru

+0

krbtgt 갱신이 도움이되는지 확실하지 않습니다. 아래 링크를 참조하십시오. http://www.cloudera.com/content/cloudera/en/documentation/cdh4/v4-3-0/CDH4-Security-Guide/cdh4sg_topic_17.html – Arani

+0

여전히 같은 문제입니다. – Viru