thriftpy2.protocol.exc.TProtocolException: No protocol version header Traceback (most recent call last): File "D:\Anaconda\lib\site-packages\thriftpy2\transport\socket.py", line 96, in open self.sock.connect(addr) ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "E:/Code/PyCharm/Spark实训/test.py", line 13, in <module> connection.open() File "D:\Anaconda\lib\site-packages\happybase\connection.py", line 176, in open self.transport.open() File "D:\Anaconda\lib\site-packages\thriftpy2\transport\buffered\__init__.py", line 29, in open return self._trans.open() File "D:\Anaconda\lib\site-packages\thriftpy2\transport\socket.py", line 105, in open message="Could not connect to %s" % str(addr)) thriftpy2.transport.base.TTransportException: TTransportException(type=1, message="Could not connect to ('hadoop102', 9090)")
使用happybase连接HBase时出现上面的问题,经过一番排查,发现是HBase的Thrift服务没有启动
bin/hbase-daemon.sh start thrift