Beeline Connection Error

Hi All,

I am trying to connect to Hive DB using the beeline , but it gives the below error every time .

I have connected using nn02.itversity.com, nn01.itversity.com, and rm01.itversity.com and gives errr for all of these . Tried using my own user Id and Password as well as Scott/Tiger , but the error comes .

If any one has tried connecting in some different way. Would you be able to guide me .

Beeline version 1.2.1.spark2 by Apache Hive
beeline> !connect jdbc:hive2://nn02.itversity.com:10000/udemy bikash_analytica1012 ze8AenoV0awai0xohZaighaMee0tu9ie
Connecting to jdbc:hive2://nn02.itversity.com:10000/udemy
2020-10-13 20:38:45 INFO Utils:310 - Supplied authorities: nn02.itversity.com:10000
2020-10-13 20:38:45 INFO Utils:397 - Resolved authority: nn02.itversity.com:10000
2020-10-13 20:38:45 INFO HiveConnection:203 - Will try to open client transport with JDBC Uri: jdbc:hive2://nn02.itversity.com:10000/udemy
2020-10-13 20:38:45 INFO HiveConnection:208 - Could not open client transport with JDBC Uri: jdbc:hive2://nn02.itversity.com:10000/udemy
2020-10-13 20:38:45 INFO HiveConnection:229 - Transport Used for JDBC connection: null
Error: Could not open client transport with JDBC Uri: jdbc:hive2://nn02.itversity.com:10000/udemy: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0)
0: jdbc:hive2://nn02.itversity.com:10000/udem (closed)>

@Bikash_Karan Hiveserver2 connect host is changed in recent days to gw02.itversity.com. Please use !connect jdbc:hive2://gw02.itversity.com:10000/ to connect to hive using beeline

1 Like

Thank You BaLu!, Its working now . Quick Question :

If you see the below attached screen shot I was referring to the "Hive Server2 JDBC URL " . Was that the right approach ? or I should be considering the server in the Ambari Url

http://gw02.itversity.com:8080/#/main/services/HIVE/summary .

Please help me understand the same .