Support Questions

Find answers, ask questions, and share your expertise

Sandbox refusing connection in http mode.

avatar
Contributor

In my HDP 2.3.2 Sandbox with no authorization for HiveServer2, I'm attempting to enable http mode, but connections are being "refused". See error thrown by beeline.

[root@sandbox ~]# beeline -u jdbc:hive2://sandbox.hortonworks.com:10001/default;transportMode=http;httpPath=cliservice

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://sandbox.hortonworks.com:10001/default

Error: Could not open client transport with JDBC Uri: jdbc:hive2://sandbox.hortonworks.com:10001/default: java.net.ConnectException: Connection refused (state=08S01,code=0)

Beeline version 1.2.1.2.3.2.0-2950 by Apache Hive

0: jdbc:hive2://sandbox.hortonworks.com:10001 (closed)>

6195-hivehttpsettings.png

1 ACCEPTED SOLUTION

avatar
Contributor

PEBCAK! After restarting Hive services a couple of times, and then surrounding my URI with single quotes, it appears all good.

First, made sure port 10001 is listening ...

[root@sandbox hive]# netstat -tulpna|grep 10001

tcp 0 0 0.0.0.0:10001 0.0.0.0:* LISTEN 25819/java

Then, attempted to connect with URI ...

beeline -u jdbc:hive2://sandbox.hortonworks.com:10001/default;transportMode=http;httpPath=cliservice

Finally, succeeded with URI ...

beeline -u 'jdbc:hive2://sandbox.hortonworks.com:10001/default;transportMode=http;httpPath=cliservice'

View solution in original post

10 REPLIES 10

avatar

@Brian Weissler

Is your cluster Kerberos?

!connect jdbc:hive2://beeline.server.example.com:10001/default;principal=hive/beeline.server.example.com@KRB_DOMAIN.EXAMPLE.COM;transportMode=http;httpPath=cliservice

The parts to note:

  • beeline.server.example.com : the node running HiveServer2
  • 10001 : the HiveServer2 port for client connections
  • hive/beeline.server.example.com@KRB_DOMAIN.EXAMPLE.COM : the kerberos principal for the "hive" user
  • transportMode=http : configure beeline or the client to use HTTP transport
  • httpPath=cliservice : the HTTP "path" to append to the URI

avatar
Contributor

Nope. It's just an HDP Sandbox. No authorization for Hive. No Kerberos at all.

avatar

@Brian Weissler

Can you please upload hive logs?

avatar
Contributor

Sorry, rather than searching it's probably faster to ask which logs you're looking for? Where can I find them?

avatar
@Brian Weissler

you can find hiveserver2.log under /var/log/hive directory.

avatar
Contributor

Doesn't appear to have much info, but maybe you can make something of this, hive.zip. Thanks!

avatar
Master Guru
@Brian Weissler

Is your hiveserver2 listening on 10001? You can test it by running netstat command on HS2 server

netstat -tulpna|grep 10001

avatar
Contributor

[root@sandbox ~]# netstat -tulpna|grep 10001

tcp 0 0 0.0.0.0:10001 0.0.0.0:* LISTEN 3478/java

tcp 0 0 10.211.55.5:42224 10.211.55.5:10001 TIME_WAIT -

avatar
Contributor

BTW ... getting a different error right now. I'll try to troubleshoot it.

[root@sandbox hive]# netstat -tulpna|grep 10001

tcp 0 0 0.0.0.0:10001 0.0.0.0:* LISTEN 3478/java

tcp 0 0 10.211.55.5:43108 10.211.55.5:10001 TIME_WAIT -

[root@sandbox hive]# beeline -u jdbc:hive2://localhost:10001/default;transportMode=http;httpPath=cliservice

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://localhost:10001/default

Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10001/default: Invalid status 72 (state=08S01,code=0)

Beeline version 1.2.1.2.3.2.0-2950 by Apache Hive

0: jdbc:hive2://localhost:10001/default (closed)>