方案:Apache Hive 无法与 Azure HDInsight 中的 Apache Zookeeper 建立连接Scenario: Apache Hive fails to establish a connection to Apache Zookeeper in Azure HDInsight

本文介绍在 Azure HDInsight 群集中使用交互式查询组件时出现的问题的故障排除步骤和可能的解决方案。This article describes troubleshooting steps and possible resolutions for issues when using Interactive Query components in Azure HDInsight clusters.

问题Issue

Hive 视图不可访问,/var/log/hive 中的日志显示类似于以下内容的错误:The Hive View is inaccessible, and the logs in /var/log/hive show an error similar to the following:

ERROR [Curator-Framework-0]: curator.ConnectionState (ConnectionState.java:checkTimeouts(200)) - Connection timed out for connection string (zk0-cluster.cloud.wbmi.com:2181,zk1-cluster.cloud.wbmi.com:2181,zk2-cluster.cloud.wbmi.com:2181) and timeout (15000) / elapsed (21852)

原因Cause

Hive 可能无法建立与 Zookeeper 的连接,这会阻止 Hive 视图启动。It is possible that Hive may fail to establish a connection to Zookeeper, which prevents the Hive View from launching.

解决方法Resolution

  1. 检查 Zookeeper 服务是否正常运行。Check that the Zookeeper service is healthy.

  2. 检查 Zookeeper 服务是否具有 Hive Server2 的 ZNode 条目。Check if the Zookeeper service has a ZNode entry for Hive Server2. 该值会缺失或不正确。The value will be missing or incorrect.

    /usr/hdp/2.6.2.25-1/zookeeper/bin/zkCli.sh -server zk1-wbwdhs
    [zk: zk0-cluster(CONNECTED) 0] ls /hiveserver2-hive2
    
  3. 若要重新建立连接,请重新启动 Zookeeper 节点,并重新启动 HiveServer2。To re-establish connectivity, reboot the Zookeeper nodes, and reboot HiveServer2.

后续步骤Next steps

如果你的问题未在本文中列出,或者无法解决问题,请访问以下渠道以获取更多支持:If you didn't see your problem or are unable to solve your issue, visit the following channel for more support:

  • 如果需要更多帮助,可以从 Azure 门户提交支持请求。If you need more help, you can submit a support request from the Azure portal. 从菜单栏中选择“支持” ,或打开“帮助 + 支持” 中心。Select Support from the menu bar or open the Help + support hub.