Support Questions
Find answers, ask questions, and share your expertise

happybase not working

happybase not working

Master Collaborator

I am using HDP2.6, hbase 1.1.2 python 3.3.6

[root@hadoop1 conf]# /usr/hdp/current/hbase-master/bin/hbase-daemon.sh start thrift -p 9090 --infoport 9091starting thrift, logging to /var/log/hbase/hbase-root-thrift-hadoop1.out

>>> import happybase
>>> c = happybase.Connection('hadoop1',9090, autoconnect=False)
>>> c.open()
>>> print(c.tables())

Traceback (most recent call last):File "<stdin>", line 1, in <module>File "/usr/local/lib/python3.6/site-packages/happybase/connection.py", line 242, in tablesnames = self.client.getTableNames()File "/usr/local/lib/python3.6/site-packages/thriftpy/thrift.py", line 198, in _reqreturn self._recv(_api)File "/usr/local/lib/python3.6/site-packages/thriftpy/thrift.py", line 210, in _recvfname, mtype, rseqid = self._iprot.read_message_begin()File "thriftpy/protocol/cybin/cybin.pyx", line 439, in cybin.TCyBinaryProtocol.read_message_begin (thriftpy/protocol/cybin/cybin.c:6470)cybin.ProtocolError: No protocol version header>>>
4 REPLIES 4
Highlighted

Re: happybase not working

Explorer

Hi, I have the same problem. Did you solve it?

Highlighted

Re: happybase not working

Contributor

I got the same error with HappyBase. My code has been working fine for a few weeks. Somehow Thrift API stopped. I restarted the API and then I got this error.

Highlighted

Re: happybase not working

Contributor
Highlighted

Re: happybase not working

Expert Contributor

Thank You @Seaport for sharing the Solution for wider audience. In short, you followed the Link [1] to resolve the Protocol Header Issue as utilised by the User in Link [2]. 

 

- Smarak

 

[1] https://github.com/python-happybase/happybase/issues/161

[2] https://community.cloudera.com/t5/Support-Questions/Sharing-how-to-solve-HUE-and-HBase-connect-probl...