mistersister opened a new issue, #40294:
URL: https://github.com/apache/superset/issues/40294

   ### Bug description
   
   Hi,
   
   I'm trying to setup a connection to Trino on my dockerized superset. I fill 
all the fields but the Test Connection button always throws this error:
   ```
   ERROR: (builtins.NoneType) None
   [SQL: error 404: b'404 page not found\n']
   (Background on this error at: https://sqlalche.me/e/14/dbapi)
   ``` 
   
   I have installed the following packages using the requirements-local.txt 
file. Although I think the only one needed is "trino"
   ```
   pip list | grep trino
   sqlalchemy-trino               0.5.0
   trino                          0.330.0
   trino_connector                0.1.0
   ``` 
   
   I have also curled my trino server to make sure there is nothing wrong with 
it:
   ```
   curl -X POST https://XXXXXXXXX:443/v1/statement   -H "X-Trino-User: admin"   
-H "X-Trino-Catalog: XXXXX"   -H "X-Trino-Schema: default"   -d "SELECT 1"
   
{"id":"20260520_142539_00006_i229j","infoUri":"https://XXXXXXXXXXX/ui/query.html?20260520_142539_00006_i229j","nextUri":"https://XXXXXXXXXX/v1/statement/queued/20260520_142539_00006_i229j/y9d3242c1a99613d7f66924ae7dff659265a11523/1","stats":{"state":"QUEUED","queued":true,"scheduled":false,"nodes":0,"totalSplits":0,"queuedSplits":0,"runningSplits":0,"completedSplits":0,"planningTimeMillis":0,"analysisTimeMillis":0,"cpuTimeMillis":0,"wallTimeMillis":0,"queuedTimeMillis":0,"elapsedTimeMillis":0,"finishingTimeMillis":0,"physicalInputTimeMillis":0,"processedRows":0,"processedBytes":0,"physicalInputBytes":0,"physicalWrittenBytes":0,"internalNetworkInputBytes":0,"peakMemoryBytes":0,"spilledBytes":0},"warnings":[]}
   ``` 
   
   and the connection strings I have tried. all throw the same error.
   ```
   trino://admin@XXXXX:443
   trino://admin@XXXXX:443/{catalog}
   trino://admin@XXXXX:443/{catalog}/default?protocol=https
   ``` 
   
   Now, on our production superset 4.1 it works ok but in 6.1 it has been 
impossible to make it work.  Any help would be greatly appreciated.
   
   
   Versions:
   - Superset 6.1 (doccker-compose-non-dev)
   - Trino Server v477 (running in Kubernetes)
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   6.0.0
   
   ### Python version
   
   3.11
   
   ### Node version
   
   I don't know
   
   ### Browser
   
   Firefox
   
   ### Additional context
   
   This is what I can see in the log when I hit the test button:
   ```
   superset_app          | 2026-05-20 
15:24:07,772:DEBUG:superset.stats_logger:[stats_logger] (incr) 
test_connection_attempt
   superset_app          | 2026-05-20 
15:24:07,775:DEBUG:superset.models.core:Database._get_sqla_engine(). Masked 
URL: trino://admin@XXXX:443/
   superset_app          | 2026-05-20 
15:24:07,776:DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 
XXXX:443
   superset_app          | 2026-05-20 
15:24:07,871:DEBUG:urllib3.connectionpool:http://XXXX:443 "POST /v1/statement 
HTTP/1.1" 404 19
   superset_app          | 2026-05-20 
15:24:07,871:DEBUG:superset.stats_logger:[stats_logger] (incr) 
test_connection_error.DBAPIError
   superset_app          | 2026-05-20 
15:24:07,873:DEBUG:superset.stats_logger:[stats_logger] (incr) 
DatabaseRestApi.test_connection.warning
   superset_app          | 2026-05-20 
15:24:07,874:WARNING:superset.views.error_handling:SupersetErrorsException
   superset_app          | Traceback (most recent call last):
   superset_app          |   File 
"/app/superset/commands/database/test_connection.py", line 169, in run
   superset_app          |     raise DBAPIError(ex_str or None, None, None)
   superset_app          | sqlalchemy.exc.DBAPIError: (builtins.NoneType) None
   superset_app          | [SQL: error 404: b'404 page not found\n']
   superset_app          | (Background on this error at: 
https://sqlalche.me/e/14/dbapi)
   superset_app          | 
   superset_app          | The above exception was the direct cause of the 
following exception:
   superset_app          | 
   superset_app          | Traceback (most recent call last):
   superset_app          |   File 
"/app/.venv/lib/python3.11/site-packages/flask/app.py", line 1484, in 
full_dispatch_request
   superset_app          |     rv = self.dispatch_request()
   superset_app          |          ^^^^^^^^^^^^^^^^^^^^^^^
   superset_app          |   File 
"/app/.venv/lib/python3.11/site-packages/flask/app.py", line 1469, in 
dispatch_request
   superset_app          |     return 
self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
   superset_app          |            
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   superset_app          |   File 
"/app/.venv/lib/python3.11/site-packages/flask_appbuilder/security/decorators.py",
 line 109, in wraps
   superset_app          |     return f(self, *args, **kwargs)
   superset_app          |            ^^^^^^^^^^^^^^^^^^^^^^^^
   superset_app          |   File "/app/superset/views/base_api.py", line 120, 
in wraps
   superset_app          |     duration, response = time_function(f, self, 
*args, **kwargs)
   superset_app          |                          
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   superset_app          |   File "/app/superset/utils/core.py", line 1559, in 
time_function
   superset_app          |     response = func(*args, **kwargs)
   superset_app          |                ^^^^^^^^^^^^^^^^^^^^^
   superset_app          |   File "/app/superset/utils/log.py", line 301, in 
wrapper
   superset_app          |     value = f(*args, **kwargs)
   superset_app          |             ^^^^^^^^^^^^^^^^^^
   superset_app          |   File "/app/superset/views/base_api.py", line 92, 
in wraps
   superset_app          |     return f(self, *args, **kwargs)
   superset_app          |            ^^^^^^^^^^^^^^^^^^^^^^^^
   superset_app          |   File "/app/superset/databases/api.py", line 1281, 
in test_connection
   superset_app          |     TestConnectionDatabaseCommand(item).run()
   superset_app          |   File 
"/app/superset/commands/database/test_connection.py", line 211, in run
   superset_app          |     raise SupersetErrorsException(errors, 
status=400) from ex
   superset_app          | superset.exceptions.SupersetErrorsException: 
[SupersetError(message="(builtins.NoneType) None\n[SQL: error 404: b'404 page 
not found\\n']\n(Background on this error at: https://sqlalche.me/e/14/dbapi)", 
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.'}]})]
   superset_app          | 172.18.0.1 - - [20/May/2026:15:24:07 +0000] "POST 
/api/v1/database/test_connection/ HTTP/1.1" 400 357 
"https://ws1.bts.io/databaseview/list/?pageIndex=0&sortColumn=changed_on_delta_humanized&sortOrder=desc";
 "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 
Firefox/150.0" 
   ```
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to