Quantcast
Channel: Hortonworks » All Replies
Viewing all articles
Browse latest Browse all 3435

JDBC not connecting to secure HiveServer (Kerberos)

$
0
0

Hi Folks,
I am trying to run a Windows SQL client and connect via JDBC to a secured HiveServer2 (which happens to be on CentOS – not Windows).
I believe I am using Kerberos for authentication, but not using any encryption.

I am using SquirrelSQL as a nice Java based SQL client. I have given it all the Jars I think it needs and am trying to connect to

jdbc:hive2://MYHIVESERVER2MACHINE:10000/default;principal=hive/MYHIVESERVER2MACHINE@MYDOMAIN

I have two separate errors – which MAY be connected.
Firstly the system complains it cannot find native libraries. In some circumstances this is actually a failure, but I *think* for us we can get away with using Java based equivalents. We are not acting as a full blown hadoop client, but rather “just” a JDBC client. Am I write in that

Secondly it attempts to make the JDBC connection and errors with GSS initiate failed, BUT before it does that it also reports

javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]

which is more worrying.

I am doing a kinit from the command line before I am launching SquirrelSQL.
There is an old bug which means that certain versions of Java cannot read the kerberos ticket, but I am not sure that applies to us.
In any case the suggested solution is that I even found a blog post which suggested I renew the Kerberos tocket with kinit -R)

Does anyone have an idiot proof guide to how to create a kerberos aware JDBC client on Windows?

Thanks


Viewing all articles
Browse latest Browse all 3435

Trending Articles