Support Questions

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

Intergrating Hive with Kerberos

avatar
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

avatar
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

View solution in original post

1 REPLY 1

avatar
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