Connection Timed Out During SQL Statement Execution on the Hive Client
Symptom
The Hive client fails to execute SQL statements, and error message "Timed out waiting for a free available connection" is displayed.
Cause Analysis
There are a large number of DBService connections, and obtaining the connections times out.
Procedure
- Check whether the client uses the Spark SQL client to execute SQL statements.
- Log in to Manager, choose Cluster > Services > Hive > Configurations > All Configurations, search for javax.jdo.option.ConnectionURL, and check whether the value of the timeout parameter is less than 600.
- Check whether the value of javax.jdo.option.ConnectionURL is ${javax.jdo.option.ConnectionURL.default}.
- Click Instance, select any HiveServer instance, and log in to the instance node as user root.
- Open the ${BIGDATA_HOME}/FusionInsight_Current/*HiveServer/etc/hivemetastore-site.xml configuration file, find the javax.jdo.option.ConnectionURL parameter, and copy its value.
- Log in to Manager, choose Cluster > Services > Hive > Configurations > All Configurations, search for javax.jdo.option.ConnectionURL, change its value to the URL copied in 5, change the timeout parameter to 600, and click Save.
Hive, HiveServer, MetaStore, and WebHCat all have this parameter. Ensure that their parameter values are the same.
- Choose Cluster > Services > Hive > Configurations > All Configurations, search for maxConnectionsPerPartition, and check whether its value is less than 100.
- If parameters are modified in the preceding steps, choose Cluster > Services > Hive > Dashboard, click More, and select Service Rolling Restart. If no parameters are modified, skip this step.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot