Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

It requires specifying port number 443 when authenticating via username/password #31

Open
shawnzhu opened this issue Sep 10, 2021 · 1 comment

Comments

@shawnzhu
Copy link
Contributor

shawnzhu commented Sep 10, 2021

The current implementation will keep using default TCP port number 8080 from underneath DB-API driver even using HTTPS:

if password:
kwargs['http_scheme'] = 'https'
kwargs['auth'] = BasicAuthentication(username, password)

However, this could be documented or it will fail the connection with Connection timeout to port 8080.

Background

I found this error message from superset:

F [SupersetError(message="HTTPSConnectionPool(host='<trino-url>', port=8080): Max retries exceeded with url: /v1/statement (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f722688acd0>, 'Connection to <trino-url> timed out. (connect timeout=30.0)'))", error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'Trino', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})]

Which is obviously a problem of the port number (should use HTTPS port number instead of 8080)

@shawnzhu
Copy link
Contributor Author

will follow up under trinodb/trino-python-client#94

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant