Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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
Expert Contributor

@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.