Support Questions

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

Cannot connect to beeline

avatar
Expert Contributor

I am trying to connect beeline from client system but I am not able to...

 

Beeline version 0.10.0-cdh4.5.0 by Apache Hive
beeline> !connect jdbc:hive2://hostname.com:10000 org.apache.hadoop.hive.jdbc.HiveDriver
scan complete in 6ms
Connecting to jdbc:hive2://hostname.com:10000
Enter password for jdbc:hive2://hostname.com:10000: ********
Error: Invalid URL: jdbc:hive2://hostname.com:10000 (state=08S01,code=0)

 

Am I missing anything here...Please advice..

 

Em Jay
1 ACCEPTED SOLUTION

avatar
Expert Contributor
This solved my problem....I was using the wrong syntax. Below is the right one...
!connect jdbc:hive2://hostname:10000/default;principal=hive/hostname@PRINCIPAL.COM
username and password blank....

Thanks for helping me out zhang...
Em Jay

View solution in original post

38 REPLIES 38

avatar
Expert Contributor
no luck same error...

!connect jdbc:hive2://hostname:10000 org.apache.hive.jdbc.HiveDriver
Connecting to jdbc:hive2://hostname:10000
Enter password for jdbc:hive2://hostname:10000:
Error: Invalid URL: jdbc:hive2://hostname:10000 (state=08S01,code=0)
Em Jay

avatar
Expert Contributor
I tried with all the hiveserver2 running hosts...still the same problem.
when I do !list i see below output
scan complete in 1211ms
9 driver classes found
Compliant Version Driver Class
yes 1.0 org.apache.commons.dbcp.PoolingDriver
yes 10.4 org.apache.derby.jdbc.AutoloadedDriver
yes 10.4 org.apache.derby.jdbc.EmbeddedDriver
no 0.10 org.apache.hadoop.hive.jdbc.HiveDriver
no 0.10 org.apache.hive.jdbc.HiveDriver
yes 1.0 org.datanucleus.store.rdbms.datasource.dbcp.PoolingDriver
no 1.8 org.hsqldb.jdbcDriver
no 9.0 org.postgresql.Driver
yes 2.1 sun.jdbc.odbc.JdbcOdbcDriver

For the driver you recommended me to use says Compliant "no". Do I need to worry about this ?
Em Jay

avatar
Cloudera Employee
Could you try not specifying the driver class and let the system take the
default?

avatar
Expert Contributor
Still same error...

Connecting to jdbc:hive2://hostname:10000
Enter username for jdbc:hive2://hostname:10000:
Enter password for jdbc:hive2://hostname:10000:
Error: Invalid URL: jdbc:hive2://hostname:10000 (state=08S01,code=0)
Em Jay

avatar
Cloudera Employee
Could you try "beeline -u jdbc:hive2://" to see if this work for you?

avatar
Expert Contributor

Still the same...

 

 $ beeline -u jdbc:hive2://hostname:10000
scan complete in 10ms
Connecting to jdbc:hive2://hostname:10000
Error: Invalid URL: jdbc:hive2://hostname:10000 (state=08S01,code=0)
Beeline version 0.10.0-cdh4.5.0 by Apache Hive
0: jdbc:hive2://hostname.c>

Em Jay

avatar
Cloudera Employee
I meant you literally try "beeline -u jdbc:hive2://"...

avatar
Expert Contributor

I see a different message now...

 

beeline -u jdbc:hive2://
scan complete in 10ms
Connecting to jdbc:hive2://
14/02/06 15:48:18 WARN conf.HiveConf: DEPRECATED: Configuration property hive.metastore.local no longer has any effect. Make sure to provide a valid value for hive.metastore.uris if you are connecting to a remote metastore.
Unable to login to kerberos with given principal/keytab
Beeline version 0.10.0-cdh4.5.0 by Apache Hive
0: jdbc:hive2://>

Em Jay

avatar
Cloudera Employee
can you show the result of the following:

env | grep HIVE

avatar
Expert Contributor
Command returned nothing...

I don't have anything in env that match pattern "HIVE"
Em Jay