client hangs when connecting to HiveServer2
See original GitHub issueWhen I try to run the following code, the client hangs when trying to connect to Hive:
from impala.dbapi import connect
conn = connect(host='host_running_hs2_service', port=10000, user='awoolford', password='Bzzzzz')
cursor = conn.cursor() <- hangs here
cursor.execute('show tables')
results = cursor.fetchall()
print results
I was able to connect to HiveServer2, via a Java client, and so it seems that the connectivity issue is Python/Impyla specific. When I debug/step-into, the code hangs at line 873 of hiveserver2.py.
Hive 1.1.0-cdh5.5.1 Python 2.7.11 | Anaconda 2.3.0 Impyla installed by pip today (2016-03-07).
Do you have any thoughts/suggestions?
Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
impyla hangs when connecting to HiveServer2 - Stack Overflow
I saw this "hangs forever" thing happens when a non-secure client tries to connect to a secure server. In this case, the server...
Read more >Solved: Beeline connection hangs without any error - 190711
After analyzing Hiveserver logs we found that Hiveserver was unable to create new threads and hence Hive queries are not working. This is...
Read more >Using the HiveServer2 JDBC new connections to Hadoop ...
Whilst attempting to use a HiveServer2 JDBC connection, the connection hangs providing no error to the client for diagnosis.
Read more >Re: JDBC/beeline client hangs with HiverServer2 (0.13.1)
Re: JDBC/beeline client hangs with HiverServer2 (0.13.1) ... The setting you want is: hive.server2.authentication – Authentication mode, ...
Read more >Creating a Hive Server 2 Connection Hangs When Saving – Datameer
Problem When creating a Hive Server 2 Connection in Datameer, the user completes all the required fields and then clicks Save. The next......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@alexwoolford @wesm I was facing the same issue. Changing the auth_mechanism to ‘PLAIN’ worked for me. Here’s the documentation in the code:
auth_mechanism : {'NOSASL', 'PLAIN', 'GSSAPI', 'LDAP'} Specify the authentication mechanism.
'NOSASL’for unsecured Impala.
'PLAIN’for unsecured Hive (because Hive requires the SASL transport).
'GSSAPI’for Kerberos and
’LDAP’for Kerberos with LDAP.
The default used is NOSASL:def connect(host='localhost', port=21050, database=None, timeout=None, use_ssl=False, ca_cert=None, auth_mechanism='NOSASL', user=None, password=None, kerberos_service_name='impala', use_ldap=None, ldap_user=None, ldap_password=None, use_kerberos=None, protocol=None):
@DVAlexHiggs Hi Alex, I also faced this issue. When I do fetchall() keep stopping without end or error.
I wonder if you solved this problem. Thanks!