2016-08-29 203 views
0

我在kerberized集羣中遇到了一個問題,其中配置單元無法啓動。Hive無法啓動:創建路徑/配置單元/集羣/委派/ METASTORE /鍵時出錯

症狀:

  • 服務成功地啓動(並沒有停止)
  • 在Ambari警報出現其中提到蜂房metastore失敗的命令行上
  • 開始蜂巢沒有成功(這只是不停地掛)
  • 通過直線我能看到的元數據,但沒有得到實際的數據

我發現下面的錯誤/var/log/hive/hivemetastore.log

2016-08-29 10:12:49,047 ERROR [main]: metastore.HiveMetaStore (HiveMetaStore.java:main(5934)) - Metastore Thrift Server threw an exception... 
org.apache.hadoop.hive.thrift.DelegationTokenStore$TokenStoreException: Error creating path /hive/cluster/delegation/METASTORE/keys 
    at org.apache.hadoop.hive.thrift.ZooKeeperTokenStore.ensurePath(ZooKeeperTokenStore.java:166) 
    at org.apache.hadoop.hive.thrift.ZooKeeperTokenStore.initClientAndPaths(ZooKeeperTokenStore.java:236) 
    at org.apache.hadoop.hive.thrift.ZooKeeperTokenStore.init(ZooKeeperTokenStore.java:469) 
    at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server.startDelegationTokenSecretManager(HadoopThriftAuthBridge.java:444) 
    at org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:6015) 
    at org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:5930) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:498) 
    at org.apache.hadoop.util.RunJar.run(RunJar.java:221) 
    at org.apache.hadoop.util.RunJar.main(RunJar.java:136) 
Caused by: org.apache.zookeeper.KeeperException$AuthFailedException: KeeperErrorCode = AuthFailed for /hive/cluster/delegation/METASTORE/keys 
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:123) 
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:51) 
    at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:783) 
    at org.apache.curator.framework.imps.CreateBuilderImpl$11.call(CreateBuilderImpl.java:691) 
    at org.apache.curator.framework.imps.CreateBuilderImpl$11.call(CreateBuilderImpl.java:675) 
    at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:107) 
    at org.apache.curator.framework.imps.CreateBuilderImpl.pathInForeground(CreateBuilderImpl.java:672) 
    at org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:453) 
    at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:443) 
    at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:423) 
    at org.apache.curator.framework.imps.CreateBuilderImpl$3.forPath(CreateBuilderImpl.java:257) 
    at org.apache.curator.framework.imps.CreateBuilderImpl$3.forPath(CreateBuilderImpl.java:205) 
    at org.apache.hadoop.hive.thrift.ZooKeeperTokenStore.ensurePath(ZooKeeperTokenStore.java:160) 
    ... 11 more 

回答

0

注意,其實我試過幾件事情,所以我不知道這是否是完整的解決方案,但這裏是最後一步,我相信是關鍵的一年:

經過長時間的搜尋後,我間接發現這個網站:https://community.hortonworks.com/articles/49040/hive-metastore-crashes-on-nullpointerexception-wit.html

這裏是幫我解決這個問題的相關片段:

這在下面的Hortonworks的bug被跟蹤的已知問題:

https://hortonworks.jira.com/browse/BUG-42602

解決方法:

設置hive.cluster.delegation.token.store.class以下幾點:

hive.cluster.delegation.token.store.class = org.apache.hadoop.hive.thrift.DBTokenStore

如果使用Ambari,可以通過單擊Hive 服務來更改此設置Ambari儀表板,導航到「Configs」選項卡,並修改 Hive配置的「Advanced Hive-site」部分中的參數。提示時保存更改並從Ambari用戶 界面重新啓動Hive。

如果不使用ambari,則此設置可位於 /etc/hive/conf/hive-site.xml文件中。確保在 集羣上的所有適用節點上進行此更改。一旦做出更改,必須重新啓動 Hive服務。

相關問題