hiveserver2 tttransportexception:无效状态-128

dwbf0jvd  于 2021-06-26  发布在  Hive
关注(0)|答案(1)|浏览(1073)

我正在为配置单元使用一个名为jshs2的node.js客户端驱动程序,但是在连接到我们的hiveserver2时遇到了一个连接问题。我试图查找无效状态128,但没有成功。这是我的密码:

  1. const options = {
  2. auth: "NOSASL",
  3. host: "my host",
  4. port: 10000,
  5. timeout: 10000,
  6. username: "my username",
  7. password: "my password"
  8. hiveType: HS2Util.HIVE_TYPE.CDH,
  9. hiveVer: "0.13.1",
  10. thriftVer: "0.9.0",
  11. cdhVer: "5.3.3"
  12. };
  13. it('test', function() {
  14. var configuration = new Configuration(options);
  15. var idl = new IDLContainer();
  16. var cursor;
  17. return idl.initialize(configuration).then(function() {
  18. var connection = new HiveConnection(configuration, idl);
  19. return connection.connect();
  20. }).then(function(_cursor) {
  21. cursor = _cursor;
  22. return cursor.execute(options.query);
  23. }).then(function() {
  24. promise.delay(2000);
  25. logger.log('info', cursor.getOperationStatus());
  26. }).catch(function(error) {
  27. throw error;
  28. });
  29. });

服务器日志:

  1. java.lang.RuntimeException: org.apache.thrift.transport.TTransportException: Invalid status -128
  2. at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:219)
  3. at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:227)
  4. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  5. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  6. at java.lang.Thread.run(Thread.java:745)
  7. Caused by: org.apache.thrift.transport.TTransportException: Invalid status -128
  8. at org.apache.thrift.transport.TSaslTransport.sendAndThrowMessage(TSaslTransport.java:230)
  9. at org.apache.thrift.transport.TSaslTransport.receiveSaslMessage(TSaslTransport.java:184)
  10. at org.apache.thrift.transport.TSaslServerTransport.handleSaslStartMessage(TSaslServerTransport.java:125)
  11. at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:262)
  12. at org.apache.thrift.transport.TSaslServerTransport.open(TSaslServerTransport.java:41)
  13. at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:216)
  14. ... 4 more
3yhwsihp

3yhwsihp1#

参孙是对的。我的客户机中的身份验证设置与服务器所期望的不同。检查hiveserver2配置文件 hive-site.xml . 下面是一个片段:

  1. <property>
  2. <name>hive.server2.enable.doAs</name>
  3. <value>false</value>
  4. </property>
  5. <property>
  6. <name>hive.server2.use.SSL</name>
  7. <value>false</value>
  8. </property>
  9. <property>
  10. <name>hive.server2.authentication</name>
  11. <value>NOSASL</value>
  12. </property>

它没有 hive.server2.authentication 属性设置,所以我在其中添加了。有关文档参考,请参阅cloudera的odbc driver for apache hive安装指南第22页配置身份验证部分

相关问题