案例: Apache Phoenix Azure HDInsight 中的連線能力問題Scenario: Apache Phoenix connectivity issues in Azure HDInsight

本文說明與 Azure HDInsight 叢集互動時,問題的疑難排解步驟和可能的解決方式。This article describes troubleshooting steps and possible resolutions for issues when interacting with Azure HDInsight clusters.

問題Issue

無法使用 Apache Phoenix 連接到 Apache HBase。Unable to connect to Apache HBase with Apache Phoenix. 原因可能會有所不同。Reasons may vary.

原因: IP 不正確Cause: Incorrect IP

作用中 Zookeeper 節點的 IP 無效。Incorrect IP of active Zookeeper node.

解決方案Resolution

您可以遵循 HBase > 快速連結 > ZK (active) > Zookeeper 資訊 的連結,從 Ambari UI 識別作用中 Zookeeper 節點的 IP。The IP of the active Zookeeper node can be identified from the Ambari UI by following the links to HBase > Quick Links > ZK (Active) > Zookeeper Info. 請視需要更正 IP。Correct the IP as needed.


原因: SYSTEM。離線目錄資料表Cause: SYSTEM.CATALOG table offline

執行命令(例如 !tables )時,您會收到類似下列的錯誤訊息:When running commands such as !tables, you receive an error message similar to:

Error while connecting to sqlline.py (Hbase - phoenix) Setting property: [isolation, TRANSACTION_READ_COMMITTED] issuing: !connect jdbc:phoenix:10.2.0.7 none none org.apache.phoenix.jdbc.PhoenixDriver Connecting to jdbc:phoenix:10.2.0.7 SLF4J: Class path contains multiple SLF4J bindings.

執行命令(例如 count 'SYSTEM.CATALOG' )時,您會收到類似下列的錯誤訊息:When running commands such as count 'SYSTEM.CATALOG', you receive an error message similar to:

ERROR: org.apache.hadoop.hbase.NotServingRegionException: Region SYSTEM.CATALOG,,1485464083256.c0568c94033870c517ed36c45da98129. is not online on 10.2.0.5,16020,1489466172189)

解決方案Resolution

從 Apache Ambari UI 中,完成下列步驟,在所有 ZooKeeper 節點上重新開機 HMaster 服務:From the Apache Ambari UI, complete the following steps to restart the HMaster service on all ZooKeeper nodes:

  1. 從 hbase 的 [摘要] 區段中,移至 [ hbase > Active HBase Master]。From the Summary section of HBase, go to HBase > Active HBase Master.

  2. 從 [ 元件 ] 區段中,重新開機 HBase Master 服務。From the Components section, restart the HBase Master service.

  3. 針對所有其餘的 Standby HBase Master 服務,重複這些步驟。Repeat these steps for all remaining Standby HBase Master services.

最多可能需要五分鐘的時間,HBase Master 服務才能穩定並完成復原。It can take up to five minutes for the HBase Master service to stabilize and finish the recovery. SYSTEM.CATALOG資料表恢復正常之後,Apache Phoenix 的連接問題應該會自動解決。After the SYSTEM.CATALOG table is back to normal, the connectivity issue to Apache Phoenix should get resolved automatically.

後續步驟Next steps

如果您沒有看到您的問題,或無法解決您的問題,請瀏覽下列其中一個管道以取得更多支援:If you didn't see your problem or are unable to solve your issue, visit one of the following channels for more support:

  • 透過 Azure 社群支援獲得由 Azure 專家所提供的解答。Get answers from Azure experts through Azure Community Support.

  • 連線至 @AzureSupport - 這是用來改善客戶體驗的官方 Microsoft Azure 帳戶。Connect with @AzureSupport - the official Microsoft Azure account for improving customer experience. 將 Azure 社群連線到正確的資源:解答、支援和專家。Connecting the Azure community to the right resources: answers, support, and experts.

  • 如果需要更多協助,您可在 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. 如需詳細資訊,請參閱如何建立 Azure 支援要求For more detailed information, review How to create an Azure support request. 您可透過 Microsoft Azure 訂閱來存取訂閱管理和帳單支援,並透過其中一項 Azure 支援方案以取得技術支援。Access to Subscription Management and billing support is included with your Microsoft Azure subscription, and Technical Support is provided through one of the Azure Support Plans.