Support Questions

Find answers, ask questions, and share your expertise

Hive Beeline Connection Error

avatar
Expert Contributor
host:~> beeline -u "jdbc:hive2://host/default;" -n user
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.3.2.0-2950/spark/lib/spark-assembly-1.4.1.2.3.2.0-2950-hadoop2.7.1.2.3.2.0-2950.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.3.2.0-2950/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
WARNING: Use "yarn jar" to launch YARN applications.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.3.2.0-2950/spark/lib/spark-assembly-1.4.1.2.3.2.0-2950-hadoop2.7.1.2.3.2.0-2950.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.3.2.0-2950/hadoop/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Connecting to jdbc:hive2:host0/default;

Error: Could not open client transport with JDBC Uri: jdbc:hive2://hostname/default;: Peer indicated failure: Error validating the login (state=08S01,code=0)
6 REPLIES 6

avatar
Master Mentor

@zkfs

Can you also try specifying the Port as well Like:

# beeline -u "jdbc:hive2://erie3.example.com:10000/default;" -n user

.

Also in your case we see that the reason of failure is "Error validating the login (state=08S01,code=0)" Seems login validation related. What is the credential of user "-n user" here ? Are you passing value like:

# beeline --help | grep password
   -p <password>                   the password to connect as
   -w (or) --password-file <password file>  the password file to read password from

.

avatar
Master Mentor

@zkfs

By any chance are you using LDAP or Active Directory authentication?

If yes, then when you are getting the "Error validating the login (state=08S01,code=0)" on the "beeline" side please check the Hiveserver2 logs of the same timestamp you will definitely find the detail of the login failure. Please share the hiveserver log if you find anything strange.

avatar
Expert Contributor

I am getting this issur some users only , not all.

2 user only gettign an issue, while loggin to beeline

avatar
Master Mentor

@zkfs

As mentioned earlier, when you are getting the "Error validating the login (state=08S01,code=0)" on the "beeline" side please check the Hiveserver2 logs of the same timestamp you will definitely find the detail of the login failure. Please share the hiveserver log if you find anything strange.

avatar
Master Mentor

@zkfs

Is your cluster kerberized ? If so see below

Try this

$ beeline 
Beeline version 1.2.1000.2.5.3.0-37 by Apache Hive 
beeline> ! connect jdbc:hive2://london.nakuru.com:10000/;principal=hive/london.nakuru.com@NAKURU.COM 
Connecting to jdbc:hive2://london.nakuru.com:10000/;principal=hive/london.nakuru.com@NAKURU.COM
Enter username for jdbc:hive2://london.nakuru.com:10000/;principal=hive/london.nakuru.com@NAKURU.COM:xx
Enter password for jdbc:hive2://london.nakuru.com:10000/;principal=hive/london.nakuru.com@NAKURU.COM:xx
Connected to: Apache Hive (version 1.2.1000.2.5.3.0-37)
Driver: Hive JDBC (version 1.2.1000.2.5.3.0-37)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://london.nakuru.com:10000/> show databases;
+----------------+--+
| database_name  |
+----------------+--+
| default        |
| mbuzi          |
| slum           |
+----------------+--+
3 rows selected (2.863 seconds)

avatar
Expert Contributor
Error: Could not open client transport with JDBC Uri: jdbc:hive2://hostname/default;: Peer indicated failure: Error validating the login (state=08S01,code=0)

This was the issue due to Password, wrong given while beeline connection, after changing the password at OS level it went fine.