Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SASL Error: no mechanism available: No worthy mechs found

See original GitHub issue

When trying to connect to an Impala Server, the following error happens:

>>> from impala.dbapi import connect
>>> conn = connect(host='xxxxxxxxxx', port=21050, user='xxxxxx', password='xxxxxx', auth_mechanism='LDAP')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.6/site-packages/impala/", line 82, in connect
  File "/usr/local/lib/python2.6/site-packages/impala/", line 586, in connect
  File "/usr/local/lib/python2.6/site-packages/thrift_sasl/", line 72, in open
    message=("Could not start SASL: %s" % self.sasl.getError()))
thrift.transport.TTransport.TTransportException: Could not start SASL: Error in sasl_client_start (-4) SASL(-4): no mechanism available: No worthy mechs found

Even with all LDAP dependencies installed.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:46 (14 by maintainers)

github_iconTop GitHub Comments

charlietsaicommented, Jun 19, 2018

for what it’s worth, this solved it for me

apt-get install libsasl2-dev libsasl2-2 libsasl2-modules-gssapi-mit

running python in Docker

pyite1commented, Jun 21, 2016

I have this working now on a CentOS install of Anaconda. I think that the critical aspect in getting this functioning was installing several sasl related packages on CentOS itself.

$conda list 
impyla                    0.13.8                    <pip>
thrift                    0.9.3                     <pip>
thrift-sasl               0.2.0                     <pip>
thriftpy                  0.3.8                     <pip>
sasl                      0.2.1                     <pip>

I was unable to compile SASL on Windows (or any of the CentOS) packages, so leveraged the CentOS VM to connect to the Kerberos cluster.

After successfully running a kinit, I am able to connect with the following string:

con = impala.connect(host='xxxxxxxxxxxxx', port=21050, auth_mechanism='GSSAPI',

LDAP conection works as well:

con = impala.connect(host='xxxxxx', 
                             user='xxxxx', password=pwd,
Read more comments on GitHub >

github_iconTop Results From Across the Web

SASL(-4): no mechanism available: No worthy mechs found ...
The following error is encountered when trying to connect to the CDH cluster using the MicroStrategy DB query tool or the command line...
Read more >
SASL authentication failure: No worthy mechs found
I'm running it in a Hyper-V VM if that's a factor (likely not). ... failure: No worthy mechs found," or "SASL authentication failed; ......
Read more >
"No worthy mechs found" when trying to relay email to Gmail ...
Just installing postfix doesn't pull in the cyrus-sasl-plain package ... (this changed from Fedora 26). – maxschlepzig. Apr 3, 2018 at 8:51.
Read more >
python cannot connect hiveserver2 - Stack Overflow
You are missing some dependencies, make sure you install cyrus-sasl-devel and cyrus-sasl-gssapi : On an RHEL-based distro: sudo yum install cyrus-sasl-devel ...
Read more >
Error in sasl_client_start (-4) SASL(-4): no mechanism available
pyhs2.connect(host='localhost',port=10000,authMechanism="PLAIN" ... Error in sasl_client_start (-4) SASL(-4): no mechanism available: No worthy mechs found
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found