SuperSet连接Hive失败(客户端报日志拒绝连接)

先上报错,百度无数SuperSet的解决办法整了三四天无果后,打了两天游戏突然想到了个找问题的办法

INFO:thrift.transport.TSocket:Could not connect to ('192.168.228.131', 10000)
Traceback (most recent call last):
  File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/thrift/transport/TSocket.py", line 113, in open
    handle.connect(sockaddr)
  File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/gevent/_socket3.py", line 400, in connect
    raise error(err, strerror(err))
ConnectionRefusedError: [Errno 111] Connection refused
ERROR:thrift.transport.TSocket:Could not connect to any of [('192.168.228.131', 10000)]
Unexpected error Could not connect to any of [('192.168.228.131', 10000)]
ERROR:superset.views.core:Unexpected error Could not connect to any of [('192.168.228.131', 10000)]
[2020-05-17 21:04:52 +0800] [7951] [WARNING] Error sending message to statsd
Traceback (most recent call last):
  File "/opt/module/miniconda3/envs/superset/lib/python3.6/site-packages/gunicorn/instrument/statsd.py", line 127, in _sock_send
    self.sock.send(msg)
ConnectionRefusedError: [Errno 111] Connection refused

网上根本找不到拒绝连接的,一般都是报错的

先说解决办法:我改了三点,哪一点真正解决的自己验证

第一点:首先集群要启动,我一开始集群没启动疯狂连接,全是拒绝连接。然后启动Hive服务,到hive的bin目录下输入 ./hive --service hiveserver2 开启服务

第二点:在网上找的下载pyhive都是直接使用的pip install pyhive,然后我去官网查了下默认下载的最新版本0.6.2是2020的太新了,所以换了个版本换成上一个版本pip install pyhive==0.6.0

这三个也下载上

pip install sasl
pip install thrift
pip install thrift-sasl

第三点:还有修改hive.site.xml文件增加

 	<property>
  	  <name>hive.server2.authentication</name>
  	  <value>NONE</value>
	</property>

然后连接的时候使用hive://你自己的ip/要连接的数据库名?auth=NONE

然后我的问题就解决了,连接成功!!

开心。所以打游戏放松很重要!!并且白嫖了GTA5豪华版真刺激。

你可能感兴趣的:(遇到过的BUG)