Transport exception

I am trying to import happybase, but the following error appears when connecting. I have a Hadoop pseudo-domain cluster and Hbase is already running. The version of the installed components is as follows: Hadoop version - 1.0.4 Hbase version - 0.94.4 happybase -0.4

Can anyone take a look at the below exceptions and let me know if any special tweaks or any recommendations to fix this.

Thank.

Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import happybase

connection = happybase.Connection('localhost')

Traceback (most recent call last):

 File "<stdin>", line 1, in <module>
    File "/Library/Python/2.6/site-packages/happybase/api.py", line 121, in __init__
    self.open()

    File "/Library/Python/2.6/site-packages/happybase/api.py", line 138, in open
    self.transport.open()

    File "/Library/Python/2.6/site-packages/thrift/transport/TTransport.py", line 149, in open
    return self.__trans.open()

    File "/Library/Python/2.6/site-packages/thrift/transport/TSocket.py", line 99, in open
    message=message)

    thrift.transport.TTransport.TTransportException: Could not connect to localhost:9090

      

+3


source to share


4 answers


make sure you take a lean server before trying to connect.



hbase thrift start -threadpool

      

+8


source


The trift server must be up and running. You also need to open your connection:

nohup hbase thrift start &

      

Open a Python connection before using:



connection.open()

      

Example:

#!/usr/bin/python
import happybase
connection = happybase.Connection('localhost', autoconnect=False)
connection.open()

      

0


source


connection = happybase.Connection('localhost','2181')

      

0


source


this worked for me:

sudo server hbase-thrift restart 

      

0


source







All Articles