Support Questions
Find answers, ask questions, and share your expertise

Herberized HDP 2.4 - not able to connect using Beeline

Expert Contributor

Hi - i've a kerberized HDP 2.4 cluster, and i'm trying to access Hive using Beeline.

Command used ->

!connect jdbc:hive2://sandbox.hortonworks.com:10001/default;principal=hive/sandbox.hortonworks.com@EXAMPLE.COM;hive.server2.transport.mode=binary;hive.server2.thrift.http.path=cliservice;auth=kerberos;hive.server2.thrift.sasl.qop=auth-int

Error :

Error: Could not open client transport with JDBC Uri: jdbc:hive2://sandbox.hortonworks.com:10001/default;principal=hive/sandbox.hortonworks.com@EXAMPLE.COM;hive.server2.transport.mode=binary;hive.server2.thrift.http.path=cliservice: java.net.ConnectException: Connection refused (state=08S01,code=0)

reference ->

https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.4/bk_dataintegration/content/beeline-vs-hive-...

Pls let me know what needs to be done ?

Also, what is the username/password to be put in, on firing the command above ?

I tried leaving it blank, and also the Unix hive username/passwd, but the error is the same.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Herberized HDP 2.4 - not able to connect using Beeline

Expert Contributor

try that !connect jdbc:hive2://sandbox.hortonworks.com:10001/default;principal=hive/sandbox.hortonworks.com@EXAMPLE.COM

are you sure that is the correct principal? When you use kerberos, you are using a key to provide credentials. You do not need username and password

View solution in original post

2 REPLIES 2

Re: Herberized HDP 2.4 - not able to connect using Beeline

Expert Contributor

try that !connect jdbc:hive2://sandbox.hortonworks.com:10001/default;principal=hive/sandbox.hortonworks.com@EXAMPLE.COM

are you sure that is the correct principal? When you use kerberos, you are using a key to provide credentials. You do not need username and password

View solution in original post

Re: Herberized HDP 2.4 - not able to connect using Beeline

Expert Contributor

@Karthik Narayanan,

- yes, the principal is correct for user - hive & I was able to use this command to connect to hive using beeline using the command you provided.. thanks for that.

command -> !connect jdbc:hive2://sandbox.hortonworks.com:10000/default;principal=hive/sandbox.hortonworks.com@EXAMPLE.COM