2 tarenahuangdw tarenahuangdw 于 2016.03.24 13:04 提问

jdbc访问impala的时候加载驱动报错,怎样解决? 10C

java.sql.SQLException: [Simba]ImpalaJDBCDriver Error setting/closing session: {0}.
at com.cloudera.hivecommon.api.HS2Client.openSession(Unknown Source)
at com.cloudera.hivecommon.api.HS2Client.(Unknown Source)
at com.cloudera.hivecommon.api.HiveServer2ClientFactory.createClient(Unknown Source)
at com.cloudera.hivecommon.core.HiveJDBCCommonConnection.connect(Unknown Source)
at com.cloudera.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
at com.cloudera.jdbc.common.AbstractDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
Caused by: com.cloudera.support.exceptions.GeneralException: [Simba]ImpalaJDBCDriver Error setting/closing session: {0}.
... 8 more
Caused by: org.apache.thrift.TApplicationException: Invalid method name: 'OpenSession'
at org.apache.thrift.TApplicationException.read(TApplicationException.java:108)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:71)
at org.apache.hive.service.cli.thrift.TCLIService$Client.recv_OpenSession(TCLIService.java:159)
at com.cloudera.hivecommon.api.HS2ClientWrapper.recv_OpenSession(Unknown Source)
at org.apache.hive.service.cli.thrift.TCLIService$Client.OpenSession(TCLIService.java:146)
at com.cloudera.hivecommon.api.HS2ClientWrapper.OpenSession(Unknown Source)
at com.cloudera.hivecommon.api.HS2Client.openSession(Unknown Source)
at com.cloudera.hivecommon.api.HS2Client.(Unknown Source)
at com.cloudera.hivecommon.api.HiveServer2ClientFactory.createClient(Unknown Source)
at com.cloudera.hivecommon.core.HiveJDBCCommonConnection.connect(Unknown Source)
at com.cloudera.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
at com.cloudera.jdbc.common.AbstractDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.impala.test.Test.main(Test.java:23)

4个回答

qq_33353533
qq_33353533   2016.03.24 13:24

你的对像没有创建成功,返回的对象是空的,导致调用的时候无法连接

CSDNXIAOD
CSDNXIAOD   2016.03.30 11:21

关于SharePoint通过IP访问的时候报错问题
----------------------biu~biu~biu~~~在下问答机器人小D,这是我依靠自己的聪明才智给出的答案,如果不正确,你来咬我啊!

u011170540
u011170540   2016.08.19 14:50

我在tomcat上也遇到这个问题, 官网的解释是端口21050端口被占了, 所以设置为另外一个tomcat上就没问题.

The default port used by JDBC 2.0 and later (as well as ODBC 2.x) is 21050. Impala server accepts JDBC connections through this same port 21050 by default. Make sure this port is available for communication with other hosts on your network, for example, that it is not blocked by firewall software. If your JDBC client software connects to a different port, specify that alternative port number with the --hs2_port option when starting impalad. See Starting Impala for details about Impala startup options. See Ports Used by Impala for information about all ports used for communication between Impala and clients or between Impala components.

http://www.cloudera.com/documentation/archive/impala/2-x/2-1-x/topics/impala_jdbc.html#jdbc_port_unique_1

qq_26514171
qq_26514171   2017.06.09 16:25

楼主,解决了吗,我也遇到了同样的问题,能告诉下吗?谢谢了!

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!