You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/02/16 14:44:28 UTC
[GitHub] SanjayJosh commented on issue #4445: SQLAlchemy URI to connect to a Presto Database with LDAP authentication.
SanjayJosh commented on issue #4445: SQLAlchemy URI to connect to a Presto Database with LDAP authentication.
URL: https://github.com/apache/incubator-superset/issues/4445#issuecomment-366254118
For
presto://username:password@hostname:8080/catalog/schema
with
{
'protocol':'https'
},
the stack python stack trace is:
````During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/s0j00os/anaconda3/lib/python3.6/site-packages/superset/views/core.py", line 1508, in testconn
return json_success(json.dumps(engine.table_names(), indent=4))
File "/Users/s0j00os/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2128, in table_names
return self.dialect.get_table_names(conn, schema)
File "/Users/s0j00os/anaconda3/lib/python3.6/site-packages/pyhive/sqlalchemy_presto.py", line 193, in get_table_names
return [row.Table for row in connection.execute(query)]
File "/Users/s0j00os/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 939, in execute
return self._execute_text(object, multiparams, params)
File "/Users/s0j00os/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1097, in _execute_text
statement, parameters
File "/Users/s0j00os/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context
context)
File "/Users/s0j00os/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1405, in _handle_dbapi_exception
util.reraise(*exc_info)
File "/Users/s0j00os/anaconda3/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 187, in reraise
raise value
File "/Users/s0j00os/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
context)
File "/Users/s0j00os/anaconda3/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute
cursor.execute(statement, parameters)
File "/Users/s0j00os/anaconda3/lib/python3.6/site-packages/pyhive/presto.py", line 205, in execute
url, data=sql.encode('utf-8'), headers=headers, **self._requests_kwargs)
File "/Users/s0j00os/anaconda3/lib/python3.6/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/Users/s0j00os/anaconda3/lib/python3.6/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/s0j00os/anaconda3/lib/python3.6/site-packages/requests/sessions.py", line 513, in request
resp = self.send(prep, **send_kwargs)
File "/Users/s0j00os/anaconda3/lib/python3.6/site-packages/requests/sessions.py", line 623, in send
r = adapter.send(request, **kwargs)
File "/Users/s0j00os/anaconda3/lib/python3.6/site-packages/requests/adapters.py", line 504, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='hostname', port=8443): Max retries exceeded with url: /v1/statement (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x1094b8cf8>: Failed to establish a new connection: [Errno 60] Operation timed out',))
````
I have already tried running a presto client on the worker presto node directly, and that works fine.
My guess is that I need the right URI format to also somehow add in the LDAP authentication of the Database.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services