Command to launch Beeline (Hive server2)

hive

#1

Dear Team,

Could you please let me know the command to launch he beeline client.

Am getting below error while launching the shell.

[anuvenkatesheee@gw03 ~]$ beeline -u jdbc:hive2://nn01.itversity.com:2181,nn02.itversity.com:2181,rm01.itversity.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
Connecting to jdbc:hive2://nn01.itversity.com:2181,nn02.itversity.com:2181,rm01.itversity.com:2181/
19/01/19 13:28:13 [main]: WARN jdbc.HiveConnection: Failed to connect to nn01.itversity.com:2181
Error: Could not open client transport with JDBC Uri: jdbc:hive2://nn01.itversity.com:2181/: null (state=08S01,code=0)
Beeline version 1.2.1000.2.6.5.0-292 by Apache Hive
0: jdbc:hive2://nn01.itversity.com:2181,nn02. (closed)> show databases;
19/01/19 13:29:41 [main]: WARN jdbc.HiveConnection: Failed to connect to nn01.itversity.com:2181
No current connection


#2

@venkateshm Please refer this link.


#3

still same error

[anuvenkatesheee@gw03 ~]$ beeline
Beeline version 1.2.1000.2.6.5.0-292 by Apache Hive
beeline> !connect jdbc:hive2://nn01.itversity.com:1000
Connecting to jdbc:hive2://nn01.itversity.com:1000
Enter username for jdbc:hive2://nn01.itversity.com:1000: scott
Enter password for jdbc:hive2://nn01.itversity.com:1000: *****
19/01/21 11:27:39 [main]: WARN jdbc.HiveConnection: Failed to connect to nn01.itversity.com:1000
Error: Could not open client transport with JDBC Uri: jdbc:hive2://nn01.itversity.com:1000: java.net.ConnectException: Connection refused (state=08S01,code=0)
0: jdbc:hive2://nn01.itversity.com:1000 (closed)> show databases;
19/01/21 11:27:49 [main]: WARN jdbc.HiveConnection: Failed to connect to nn01.itversity.com:1000
No current connection
0: jdbc:hive2://nn01.itversity.com:1000 (closed)>

@dgadiraju: Please revet me


#4

you have missed one zero(0) in port number. Try below

!connect jdbc:hive2://nn01.itversity.com:10000


#5

Thanks annapurna it’s working fine, am able to connect.


#6