Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here. Want to know more about what has changed? Check out the Community News blog.

Cannot connect to beeline

SOLVED Go to solution
Highlighted

Re: Cannot connect to beeline

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

Re: Cannot connect to beeline

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

Re: Cannot connect to beeline

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

Re: Cannot connect to beeline

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

Re: Cannot connect to beeline

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

Re: Cannot connect to beeline

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

Re: Cannot connect to beeline

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

Re: Cannot connect to beeline

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

Re: Cannot connect to beeline

Cloudera Employee
can you show the result of the following:

env | grep HIVE

Re: Cannot connect to beeline

Expert Contributor
Command returned nothing...

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