Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

happybase not working

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

avatar
Explorer

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

avatar
Expert 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.

avatar
Expert Contributor

avatar
Super Collaborator

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