Bug description
After Upgrading Superset to 5.0.0 (release), I can't query my Apache Doris (3.0.6) Installation - Dashboards are fine.
Error: Apache Doris Error: (MySQLdb.OperationalError) (2013, "Lost connection to server at 'reading authorization packet', system error: 11")
(Background on this error at: https://sqlalche.me/e/14/e3q8)
This may be triggered by: Issue 1002 - The database returned an unexpected error. See less
Screenshots/recordings
Superset version
5.0.0
Python version
3.11
Node version
Not applicable
Browser
Chrome
Additional context
No response
Checklist
- [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] 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.
Comment From: dosubot[bot]
Hi @wakkorottix! I'm Dosu and I’m helping the superset team.
This error is likely caused by a driver mismatch or missing driver after the upgrade. Superset expects the pydoris driver for Doris connections—if it's missing or not registered, SQLAlchemy may fall back to a MySQL driver like MySQLdb, which can cause handshake/authentication errors like the one you’re seeing (source).
Check that the pydoris package is installed in your environment and that your Doris connection URI uses the correct dialect (e.g., doris://
or pydoris://
). If you see mysql://
or mysqldb://
in your connection string, update it to use the Doris driver. There are no breaking changes in Superset 5.0.0 that would affect Doris connections directly, but the environment and installed drivers are critical for compatibility (source).
If pydoris is installed and the URI is correct but the issue persists, try reinstalling the driver or testing the connection outside of Superset to isolate the problem. Let me know if you need help with the exact connection string format or further troubleshooting.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Comment From: wakkorottix
@dosu pydoris is installed - upgraded from 1.0.3 (superset) pi@pi5b:~ $ pip list |grep doris pydoris 1.0.6
Test Database also works with doris://bme280:XXXXXXXXXX@pi5b:9030/bme280 or pydoris://bme280:XXXXXXXXXX@pi5b:9030/bme280
also a fresh install didn't help
Comment From: dosubot[bot]
Thanks for confirming pydoris is installed and the connection string is correct. Superset 5.0.0 is designed to use pydoris for Doris connections, and there are no known compatibility issues or breaking changes in this area—if you see MySQLdb.OperationalError, it usually means Superset is falling back to a MySQL driver, often because pydoris isn’t being picked up by SQLAlchemy as expected12.
A few things to check: - Make sure the Python environment running Superset is the same one where you installed pydoris (sometimes there are multiple environments or virtualenv confusion). - Double-check that the connection URI in Superset’s database config is exactly doris:// or pydoris:// (not mysql://). - Try restarting all Superset processes after upgrading pydoris to ensure the new driver is loaded. - If possible, run a quick SQLAlchemy test outside Superset to confirm pydoris is registered and can connect.
If you can, grab the detailed Superset logs for a failed Doris query—sometimes the stacktrace gives more clues about where the fallback is happening.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Comment From: wakkorottix
@dosu pydoris is installed in the environment, because i can test the connection and it's fine.
The only errors in the log i can found are: Jun 28 14:27:14 pi5b gunicorn[5583]: sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:doris Jun 28 14:27:14 pi5b gunicorn[5583]: 2025-06-28 14:27:14,873:ERROR:superset.views.error_handling:Can't load plugin: sqlalchemy.dialects:doris Jun 28 14:27:14 pi5b gunicorn[5583]: sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:doris
Jul 04 18:04:08 pi5b gunicorn[72297]: superset.exceptions.SupersetErrorsException: [SupersetError(message='(MySQLdb.OperationalError) (2013, "Lost connection to server at \'reading authorization packet\', system error: 11")\n(Background on this error at: https://sqlalche.me/e/14/e3q8)', error_type=
Comment From: dosubot[bot]
The error means SQLAlchemy can't find the Doris dialect plugin, even though pydoris is installed. This usually happens if the pydoris package isn't registering the 'doris' dialect correctly with SQLAlchemy's entry_points system, or if Superset and pydoris are in different Python environments. Superset expects pydoris to provide the dialect—if it's missing or misconfigured, you'll see this error, and Superset will fall back to MySQLdb, which can't connect to Doris properly (source).
To troubleshoot:
1. In the same environment where Superset runs, check the entry_points for SQLAlchemy dialects:
python -m importlib.metadata entry_points | grep doris
or, for older Python:
python -c "import pkg_resources; print([ep for ep in pkg_resources.iter_entry_points('sqlalchemy.dialects') if 'doris' in ep.name])"
You should see something like doris = pydoris.sqlalchemy_doris:DorisDialect
.
-
Make sure Superset and pydoris are installed in the same Python environment (
which python
,pip list
). -
If the 'doris' entry_point is missing, try reinstalling pydoris (
pip install --force-reinstall pydoris
). If it still doesn't show up, there may be a packaging issue with pydoris itself.
Superset doesn't register the Doris dialect; it relies on pydoris to do this via its packaging metadata. If the entry_point is missing or broken, that's a pydoris packaging/environment issue, not a Superset bug (source).
Let me know what you find with the entry_points check!
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Comment From: wakkorottix
@dosu
with python -m importlib.metadata entry_points | grep doris it get /home/pi/superset/bin/python: No module named importlib.metadata.main; 'importlib.metadata' is a package and cannot be directly executed
Comment From: dosubot[bot]
That error happens because importlib.metadata is a Python module, not a CLI tool—you can't run it with python -m importlib.metadata. To check if the 'doris' dialect is registered, run this Python script in the same environment as Superset:
try:
# Python 3.8+
from importlib.metadata import entry_points
eps = entry_points()
dialects = eps.select(group='sqlalchemy.dialects') if hasattr(eps, 'select') else eps.get('sqlalchemy.dialects', [])
print("SQLAlchemy dialect entry_points containing 'doris':")
for ep in dialects:
if 'doris' in ep.name:
print(f"{ep.name} = {ep.value}")
except ImportError:
# Fallback for older environments
try:
import pkg_resources
print("SQLAlchemy dialect entry_points containing 'doris':")
for ep in pkg_resources.iter_entry_points('sqlalchemy.dialects'):
if 'doris' in ep.name:
print(f"{ep.name} = {ep.module_name}:{ep.attrs[0]}")
except ImportError:
print("Neither importlib.metadata nor pkg_resources is available.")
If you see a line like doris = pydoris.sqlalchemy_doris:DorisDialect
, the registration is correct. If nothing prints, pydoris isn't registering the dialect—try pip install --force-reinstall pydoris
and make sure you're using the same Python environment as Superset. If the entry_point is present but you still get the error, there may be a packaging or environment issue.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Comment From: wakkorottix
@dosu with your code i get doris = pydoris.sqlalchemy.dialect:DorisDialect pydoris = pydoris.sqlalchemy.dialect:DorisDialect
so i think that should be fine?
Comment From: wakkorottix
@dosu after switching back to superset 4.1.2, everything is fine, and it's the same environment