You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2023/01/18 11:36:17 UTC

[GitHub] [superset] rgarrigue opened a new issue, #22773: SQL Lab : getting a "Authentification required" when running query

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

   I'm not sure this is a bug, but at least I need help troubleshooting. The error is as below
   
   ![image](https://user-images.githubusercontent.com/1872031/213157476-347a3524-dda4-4788-a289-9c6a67905177.png)
   
   Pod's superset container's log
   
   ```
   superset-7594948b84-r6mpw superset Triggering query_id: 43
   superset-7594948b84-r6mpw superset 2023-01-18 11:24:41,138:INFO:superset.sqllab.command:Triggering query_id: 43
   superset-7594948b84-r6mpw superset Query 43: Executing 1 statement(s)
   superset-7594948b84-r6mpw superset 2023-01-18 11:24:41,182:INFO:superset.sql_lab:Query 43: Executing 1 statement(s)
   superset-7594948b84-r6mpw superset Query 43: Set query to 'running'
   superset-7594948b84-r6mpw superset 2023-01-18 11:24:41,183:INFO:superset.sql_lab:Query 43: Set query to 'running'
   superset-7594948b84-r6mpw superset Query 43: Running statement 1 out of 1
   superset-7594948b84-r6mpw superset 2023-01-18 11:24:41,238:INFO:superset.sql_lab:Query 43: Running statement 1 out of 1
   superset-7594948b84-r6mpw superset Query 43: Storing results in results backend, key: 97ef1791-72ab-4f4d-8568-74736b0c42e3
   superset-7594948b84-r6mpw superset 2023-01-18 11:24:41,290:INFO:superset.sql_lab:Query 43: Storing results in results backend, key: 97ef1791-72ab-4f4d-8568-74736b0c42e3
   superset-7594948b84-r6mpw superset [SupersetError(message='Authentication required.', error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'PostgreSQL', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})]
   superset-7594948b84-r6mpw superset Traceback (most recent call last):
   superset-7594948b84-r6mpw superset   File "/app/superset/views/base.py", line 210, in wraps
   superset-7594948b84-r6mpw superset     return f(self, *args, **kwargs)
   superset-7594948b84-r6mpw superset   File "/app/superset/utils/log.py", line 245, in wrapper
   superset-7594948b84-r6mpw superset     value = f(*args, **kwargs)
   superset-7594948b84-r6mpw superset   File "/app/superset/views/core.py", line 2407, in sql_json
   superset-7594948b84-r6mpw superset     command_result: CommandResult = command.run()
   superset-7594948b84-r6mpw superset   File "/app/superset/sqllab/command.py", line 114, in run
   superset-7594948b84-r6mpw superset     raise ex
   superset-7594948b84-r6mpw superset   File "/app/superset/sqllab/command.py", line 98, in run
   superset-7594948b84-r6mpw superset     status = self._run_sql_json_exec_from_scratch()
   superset-7594948b84-r6mpw superset   File "/app/superset/sqllab/command.py", line 151, in _run_sql_json_exec_from_scratch
   superset-7594948b84-r6mpw superset     raise ex
   superset-7594948b84-r6mpw superset   File "/app/superset/sqllab/command.py", line 146, in _run_sql_json_exec_from_scratch
   superset-7594948b84-r6mpw superset     return self._sql_json_executor.execute(
   superset-7594948b84-r6mpw superset   File "/app/superset/sqllab/sql_json_executer.py", line 111, in execute
   superset-7594948b84-r6mpw superset     raise SupersetErrorsException(
   superset-7594948b84-r6mpw superset superset.exceptions.SupersetErrorsException: [SupersetError(message='Authentication required.', error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'PostgreSQL', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})]
   superset-7594948b84-r6mpw superset 2023-01-18 11:24:41,331:WARNING:superset.views.base:[SupersetError(message='Authentication required.', error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'PostgreSQL', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})]
   superset-7594948b84-r6mpw superset Traceback (most recent call last):
   superset-7594948b84-r6mpw superset   File "/app/superset/views/base.py", line 210, in wraps
   superset-7594948b84-r6mpw superset     return f(self, *args, **kwargs)
   superset-7594948b84-r6mpw superset   File "/app/superset/utils/log.py", line 245, in wrapper
   superset-7594948b84-r6mpw superset     value = f(*args, **kwargs)
   superset-7594948b84-r6mpw superset   File "/app/superset/views/core.py", line 2407, in sql_json
   superset-7594948b84-r6mpw superset     command_result: CommandResult = command.run()
   superset-7594948b84-r6mpw superset   File "/app/superset/sqllab/command.py", line 114, in run
   superset-7594948b84-r6mpw superset     raise ex
   superset-7594948b84-r6mpw superset   File "/app/superset/sqllab/command.py", line 98, in run
   superset-7594948b84-r6mpw superset     status = self._run_sql_json_exec_from_scratch()
   superset-7594948b84-r6mpw superset   File "/app/superset/sqllab/command.py", line 151, in _run_sql_json_exec_from_scratch
   superset-7594948b84-r6mpw superset     raise ex
   superset-7594948b84-r6mpw superset   File "/app/superset/sqllab/command.py", line 146, in _run_sql_json_exec_from_scratch
   superset-7594948b84-r6mpw superset     return self._sql_json_executor.execute(
   superset-7594948b84-r6mpw superset   File "/app/superset/sqllab/sql_json_executer.py", line 111, in execute
   superset-7594948b84-r6mpw superset     raise SupersetErrorsException(
   superset-7594948b84-r6mpw superset superset.exceptions.SupersetErrorsException: [SupersetError(message='Authentication required.', error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'PostgreSQL', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})]
   superset-7594948b84-r6mpw superset 92.184.112.135 - - [18/Jan/2023:11:24:41 +0000] "POST /superset/sql_json/ HTTP/1.1" 500 255 "https://superset.dev.data.frankfurt.gostudent.cloud/superset/sqllab/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
   superset-7594948b84-r6mpw superset 92.184.112.135 - - [18/Jan/2023:11:24:43 +0000] "PUT /tabstateview/3 HTTP/1.1" 200 1 "https://superset.dev.data.frankfurt.gostudent.cloud/superset/sqllab/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
   superset-7594948b84-r6mpw superset 92.184.112.135 - - [18/Jan/2023:11:24:43 +0000] "GET /superset/queries/1674040593720 HTTP/1.1" 200 657 "https://superset.dev.data.frankfurt.gostudent.cloud/superset/sqllab/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
   ```
   
   Yes, I made very very very sure I c/c'ed the proper password. I tried the said passwords running some python psycopg2 directly in the superset pod, it worked. 
   
   #### How to reproduce the bug
   
   1. Configure Superset own database or a Redshift database in the "Databases" tab
   2. Go to SQL Query
   3. Exploring the database works (up to displaying the column of a given table like superset's ab_role
   5. Running query get a "Authentication required"
   
   ### Expected results
   
   A successful query
   
   ### Actual results
   
   A red banner "Authentication required"
   
   #### Screenshots
   
   Pasted one above, not really helpful
   
   ### Environment
   
   - browser type and version: latest stable Firefox 109.0 and Chromium 108.0.5359.124 snap (64 bits)
   - superset  version: tried with 2.0.0 & 2.0.1, official container as the helm chart get it
   - python version: Python 3.8.12
   - node.js version: command not found
   - any feature flags active: none
   
   - Superset own database is running on AWS RDS Aurora Postgresql serverless v2 with postgres engine, tried v13.6 & v14.5 versions
   - AWS Redshift up to date (they're dealing with the version themselves)
   - psycopg2, tried  v2.9.1, v2.9.4, v2.9.5
   -  sqlalchemy-redshift 0.8.3, same error as "raw" psycopg above
   
   - I tried in both our dev & production environment (meaning VPC + Redshift + EKS where Superset is deployed)
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   Charts are working
   
   It used to work with a docker-compose based setup, and broke when migrated on Kubernetes. A data engineer workin with me told me he checked SQL Lab previously and it was ok. But I did reverted our (git based) settings, no luck.
   
   I already spent a day understanding a first cryptic "bulk" error that was just me using a human friendly DNS CNAME instead of AWS technical hostname hence a SSL verification issue. But now I'm at a loss.
   
   Can someone at least can tell me how to have more detailed logs ? 
   


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] SQL Lab : getting a "Authentification required" when running query [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #22773: SQL Lab : getting a "Authentification required" when running query
URL: https://github.com/apache/superset/issues/22773


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] jphavoc commented on issue #22773: SQL Lab : getting a "Authentification required" when running query

Posted by "jphavoc (via GitHub)" <gi...@apache.org>.
jphavoc commented on issue #22773:
URL: https://github.com/apache/superset/issues/22773#issuecomment-1441367897

   I encountered the same problem yesterday. I solved it by uncomment [this](https://github.com/apache/superset/blob/master/helm/superset/values.yaml#L260) line in the `values.yaml`. The authentication error had something to do with the Redis and the missing password for it.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] SQL Lab : getting a "Authentification required" when running query [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #22773:
URL: https://github.com/apache/superset/issues/22773#issuecomment-1958311921

   I hope the solution above helped, and we could call this case closed based on that... but even if not I'm willing to close this as stale since it's been silent for so long, and we're trying to steer toward a more actionable Issues backlog. If people are still encountering this in current versions (currently 3.x) please re-open this issue, open a new Issue with updated context, or raise a PR to address the problem. Thanks!
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org