Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Unable to HPLSQL proc from cli

Unable to HPLSQL proc from cli

New Contributor

Hi Team

Unable to execute the stored proc from the CLI. Getting following error. please advise.

bash-4.1$ ./hplsql -e 'select count(*) from my_job;'
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.5.3.0-37/hive2/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.5.3.0-37/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.apache.logging.slf4j.Log4jLoggerFactory]
Unhandled exception in HPL/SQL
java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000: java.net.ConnectException: Connection refused
  at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:209)
  at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107)
  at java.sql.DriverManager.getConnection(DriverManager.java:664)
  at java.sql.DriverManager.getConnection(DriverManager.java:247)
  at org.apache.hive.hplsql.Conn.openConnection(Conn.java:209)
  at org.apache.hive.hplsql.Conn.getConnection(Conn.java:162)
  at org.apache.hive.hplsql.Conn.executeQuery(Conn.java:58)
  at org.apache.hive.hplsql.Exec.executeQuery(Exec.java:556)
  at org.apache.hive.hplsql.Exec.executeQuery(Exec.java:565)
  at org.apache.hive.hplsql.Select.select(Select.java:75)
  at org.apache.hive.hplsql.Exec.visitSelect_stmt(Exec.java:1002)
  at org.apache.hive.hplsql.Exec.visitSelect_stmt(Exec.java:52)
  at org.apache.hive.hplsql.HplsqlParser$Select_stmtContext.accept(HplsqlParser.java:14768)
  at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:70)
  at org.apache.hive.hplsql.Exec.visitStmt(Exec.java:994)
  at org.apache.hive.hplsql.Exec.visitStmt(Exec.java:52)
  at org.apache.hive.hplsql.HplsqlParser$StmtContext.accept(HplsqlParser.java:1012)
  at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:70)
  at org.apache.hive.hplsql.HplsqlBaseVisitor.visitBlock(HplsqlBaseVisitor.java:28)
  at org.apache.hive.hplsql.HplsqlParser$BlockContext.accept(HplsqlParser.java:446)
  at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:70)
  at org.apache.hive.hplsql.Exec.visitProgram(Exec.java:901)
  at org.apache.hive.hplsql.Exec.visitProgram(Exec.java:52)
  at org.apache.hive.hplsql.HplsqlParser$ProgramContext.accept(HplsqlParser.java:389)
  at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:42)
  at org.apache.hive.hplsql.Exec.run(Exec.java:760)
  at org.apache.hive.hplsql.Exec.run(Exec.java:736)
  at org.apache.hive.hplsql.Hplsql.main(Hplsql.java:23)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:497)
  at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
  at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
Caused by: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused
  at org.apache.thrift.transport.TSocket.open(TSocket.java:226)
  at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:266)
  at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
  at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:227)
  at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:182)
  ... 33 more
Caused by: java.net.ConnectException: Connection refused
  at java.net.PlainSocketImpl.socketConnect(Native Method)
  at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
  at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
  at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
  at java.net.Socket.connect(Socket.java:589)
  at org.apache.thrift.transport.TSocket.open(TSocket.java:221)
  ... 37 more
Don't have an account?
Coming from Hortonworks? Activate your account here