Seyf Tunisien
Seyf Tunisien

Reputation: 41

Error while Happybase connection with hbase

>>>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

Upvotes: 4

Views: 3775

Answers (2)

Sheena
Sheena

Reputation: 16232

First, make sure the thrift server is running:

hbase thrift start

Then make sure you get the right port number (default 9090)\

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

Upvotes: 7

wouter bolsterlee
wouter bolsterlee

Reputation: 4037

This looks like a network problem. Did you actually start the Thrift server? (It's not the same process as the HBase daemon itself.)

Upvotes: 0

Related Questions