{"action":"created","issue":{"url":"https://api.github.com/repos/dropbox/PyHive/issues/202","repository_url":"https://api.github.com/repos/dropbox/PyHive","labels_url":"https://api.github.com/repos/dropbox/PyHive/issues/202/labels{/name}","comments_url":"https://api.github.com/repos/dropbox/PyHive/issues/202/comments","events_url":"https://api.github.com/repos/dropbox/PyHive/issues/202/events","html_url":"https://github.com/dropbox/PyHive/issues/202","id":314230986,"node_id":"MDU6SXNzdWUzMTQyMzA5ODY=","number":202,"title":"thrift.transport.TTransport.TTransportException: TSocket read 0 bytes","user":{"login":"pramodvspk","id":7676171,"node_id":"MDQ6VXNlcjc2NzYxNzE=","avatar_url":"https://avatars1.githubusercontent.com/u/7676171?v=4","gravatar_id":"","url":"https://api.github.com/users/pramodvspk","html_url":"https://github.com/pramodvspk","followers_url":"https://api.github.com/users/pramodvspk/followers","following_url":"https://api.github.com/users/pramodvspk/following{/other_user}","gists_url":"https://api.github.com/users/pramodvspk/gists{/gist_id}","starred_url":"https://api.github.com/users/pramodvspk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pramodvspk/subscriptions","organizations_url":"https://api.github.com/users/pramodvspk/orgs","repos_url":"https://api.github.com/users/pramodvspk/repos","events_url":"https://api.github.com/users/pramodvspk/events{/privacy}","received_events_url":"https://api.github.com/users/pramodvspk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-13T19:52:10Z","updated_at":"2018-06-01T14:19:37Z","closed_at":null,"author_association":"NONE","body":"Hi, I am using PyHive to access Kerberos authenticated Hive cluster.\r\n\r\n```\r\nfrom pyhive import hive\r\nconn = hive.Connection(host='XXX', port=10001, auth='KERBEROS', database='XXX', kerberos_service_name='hive')\r\n```\r\n\r\nI get the error\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/home/ksripada/.local/lib/python2.7/site-packages/pyhive/hive.py\", line 162, in __init__\r\n    self._transport.open()\r\n  File \"/usr/local/anaconda4/lib/python2.7/site-packages/thrift_sasl/__init__.py\", line 80, in open\r\n    status, payload = self._recv_sasl_message()\r\n  File \"/usr/local/anaconda4/lib/python2.7/site-packages/thrift_sasl/__init__.py\", line 101, in _recv_sasl_message\r\n    payload = read_all_compat(self._trans, length)\r\n  File \"/usr/local/anaconda4/lib/python2.7/site-packages/thrift_sasl/six.py\", line 31, in <lambda>\r\n    read_all_compat = lambda trans, sz: trans.readAll(sz)\r\n  File \"/home/ksripada/.local/lib/python2.7/site-packages/thrift/transport/TTransport.py\", line 60, in readAll\r\n    chunk = self.read(sz - have)\r\n  File \"/home/ksripada/.local/lib/python2.7/site-packages/thrift/transport/TSocket.py\", line 132, in read\r\n    message='TSocket read 0 bytes')\r\nthrift.transport.TTransport.TTransportException: TSocket read 0 bytes\r\n```\r\n\r\nPyHive Version: 0.5.1\r\nthrift Version: 0.10.0\r\nsasl Version: 0.2.1\r\nthrift-sasl Version: 0.2.1\r\n\r\nI have tried all possible approaches by following the issues on PyHive but still was getting the same error. Could any one please let me know if I am using the wrong version of Python modules."},"comment":{"url":"https://api.github.com/repos/dropbox/PyHive/issues/comments/393895187","html_url":"https://github.com/dropbox/PyHive/issues/202#issuecomment-393895187","issue_url":"https://api.github.com/repos/dropbox/PyHive/issues/202","id":393895187,"node_id":"MDEyOklzc3VlQ29tbWVudDM5Mzg5NTE4Nw==","user":{"login":"Sarnath","id":1013251,"node_id":"MDQ6VXNlcjEwMTMyNTE=","avatar_url":"https://avatars1.githubusercontent.com/u/1013251?v=4","gravatar_id":"","url":"https://api.github.com/users/Sarnath","html_url":"https://github.com/Sarnath","followers_url":"https://api.github.com/users/Sarnath/followers","following_url":"https://api.github.com/users/Sarnath/following{/other_user}","gists_url":"https://api.github.com/users/Sarnath/gists{/gist_id}","starred_url":"https://api.github.com/users/Sarnath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sarnath/subscriptions","organizations_url":"https://api.github.com/users/Sarnath/orgs","repos_url":"https://api.github.com/users/Sarnath/repos","events_url":"https://api.github.com/users/Sarnath/events{/privacy}","received_events_url":"https://api.github.com/users/Sarnath/received_events","type":"User","site_admin":false},"created_at":"2018-06-01T14:19:37Z","updated_at":"2018-06-01T14:19:37Z","author_association":"NONE","body":"\r\nI had the same problem where the python program will simply fail with this error message immediately... So, thats not a timeout problem.\r\nIt turned out that the hiveserver2 was running with \"http\" as the transport mode. I changed that to \"binary\" and pyhive worked like a charm.\r\nHope this helps some1"}}
{"actor":{"display_login":"Sarnath"}}