2014-05-16 86 views
1

我正在使用CDH5。我建立了一個Hive Metastore來使用Kerberos。即hive-site.xml具有以下屬性oozie hive採用配置Kerberos的Metastore服務器的動作

<property> 
    <name>hive.metastore.sasl.enabled</name> 
    <value>true</value> 
</property> 

<property> 
    <name>hive.metastore.kerberos.keytab.file</name> 
    <value>/etc/hive/conf/hive.keytab</value> 
</property> 

<property> 
    <name>hive.metastore.kerberos.principal</name> 
    <value>hive/[email protected]</value> 
</property> 

日誌顯示在啓動配置單元-orestore服務時沒有錯誤。

我試圖在oozie工作流中運行配置單元操作。在Oozie的-site.xml文件具有以下屬性

<property> 
    <name>oozie.credentials.credentialclasses</name> 
    <value>hcat=org.apache.oozie.action.hadoop.HCatCredentials</value> 
</property> 

,並且工作流程XML文件的憑據標記

<credentials> 
    <credential name='hive_credentials' type='hcat'> 
      <property> 
       <name>hcat.metastore.uri</name> 
       <value>thrift://hive-metastore.example.com:9083</value> 
      </property> 
      <property> 
       <name>hcat.metastore.principal</name> 
       <value>hive/[email protected]</value> 
      </property> 
    </credential> 
</credentials> 

的蜂巢行爲是指使用「名氣」屬性的憑據。

<action name="hive" cred="hive_credentials"> 
    <hive xmlns="uri:oozie:hive-action:0.2"> 
     <job-tracker>${jobTracker}</job-tracker> 
     <name-node>${nameNode}</name-node> 
     <job-xml>${appPath}/hive-site.xml</job-xml> 
     <configuration> 
      <property> 
       <name>mapred.job.queue.name</name> 
       <value>${queueName}</value> 
      </property> 
     </configuration> 
     <script>${appPath}/queries.hql</script> 
    </hive> 
    <ok to="pass"/> 
    <error to="fail"/> 
</action> 

當我嘗試運行此工作流程時,出現以下錯誤。

Exception in addtoJobConf 
MetaException(message:Could not connect to meta store using any of the URIs provided. Most recent failure: org.apache.thrift.transport.TTransportException: No common protection layer between client and server 
     at org.apache.thrift.transport.TSaslTransport.sendAndThrowMessage(TSaslTransport.java:221) 
     at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:297) 
     at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) 
     at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:52) 
     at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:49) 
     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:1548) 
     at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport.open(TUGIAssumingTransport.java:49) 
     at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:288) 
     at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:169) 
     at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:109) 
     at org.apache.oozie.action.hadoop.HCatCredentialHelper.getHCatClient(HCatCredentialHelper.java:87) 
     at org.apache.oozie.action.hadoop.HCatCredentialHelper.set(HCatCredentialHelper.java:52) 
     at org.apache.oozie.action.hadoop.HCatCredentials.addtoJobConf(HCatCredentials.java:58) 
     at org.apache.oozie.action.hadoop.JavaActionExecutor.setCredentialTokens(JavaActionExecutor.java:990) 
     at org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:851) 
     at org.apache.oozie.action.hadoop.JavaActionExecutor.start(JavaActionExecutor.java:1071) 
     at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:217) 
     at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:62) 
     at org.apache.oozie.command.XCommand.call(XCommand.java:280) 
     at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:323) 
     at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:252) 
     at org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) 
     at java.lang.Thread.run(Thread.java:662) 
) 
     at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:334) 
     at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:169) 
     at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:109) 
     at org.apache.oozie.action.hadoop.HCatCredentialHelper.getHCatClient(HCatCredentialHelper.java:87) 
     at org.apache.oozie.action.hadoop.HCatCredentialHelper.set(HCatCredentialHelper.java:52) 
     at org.apache.oozie.action.hadoop.HCatCredentials.addtoJobConf(HCatCredentials.java:58) 
     at org.apache.oozie.action.hadoop.JavaActionExecutor.setCredentialTokens(JavaActionExecutor.java:990) 
     at org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:851) 
     at org.apache.oozie.action.hadoop.JavaActionExecutor.start(JavaActionExecutor.java:1071) 
     at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:217) 
     at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:62) 
     at org.apache.oozie.command.XCommand.call(XCommand.java:280) 
     at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:323) 
     at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:252) 
     at org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) 
     at java.lang.Thread.run(Thread.java:662) 

任何想法可能會導致此問題?

回答

0

我有一個使用一個工作流程:

hive/[email protected] 

hcat.metastore.principal,而不是:

hive/[email protected] 

你能試試嗎?

+0

它應該是hive/[email protected]還是hive/[email protected]?我嘗試了hive/[email protected]並仍然得到相同的異常。如果我使用hive/[email protected],則會收到一條說明「GSS啓動失敗」的異常。我不認爲'_host'正在被主機名 –

+0

取代你說得對,應該是_HOST。 –

+0

我已經看到了幾個主機名已被填入的例子。這實際上是否有所作爲(你確定插入主機名是否真的正確?) –