New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Superset 3.0.0 is showing up " PrestoDBSQLValidator was unable to check your query." if #28326
Comments
Any Update for this issue? @rusackas |
Nope, but I'm highly doubtful that many people have 20K values in their "in" clause. Normally you would keep that many values in a table, and just do a JOIN or other (far more terse) query. Is that possible in your case? You might just be sending far too much text to the SQL parser or something like that, causing some bottleneck/timeout, which seems like a rare and avoidable edge case. Here's what GPT has to say about your issue, in case you want to investigate some more: The error you're encountering in Apache Superset seems to be originating from an SSL error during the HTTPS connection attempt to your PrestoDB server. The error message "EOF occurred in violation of protocol" typically indicates a lower-level issue with the SSL/TLS handshake between Superset and your PrestoDB server. Here are several steps and checks you can perform to troubleshoot and potentially resolve this issue:
To proceed, you might start with the simpler checks (like verifying network connectivity and SSL certificates) and then move towards more complex configurations and adjustments as needed. |
@rusackas : I tried with superset-3.1.2 but still I am getting the "SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2427)')))"" One another point I would like to mention is : I am using the below requirement.txt file. alembic==1.12.0 It would be great if you provide me the requirements.txt file required for superset-3.1.2. Thanks in advance. |
@rusackas : Could you please help me with the compatible trino version with superset-3.1.2? This is a compatible issue as suggested by chat gpt. |
Not sure the currently functional version. I haven't used Trino/Presto since Nov/Dec, and I was just using whatever's built into Preset at the time (it as for a demo). Maybe @nytai knows a compatible version? Triggering out new friend DOSU to see if it provides something helpful here ;) |
To address the SSL error with your query in Apache Superset 3.1.2, ensure your database connection configuration includes the necessary SSL parameters. Specifically, if you're encountering SSL errors, verify that the For a practical example, you might use the following format in your connection string to include the certificate:
This approach has helped others resolve similar issues, as discussed in Configuring Secured Trino with Superset. Regarding the compatible Trino version for Superset 3.1.2, while there's no explicit mention of compatible Trino versions in the documentation you've provided, generally, Trino versions 350 and newer should work well with Superset 3.1.2. Ensure your If you face any specific issues, examining the Superset and Trino server logs can offer insights into potential compatibility problems. Adjusting log levels for more detailed information might also aid in diagnosing and resolving issues.
|
Hi @rusackas : One thing I noticed is that the query with 20k values runs good when I make the presto connection with username and password but shows up the error when i make the connection with keytab. With keytab I am able to run only 1k to 2k of records. |
Bug description
Superset : 3.0.0
While running a query in SQL LAB with more that 20k values in IN clause, the query is not getting submitted in and is returning:
"superset.databases.commands.exceptions.ValidatorSQLError:
PrestoDBSQLValidator was unable to check your query."
Please recheck your query.
Exception: HTTPSConnectionPool(host='xxxx.uat.com', port=7778): Max retries exceeded with url: /v1/statement (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2427)')))"
The error is not in presto side as the query did not even got submitted and is failing in the superset itself.
Error Stack trace:
2024-05-03 02:33:54,745:ERROR:superset.databases.commands.validate_sql:HTTPSConnectionPool(host='XXXX.UAT.com', port=7778): Max retries exceeded with url: /v1/statement (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2427)')))
Traceback (most recent call last):
File "/opt/app-root/lib64/python3.11/site-packages/superset/databases/commands/validate_sql.py", line 68, in run
errors = self._validator.validate(sql, schema, self._model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/superset/sql_validators/presto_db.py", line 174, in validate
annotation = cls.validate_statement(statement, database, cursor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/superset/sql_validators/presto_db.py", line 146, in validate_statement
raise ex
File "/opt/app-root/lib64/python3.11/site-packages/superset/sql_validators/presto_db.py", line 76, in validate_statement
db_engine_spec.execute(cursor, sql)
File "/opt/app-root/lib64/python3.11/site-packages/superset/db_engine_specs/base.py", line 1526, in execute
raise cls.get_dbapi_mapped_exception(ex) from ex
File "/opt/app-root/lib64/python3.11/site-packages/superset/db_engine_specs/base.py", line 1524, in execute
cursor.execute(query)
File "/opt/app-root/lib64/python3.11/site-packages/pyhive/presto.py", line 269, in execute
response = self._requests_session.post(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/requests/adapters.py", line 517, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='XXXX.UAT.com', port=7778): Max retries exceeded with url: /v1/statement (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2427)')))
SupersetErrorException
Traceback (most recent call last):
File "/opt/app-root/lib64/python3.11/site-packages/superset/databases/commands/validate_sql.py", line 68, in run
errors = self._validator.validate(sql, schema, self._model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/superset/sql_validators/presto_db.py", line 174, in validate
annotation = cls.validate_statement(statement, database, cursor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/superset/sql_validators/presto_db.py", line 146, in validate_statement
raise ex
File "/opt/app-root/lib64/python3.11/site-packages/superset/sql_validators/presto_db.py", line 76, in validate_statement
db_engine_spec.execute(cursor, sql)
File "/opt/app-root/lib64/python3.11/site-packages/superset/db_engine_specs/base.py", line 1526, in execute
raise cls.get_dbapi_mapped_exception(ex) from ex
File "/opt/app-root/lib64/python3.11/site-packages/superset/db_engine_specs/base.py", line 1524, in execute
cursor.execute(query)
File "/opt/app-root/lib64/python3.11/site-packages/pyhive/presto.py", line 269, in execute
response = self._requests_session.post(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/requests/adapters.py", line 517, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='XXXX.UAT.com', port=7778): Max retries exceeded with url: /v1/statement (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2427)')))
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/app-root/lib64/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/flask_appbuilder/security/decorators.py", line 95, in wraps
return f(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/superset/views/base_api.py", line 127, in wraps
raise ex
File "/opt/app-root/lib64/python3.11/site-packages/superset/views/base_api.py", line 121, in wraps
duration, response = time_function(f, self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/superset/utils/core.py", line 1526, in time_function
response = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/superset/utils/log.py", line 255, in wrapper
value = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/superset/databases/api.py", line 1037, in validate_sql
validator_errors = ValidateSQLCommand(pk, sql_request).run()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/app-root/lib64/python3.11/site-packages/superset/databases/commands/validate_sql.py", line 87, in run
raise ValidatorSQLError(superset_error) from ex
superset.databases.commands.exceptions.ValidatorSQLError: PrestoDBSQLValidator was unable to check your query.
Please recheck your query.
Exception: HTTPSConnectionPool(host='XXXX.UAT.com', port=7778): Max retries exceeded with url: /v1/statement (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2427)')))
======================
The error is throwing out from "/opt/app-root/lib64/python3.11/site-packages/superset/databases/commands/validate_sql.py"
NOTE :
The query gets submitted to Presto and returns back with results if we have 1k to 3k of records in the IN clause.
How to reproduce the bug
Screenshots/recordings
Superset version
master / latest-dev
Python version
3.11
Node version
16
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: