Support Questions
Find answers, ask questions, and share your expertise

Unable to connect to HIVE from CLI though the hiveserver2 is up and running

Explorer

[root@b7-40 ~]# hive
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-7.1.7-1.cdh7.1.7.p1000.24102687/jars/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-7.1.7-1.cdh7.1.7.p1000.24102687/jars/slf4j-log4j12-1.7.30.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.apache.logging.slf4j.Log4jLoggerFactory]
WARNING: Use "yarn jar" to launch YARN applications.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-7.1.7-1.cdh7.1.7.p1000.24102687/jars/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-7.1.7-1.cdh7.1.7.p1000.24102687/jars/slf4j-log4j12-1.7.30.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.apache.logging.slf4j.Log4jLoggerFactory]
Connecting to jdbc:hive2://b7-33.lab.archivas.com:2181,b7-40.lab.archivas.com:2181,b7-6.lab.archivas.com:2181/default;password=root;serviceDiscoveryMode=zooKeeper;ssl=true;user=root;zooKeeperNamespace=hiveserver2
22/04/29 03:00:25 [main]: WARN jdbc.HiveConnection: Failed to connect to b7-40.lab.archivas.com:10000
22/04/29 03:00:25 [main]: ERROR jdbc.Utils: Unable to read HiveServer2 configs from ZooKeeper
Unknown HS2 problem when communicating with Thrift server.
Error: Could not open client transport for any of the Server URI's in ZooKeeper: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (state=08S01,code=0)
Beeline version 3.1.3000.7.1.7.1000-141 by Apache Hive
beeline> !connect jdbc:hive2://b7-40.lab.archivas.com:10000
Connecting to jdbc:hive2://b7-40.lab.archivas.com:10000
Enter username for jdbc:hive2://b7-40.lab.archivas.com:10000: root
Enter password for jdbc:hive2://b7-40.lab.archivas.com:10000: ********
22/04/29 03:01:22 [main]: WARN jdbc.HiveConnection: Failed to connect to b7-40.lab.archivas.com:10000
Unknown HS2 problem when communicating with Thrift server.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://b7-40.lab.archivas.com:10000: Invalid status 21 (state=08S01,code=0)
beeline> !connect jdbc:hive2://b7-33.lab.archivas.com:10000
Connecting to jdbc:hive2://b7-33.lab.archivas.com:10000
Enter username for jdbc:hive2://b7-33.lab.archivas.com:10000: root
Enter password for jdbc:hive2://b7-33.lab.archivas.com:10000: ********
22/04/29 03:01:44 [main]: WARN jdbc.HiveConnection: Failed to connect to b7-33.lab.archivas.com:10000
Could not open connection to the HS2 server. Please check the server URI and if the URI is correct, then ask the administrator to check the server status.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://b7-33.lab.archivas.com:10000: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0)
beeline> !connect jdbc:hive2://b7-40.lab.archivas.com:10002
Connecting to jdbc:hive2://b7-40.lab.archivas.com:10002
Enter username for jdbc:hive2://b7-40.lab.archivas.com:10002: root
Enter password for jdbc:hive2://b7-40.lab.archivas.com:10002: ********
22/04/29 03:02:29 [main]: WARN jdbc.HiveConnection: Failed to connect to b7-40.lab.archivas.com:10002
Unknown HS2 problem when communicating with Thrift server.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://b7-40.lab.archivas.com:10002: Invalid status 21 (state=08S01,code=0)

0 REPLIES 0
; ;