dosubot[bot] commented on issue #37281: URL: https://github.com/apache/superset/issues/37281#issuecomment-3772074806
<!-- Answer --> Superset uses the system-installed pydruid package, so if your patched version is installed in the same Python environment as Superset, it should be used for Druid connections ([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/__init__.py#L61-L167)). The connection parameters you set in the UI's Advanced/Engine Parameters are passed through to SQLAlchemy, and the Druid engine spec does not filter or modify Kerberos-related connect_args—only SSL parameters if a server certificate is present ([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/druid.py#L20-L141)). The generic DBAPIError with NoneType you see means the underlying exception wasn't properly propagated or logged, which can happen if the error message is empty or lost in the connection test flow ([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/commands/database/test_connection.py#L63-L226)). This makes debugging tricky. Here are some targeted steps to help you troubleshoot: 1. **Double-check your Python environment:** Make sure Superset and your CLI test are running in the exact same environment (same Python, same pydruid install, same dependencies). 2. **Validate your connect_args structure:** In Superset, try placing your connect_args inside the `engine_params` block in the "Extras" field, like: ```json { "engine_params": { "connect_args": { "kerberos": true, "kerberos_principal": "toto%40DONUT.COM", "kerberos_password": "mypassword!", "kerberos_service": "HTTP", "ssl_verify_cert": false } } } ``` This matches how Superset expects advanced parameters for Druid. 3. **Check for environment differences:** Kerberos can depend on environment variables (like `KRB5_CONFIG`, `KRB5CCNAME`, etc.). Make sure these are set identically in both your CLI and the Superset process. 4. **Increase logging:** If possible, run Superset with debug logging or check the Superset server logs for any additional error details that might not surface in the UI. If you still get the generic error, try a minimal connect_args (just `{"scheme": "https", "ssl_verify_cert": false}`) to confirm basic connectivity, then add Kerberos parameters one by one. Let me know what you find—if you get a more detailed error message in the logs, that will help narrow things down! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/6bcad6f6-6604-461a-b5ba-fd127937d167?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/6bcad6f6-6604-461a-b5ba-fd127937d167?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/6bcad6f6-6604-461a-b5ba-fd127937d167?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/6bcad6f6-6604-461a-b5ba-fd127937d167?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/6bcad6f6-6604-461a-b5ba-fd127937d167?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/6bcad6f6-6604-461a-b5ba-fd127937d167?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/6bcad6f6-6604-461a-b5ba-fd127937d167?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=Superset%20uses%20the%20system-installed%20pydruid%20package%2C%20so%20if%20your%20patched%20version%20is%20installed%20in%20the%20same%20Python%20environment%20as%20Superset%2C%20it%20should%20be%20used%20for%20Druid%20connections%C2%A0%28%5Bsource%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/__init__.py%23L61-L167%29%29.%20The%20connection%20parameters%20you%20set%20in%20the%20UI%27s%20Advanced/Engine%20Parameters%20are%20passed%20through%20to%20SQLAlchemy%2C%20and%20the%20Druid%20engine%20spec%20does%20not%20filter%20or%20modify%20Kerberos-related%20connect_args%E2%80%94only%20SSL%20parameters%20if%20a%20server%20certificate%20is%20present%C2%A0%28%5Bsource%5D%28https%3A//github .com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/druid.py%23L20-L141%29%29.%0A%0AThe%20generic%20DBAPIError%20with%20NoneType%20you%20see%20means%20the%20underlying%20exception%20wasn%27t%20properly%20propagated%20or%20logged%2C%20which%20can%20happen%20if%20the%20error%20message%20is%20empty%20or%20lost%20in%20the%20connection%20test%20flow%C2%A0%28%5Bsource%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/commands/database/test_connection.py%23L63-L226%29%29.%20This%20makes%20debugging%20tricky.%0A%0AHere%20are%20some%20targeted%20steps%20to%20help%20you%20troubleshoot%3A%0A%0A1.%20%2A%2ADouble-check%20your%20Python%20environment%3A%2A%2A%20Make%20sure%20Superset%20and%20your%20CLI%20test%20are%20running%20in%20the%20exact%20same%20environment%20%28same%20Python%2C%20same%20pydruid%20install%2C%20same%20dependencies%29.%0A2.%20%2A%2AValidate%20your%20connect_args%20structure%3A%2A%2A%20In%20 Superset%2C%20try%20placing%20your%20connect_args%20inside%20the%20%60engine_params%60%20block%20in%20the%20%22Extras%22%20field%2C%20like%3A%0A%20%20%20%60%60%60json%0A%20%20%20%7B%0A%20%20%20%20%20%22engine_params%22%3A%20%7B%0A%20%20%20%20%20%20%20%22connect_args%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%22kerberos%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%22kerberos_principal%22%3A%20%22toto%2540DONUT.COM%22%2C%0A%20%20%20%20%20%20%20%20%20%22kerberos_password%22%3A%20%22mypassword%21%22%2C%0A%20%20%20%20%20%20%20%20%20%22kerberos_service%22%3A%20%22HTTP%22%2C%0A%20%20%20%20%20%20%20%20%20%22ssl_verify_cert%22%3A%20false%0A%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%7D%0A%20%20%20%7D%0A%20%20%20%60%60%60%0A%20%20%20This%20matches%20how%20Superset%20expects%20advanced%20parameters%20for%20Druid.%0A3.%20%2A%2ACheck%20for%20environment%20differences%3A%2A%2A%20Kerberos%20can%20depend%20on%20environment%20variables%20%28like%20%60KRB5_CONFIG%60%2C%20%60KRB5CCNAME%60%2C%20etc.%29. %20Make%20sure%20these%20are%20set%20identically%20in%20both%20your%20CLI%20and%20the%20Superset%20process.%0A4.%20%2A%2AIncrease%20logging%3A%2A%2A%20If%20possible%2C%20run%20Superset%20with%20debug%20logging%20or%20check%20the%20Superset%20server%20logs%20for%20any%20additional%20error%20details%20that%20might%20not%20surface%20in%20the%20UI.%0A%0AIf%20you%20still%20get%20the%20generic%20error%2C%20try%20a%20minimal%20connect_args%20%28just%20%60%7B%22scheme%22%3A%20%22https%22%2C%20%22ssl_verify_cert%22%3A%20false%7D%60%29%20to%20confirm%20basic%20connectivity%2C%20then%20add%20Kerberos%20parameters%20one%20by%20one.%0A%0ALet%20me%20know%20what%20you%20find%E2%80%94if%20you%20get%20a%20more%20detailed%20error%20message%20in%20the%20logs%2C%20that%20will%20help%20narrow%20things%20down%21) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/37281) -- 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]
