It requires specifying port number `443` when authenticating via username/password
shawnzhu opened this issue · 1 comments
shawnzhu commented
The current implementation will keep using default TCP port number 8080
from underneath DB-API driver even using HTTPS:
sqlalchemy-trino/sqlalchemy_trino/dialect.py
Lines 92 to 94 in 5aea362
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 commented
will follow up under trinodb/trino-python-client#94