Reply
New Contributor
Posts: 1
Registered: ‎08-28-2018

Getting Login Exception With JDBC Hive Connection

Hi,

 

I'm trying to connect to an external Hive server in my Spark code and execute some Hive queries as part of our job. The server has Keberos authentication, and when I provide what I believe is the correct Hive JDBC URL, I get the following error:

 

Caused by: javax.security.auth.login.LoginException: Receive timed out
at com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:767)
at com.sun.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:584)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:762)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:690)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:687)
at javax.security.auth.login.LoginContext.login(LoginContext.java:595)

 

The code to make the connection is a little long but has worked in a lower environment before, so I think there might be something environment-specific not allowing everything to go through as expected. Any ideas?

 

Thanks so much.

Cloudera Employee
Posts: 573
Registered: ‎03-23-2015

Re: Getting Login Exception With JDBC Hive Connection

It looks like timed out from KDC server, have you tried to kinit as a normal user and see if you get similar error? Please check the krb5.conf file to see if it points to the correct KDC server.
Announcements