An Error Is Reported When MRS Hive Uses Code to Connect to ZooKeeper
Issue
An error is reported when MRS Hive connects to ZooKeeper.
Symptom
Hive 1.2.1 of the MRS 1.8 cluster is successfully connected to the MRS cluster through the JDBC interface of Hive. However, an error is reported when Hive 2.3.2 of the MRS 1.9.0 cluster is connected to the MRS cluster through the JDBC interface of Hive for computing tasks. An error message as shown in the following figure is displayed:
Caused by: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hiveserver2
Cause Analysis
The authentication method of MRS 1.8 is the same as that of the open source version. The Kerberos authentication file is directly transferred to the Hive URL for authentication. However, in MRS 1.9, this method cannot be used. You need to perform Kerberos authentication, obtain some other configuration information, and then combine the URL.
Procedure
For details, see the authentication connection of hive-examples in the MRS 1.9 sample project. For details about the sample address, see the Developer Guide.
Summary and Suggestions
Customers develop code based on the official MRS 1.9 samples.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.