Support Questions

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

hive beeline login says: Could not open connection to the HS2 server. Connection refused.

avatar
Explorer

Hello,

in hive i am unable to establish a connection,

beeline> !connect jdbc:hive2://localhost:10000/
Connecting to jdbc:hive2://localhost:10000/
Enter username for jdbc:hive2://localhost:10000/:

I don't know what to put for username and password, it is not accepting ENTER Key or my device login details.

Output: 
24/05/20 01:19:08 [main]: WARN jdbc.HiveConnection: Failed to connect to localhost: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. Enable verbose error messages (--verbose=true) for more information.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000/: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0)

Please help.

4 REPLIES 4

avatar
Master Collaborator

Hello @adsejnf  Can you check is hive server2 is up and running

avatar
Explorer

@Scharan  I checked, I am confused.

Screenshot from 2024-05-20 10-20-49.png

Screenshot from 2024-05-20 10-10-49.png

Screenshot from 2024-05-20 10-22-36.png

My hive-site.xml is also set properly: 

Screenshot from 2024-05-20 10-25-43.png

Screenshot from 2024-05-20 10-26-03.png

Screenshot from 2024-05-20 10-27-19.png

 

avatar
Expert Contributor

Hi @adsejnf,

have you tried using the username and password as hive & hive respectively? If not, please try it once.

Thanks!

avatar
Explorer

I switched to mysql and the hiveserver2 is running now.

@tj2007  I setup a new username and password in mysql. Thank you 🙂