【问题标题】:Error while Happybase connection with hbaseHappybase 与 hbase 连接时出错
【发布时间】:2013-03-11 06:32:45
【问题描述】:
>>>import happybase
>>>cnx=happybase.Connection('localhost')

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/seyf/envname/local/lib/python2.7/site-packages/happybase/api.py", line 121, in __init__
self.open()
File "/home/seyf/envname/local/lib/python2.7/site-packages/happybase/api.py", line 138, in open
self.transport.open()
File "/home/seyf/envname/local/lib/python2.7/site-packages/thrift/transport/TTransport.py", line 149, in open
return self.__trans.open()
File "/home/seyf/envname/local/lib/python2.7/site-packages/thrift/transport/TSocket.py", line 99, in open
message=message)
thrift.transport.TTransport.TTransportException: Could not connect to localhost:9090

【问题讨论】:

    标签: python hbase thrift happybase


    【解决方案1】:

    首先,确保 Thrift 服务器正在运行:

    hbase thrift start
    

    然后确保您获得正确的端口号(默认为 9090)\

    cnx=happybase.Connection('localhost', port=xxxx)
    

    【讨论】:

    • 为我工作,谢谢
    【解决方案2】:

    这看起来像是网络问题。你真的启动了 Thrift 服务器吗? (它与 HBase 守护进程本身不同。)

    【讨论】:

      猜你喜欢
      • 2023-03-19
      • 2017-05-31
      • 1970-01-01
      • 2015-11-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-12
      相关资源
      最近更新 更多