ozw*_*5rd 0 authentication hadoop hive beeline
这个问题在这里很常见,有几种不同的风格。在这种情况下,我设置了一个没有身份验证的 HiveServer2 ( NOSASL ),它在 Python 中工作,我在其中使用 Impyla 库进行连接。当我使用直线连接时,无法获得有效的连接。
直线结束于:
 beeline> !connect jdbc:hive2://127.0.0.1:10000/default/hive
 Error: Could not open client transport with JDBC Uri: jdbc:hive2://127.0.0.1:10000/default/hive: null (state=08S01,code=0)
在 HiveServer2 日志中我有:
17/11/16 20:59:35 [HiveServer2-Handler-Pool: Thread-34]: ERROR server.TThreadPoolServer: Thrift error occurred during processing of message.
org.apache.thrift.protocol.TProtocolException: Missing version in readMessageBegin, old client?
    at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:228)
    at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:27)
    at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
    at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
有任何想法吗?
最后,我找到了解决方案。
\n\n!connect jdbc:hive2://127.0.0.1:10000/default/;auth=noSasl\n使用此我可以连接到 HiveServer2。\n此外,我正在使用 HiveServer2 进行开发,因此我在 root 下启动了进程,并且所有文件系统树都属于 root。由于这个选项,我在使用 beeline 登录 HiveServer2 时需要使用 root 用户:
\n\nConnecting to jdbc:hive2://127.0.0.1:10000/default/;auth=noSasl\nEnter username for jdbc:hive2://127.0.0.1:10000/default/;auth=noSasl: root\nEnter password for jdbc:hive2://127.0.0.1:10000/default/;auth=noSasl: \nConnected to: Apache Hive (version 1.2.2)\n我不需要提供密码,因为根本没有身份验证。现在我可以创建数据库和表。
\n\n这个“ \xe2\x80\x8bComparing Beeline to the Hive CLI ”是解决这个问题的有效参考。
\n| 归档时间: | 
 | 
| 查看次数: | 3240 次 | 
| 最近记录: |