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.

Intergrating Hive with Kerberos

Solved Go to solution

Intergrating Hive with Kerberos

New Contributor

Using the Cloudera Manager, I am trying to configure Hive. The Hive Server 2 is running on ip-172-31-36-45.ec2.internal. The beeline.properties contains:

ConnectionURL=jdbc:hive2://ip-172-31-36-45.ec2.internal:1000/default;principal=hive/ip-172-31-36-45.ec2.internal@DEV.TSS
ConnectionDriverName=org.apache.hive.jdbc.HiveDriver
ConnectionUserName=.
ConnectionPassword=.

 

Beeline gets "Error: Could not open client transport with JDBC Uri: jdbc:hive2://ip-172-31-36-45.ec2.internal:1000/default;principal=hive/ip-172-31-36-45.ec2.internal@DEV.TSS: java.net.ConnectException: Connection refused (state=08S01,code=0)."

 

The krb5.conf contains the following:

[libdefaults]
default_realm = DEV.TSS
dns_lookup_kdc = false
dns_lookup_realm = false
ticket_lifetime = 86400
renew_lifetime = 604800
forwardable = true
default_tgs_enctypes = rc4-hmac
default_tkt_enctypes = rc4-hmac
permitted_enctypes = rc4-hmac
udp_preference_limit = 1
kdc_timeout = 3000
[realms]
DEV.TSS = {
kdc = win-tl14iapii4l.dev.tss
admin_server = win-tl14iapii4l.dev.tss
}
[domain_realm]
.ec2.internal=DEV.TSS
ec2.internal=DEV.TSS

 

Active Directory is being used as the KDC for the Keberos Domain DEV.TSS.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Intergrating Hive with Kerberos

New Contributor

Hi,

wrong port

by default hiveserver2 is listening on port 10000.

change connection string from:

jdbc:hive2://ip-172-31-36-45.ec2.internal:1000/default;principal=hive/ip-172-31-36-45.ec2.internal@DEV.TSS

to

jdbc:hive2://ip-172-31-36-45.ec2.internal:10000/default;principal=hive/ip-172-31-36-45.ec2.internal@DEV.TSS

1 REPLY 1
Highlighted

Re: Intergrating Hive with Kerberos

New Contributor

Hi,

wrong port

by default hiveserver2 is listening on port 10000.

change connection string from:

jdbc:hive2://ip-172-31-36-45.ec2.internal:1000/default;principal=hive/ip-172-31-36-45.ec2.internal@DEV.TSS

to

jdbc:hive2://ip-172-31-36-45.ec2.internal:10000/default;principal=hive/ip-172-31-36-45.ec2.internal@DEV.TSS

Don't have an account?
Coming from Hortonworks? Activate your account here