Support Questions

Find answers, ask questions, and share your expertise
Announcements
We’ve updated our product names and community labels - click here for full details

Unable to connect to hive after kerberos enabled from Dbeaver or any other tool

avatar
Explorer

We are working on below configuration platform.

Cloudera Version: CDP 7.1.2

Kerberos 5 version 1.15.1

Hive 3.1.3000.7.1.7.1000-141

Phoenix 5.1.5

After kerberos enabled on the platform, we are not able to connect to hive and phoenix from DBeaver or sql client.

2 REPLIES 2

avatar
Super Collaborator

Hi @SagarCapG 

what is the connection string you are using in dbeaver, and what error you are getting?

share your beeline connection string too.

avatar
Explorer

jdbc:hive2://<host>:10000

Error: Could not open client transport with JDBC Uri: .... Invalid status 21

If i use just 'beeline' command, i am able to connect to hive. However if i use below command, i am getting exception.

beeline -u jdbc:hive2://<host>:10000/default -n user -p pwd

23/10/23 23:22:31 [main]: WARN transport.TSaslTransport: Could not send failure response
org.apache.thrift.transport.TTransportException: java.net.SocketException: Connection reset

23/10/23 23:22:31 [main]: WARN jdbc.HiveConnection: Failed to connect to host:10000
log4j:ERROR Could not create an Appender. Reported error follows.
java.lang.ClassCastException: org.apache.log4j.ConsoleAppender cannot be cast to com.cloudera.hive.jdbc42.internal.apache.log4j.Appender
at com.cloudera.hive.jdbc42.internal.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:248)
at com.cloudera.hive.jdbc42.internal.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176)

log4j:WARN No appenders could be found for logger (com.cloudera.hive.jdbc42.internal.apache.thrift.transport.TSaslTransport).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Unknown HS2 problem when communicating with Thrift server.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://host:10000/default: Invalid status 21
Also, could not send response: org.apache.thrift.transport.TTransportException: java.net.SocketException: Connection reset (state=08S01,code=0)