Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Hive and Hive Server 2 are in green but couldn't connect with them even using webUI.

avatar
Contributor

Hi there!

I have set up Hive and added Hive Server 2 in Cloudera Manager Trial version in order to connect with beeline.

Both are in green status but neither port 10000 nor 10002 are listening.

The message I get from beeline is "Failed to connect to <HOST>:10000
Could not open connection to the HS2 server. Please check the server URI and if the URI is correct, then ask the administrator to check the server status.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://<HOST>:10000/: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0)"

Here you have the way I'm hitting beeline:

beeline -u jdbc:hive2://<HOST>:10000/;principal=hive/USR@PWD

or

!connect jdbc:hive2://<HOST>:10000 usr pwd org.apache.hive.jdbc.HiveDriver

 

Marks_08_0-1715474884598.png

are there some steps missing to start HS2? 

Marks_08_1-1715475069366.png

 

1 REPLY 1

avatar
Super Collaborator

@Marks_08 

 

1. Verify if any firewalls are blocking incoming connections on ports 10000 (HiveServer2) and 10002 (Thrift server). You can use tools like netstat -atup or lsof -i :10000 to check if any processes are listening on these ports.

If a firewall is restricting access, configure it to allow connections on these ports from the machine where you're running Beeline.

2. Double-check the HiveServer2 configuration files (hive-site.xml and hive-env.sh) in Cloudera Manager.
Ensure that the hive.server2.thrift.port property is set to 10000 in hive-site.xml.
Verify that the HIVESERVER2_THRIFT_BIND_HOST environment variable (if set) in hive-env.sh allows connections from your Beeline machine.
Make sure the HiveServer2 service has the necessary permissions to bind to these ports.

3. beeline -u jdbc:hive2://<HOST>:10000/;principal=hive/USR@PWD (specifies principal)

4. Try restarting the Hive and HiveServer2 services in Cloudera Manager. This can sometimes resolve conflicts or configuration issues.

5. Check the HiveServer2 log files (usually in /var/log/hive-server2/hive-server2.log) for any error messages that might indicate why it's not listening on the expected ports.