On Friday, October 11, 2019 at 6:27:40 PM UTC+8, prabakar...@gmail.com wrote:
> python> conn = 
> hive.Connection(host="xx.xx.xxx.xxx",port=8889,username='hadoop')
> 
> C:\Users\Nova15>python
> Python 3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 64 
> bit (AMD64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from pyhive import hive
> >>> conn = hive.Connection(host="54.169.219.144",port=8889,username='hadoop')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File 
> "c:\users\nova15\appdata\local\programs\python\python37\lib\site-packages\pyhive\hive.py",
>  line 192, in __init__
>     self._transport.open()
>   File 
> "c:\users\nova15\appdata\local\programs\python\python37\lib\site-packages\thrift_sasl\__init__.py",
>  line 79, in open
>     message=("Could not start SASL: %s" % self.sasl.getError()))
> thrift.transport.TTransport.TTransportException: Could not start SASL: 
> b'Error in sasl_client_start (-4) SASL(-4): no mechanism available: Unable to 
> find a callback: 2'
> 
> 
> I am trying to connect from windows 10 local to Prestodb in AWS.

I've worked out some steps to make it work
basically it needs to find sasl2 folder, which located site-library/sasl(pip) 
or Library/bin(conda)
method 1: put sasl2 folder into C:\CMU\bin\
method 2: add an entry in registry, to the sasl2 folder, e.g.
HKEY_LOCAL_MACHINE\SOFTWARE\Carnegie Mellon\Project Cyrus\SASL 
Library\SearchPath
C:\Users\cdarling\Miniconda3\envs\hive\Library\bin\sasl2

I've replied related github issue too
https://github.com/dropbox/PyHive/issues/161
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to