syafiqdante commented on issue #7972: Celery throws error when using ctas URL: https://github.com/apache/incubator-superset/issues/7972#issuecomment-523266729 Well don't I feel silly... to point celery to read the superset_config.py is to just insert `from superset_config import *` at the end of the config.py file and now its working when you run the command: `celery worker --app=superset.tasks.celery_app:app --pool=prefork -Ofair -c 4 --loglevel=DEBUG --max-tasks-per-child=128` ``` Loaded your LOCAL configuration at [/root/incubator-superset/superset_config.py] Loaded your LOCAL configuration at [/root/incubator-superset/superset_config.py] [2019-08-21 09:41:35,919: DEBUG/MainProcess] | Worker: Preparing bootsteps. [2019-08-21 09:41:35,921: DEBUG/MainProcess] | Worker: Building graph... [2019-08-21 09:41:35,922: DEBUG/MainProcess] | Worker: New boot order: {Timer, Hub, Pool, Autoscaler, StateDB, Beat, Consumer} [2019-08-21 09:41:35,934: DEBUG/MainProcess] | Consumer: Preparing bootsteps. [2019-08-21 09:41:35,935: DEBUG/MainProcess] | Consumer: Building graph... [2019-08-21 09:41:35,948: DEBUG/MainProcess] | Consumer: New boot order: {Connection, Events, Heart, Agent, Mingle, Tasks, Control, Gossip, event loop} -------------- celery v4.3.0 (rhubarb) ---- **** ----- --- * *** * -- Linux-4.4.0-141-generic-x86_64-with-Ubuntu-16.04-xenial 2019-08-21 09:41:35 -- * - **** --- - ** ---------- [config] - ** ---------- .> app: __main__:0x7f3d81c3f588 - ** ---------- .> transport: redis://localhost:6379/0 - ** ---------- .> results: redis://localhost:6379/0 - *** --- * --- .> concurrency: 4 (prefork) -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker) --- ***** ----- -------------- [queues] .> celery exchange=celery(direct) key=celery [tasks] . celery.accumulate . celery.backend_cleanup . celery.chain . celery.chord . celery.chord_unlock . celery.chunks . celery.group . celery.map . celery.starmap . email_reports.schedule_hourly . email_reports.send . superset.sql_lab.get_sql_results [2019-08-21 09:41:35,956: DEBUG/MainProcess] | Worker: Starting Hub [2019-08-21 09:41:35,956: DEBUG/MainProcess] ^-- substep ok [2019-08-21 09:41:35,956: DEBUG/MainProcess] | Worker: Starting Pool [2019-08-21 09:41:36,737: DEBUG/MainProcess] ^-- substep ok [2019-08-21 09:41:36,739: DEBUG/MainProcess] | Worker: Starting Consumer [2019-08-21 09:41:36,739: DEBUG/MainProcess] | Consumer: Starting Connection [2019-08-21 09:41:36,755: INFO/MainProcess] Connected to redis://localhost:6379/0 [2019-08-21 09:41:36,755: DEBUG/MainProcess] ^-- substep ok [2019-08-21 09:41:36,755: DEBUG/MainProcess] | Consumer: Starting Events [2019-08-21 09:41:36,763: DEBUG/MainProcess] ^-- substep ok [2019-08-21 09:41:36,763: DEBUG/MainProcess] | Consumer: Starting Heart [2019-08-21 09:41:36,765: DEBUG/MainProcess] ^-- substep ok [2019-08-21 09:41:36,766: DEBUG/MainProcess] | Consumer: Starting Mingle [2019-08-21 09:41:36,766: INFO/MainProcess] mingle: searching for neighbors [2019-08-21 09:41:37,790: INFO/MainProcess] mingle: all alone [2019-08-21 09:41:37,790: DEBUG/MainProcess] ^-- substep ok [2019-08-21 09:41:37,801: DEBUG/MainProcess] | Consumer: Starting Tasks [2019-08-21 09:41:37,812: DEBUG/MainProcess] ^-- substep ok [2019-08-21 09:41:37,812: DEBUG/MainProcess] | Consumer: Starting Control [2019-08-21 09:41:37,817: DEBUG/MainProcess] ^-- substep ok [2019-08-21 09:41:37,818: DEBUG/MainProcess] | Consumer: Starting Gossip [2019-08-21 09:41:37,823: DEBUG/MainProcess] ^-- substep ok [2019-08-21 09:41:37,823: DEBUG/MainProcess] | Consumer: Starting event loop [2019-08-21 09:41:37,823: DEBUG/MainProcess] | Worker: Hub.register Pool... [2019-08-21 09:41:37,825: DEBUG/MainProcess] basic.qos: prefetch_count->40 ``` but the main problem is still unsolved ctas button is still pending... after I have changed the SqlEditor.jsx as per mentioned in https://github.com/apache/incubator-superset/commit/1cd0e7f3f44763f844c737aceb1306c38d816ca4 celery still throws error: ``` [2019-08-21 10:06:31,807: INFO/MainProcess] Received task: superset.sql_lab.get_sql_results[e5af42d9-de94-45a3-829c-cca28ec3b517] [2019-08-21 10:06:31,828: DEBUG/MainProcess] Task accepted: superset.sql_lab.get_sql_results[e5af42d9-de94-45a3-829c-cca28ec3b517] pid:14083 [2019-08-21 10:06:31,883: ERROR/ForkPoolWorker-1] Query with id `271` could not be retrieved [2019-08-21 10:06:31,884: ERROR/ForkPoolWorker-1] Sleeping for a sec before retrying... [2019-08-21 10:06:32,890: ERROR/ForkPoolWorker-1] Query with id `271` could not be retrieved [2019-08-21 10:06:32,890: ERROR/ForkPoolWorker-1] Sleeping for a sec before retrying... [2019-08-21 10:06:33,896: ERROR/ForkPoolWorker-1] Query with id `271` could not be retrieved [2019-08-21 10:06:33,896: ERROR/ForkPoolWorker-1] Sleeping for a sec before retrying... [2019-08-21 10:06:34,912: ERROR/ForkPoolWorker-1] Query with id `271` could not be retrieved [2019-08-21 10:06:34,913: ERROR/ForkPoolWorker-1] Sleeping for a sec before retrying... [2019-08-21 10:06:35,918: ERROR/ForkPoolWorker-1] Query with id `271` could not be retrieved [2019-08-21 10:06:35,919: ERROR/ForkPoolWorker-1] Sleeping for a sec before retrying... [2019-08-21 10:06:36,931: ERROR/ForkPoolWorker-1] Failed at getting query Traceback (most recent call last): File "/root/incubator-superset/superset/sql_lab.py", line 136, in get_sql_results session=session, start_time=start_time) File "/root/incubator-superset/superset/sql_lab.py", line 224, in execute_sql_statements query = get_query(query_id, session) File "/root/incubator-superset/superset/sql_lab.py", line 96, in get_query raise SqlLabException('Failed at getting query') superset.sql_lab.SqlLabException: Failed at getting query [2019-08-21 10:06:36,948: ERROR/ForkPoolWorker-1] Query with id `271` could not be retrieved [2019-08-21 10:06:36,948: ERROR/ForkPoolWorker-1] Sleeping for a sec before retrying... [2019-08-21 10:06:37,953: ERROR/ForkPoolWorker-1] Query with id `271` could not be retrieved [2019-08-21 10:06:37,965: ERROR/ForkPoolWorker-1] Sleeping for a sec before retrying... [2019-08-21 10:06:38,970: ERROR/ForkPoolWorker-1] Query with id `271` could not be retrieved [2019-08-21 10:06:38,971: ERROR/ForkPoolWorker-1] Sleeping for a sec before retrying... [2019-08-21 10:06:39,977: ERROR/ForkPoolWorker-1] Query with id `271` could not be retrieved [2019-08-21 10:06:39,977: ERROR/ForkPoolWorker-1] Sleeping for a sec before retrying... [2019-08-21 10:06:40,982: ERROR/ForkPoolWorker-1] Query with id `271` could not be retrieved [2019-08-21 10:06:40,982: ERROR/ForkPoolWorker-1] Sleeping for a sec before retrying... [2019-08-21 10:06:41,988: ERROR/ForkPoolWorker-1] Failed at getting query Traceback (most recent call last): File "/root/incubator-superset/superset/sql_lab.py", line 136, in get_sql_results session=session, start_time=start_time) File "/root/incubator-superset/superset/sql_lab.py", line 224, in execute_sql_statements query = get_query(query_id, session) File "/root/incubator-superset/superset/sql_lab.py", line 96, in get_query raise SqlLabException('Failed at getting query') superset.sql_lab.SqlLabException: Failed at getting query During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/incubator-superset/superset/sql_lab.py", line 114, in session_scope yield session File "/root/incubator-superset/superset/sql_lab.py", line 140, in get_sql_results query = get_query(query_id, session) File "/root/incubator-superset/superset/sql_lab.py", line 96, in get_query raise SqlLabException('Failed at getting query') superset.sql_lab.SqlLabException: Failed at getting query [2019-08-21 10:06:42,001: ERROR/ForkPoolWorker-1] Task superset.sql_lab.get_sql_results[e5af42d9-de94-45a3-829c-cca28ec3b517] raised unexpected: SqlLabException('Failed at getting query',) Traceback (most recent call last): File "/root/incubator-superset/superset/sql_lab.py", line 136, in get_sql_results session=session, start_time=start_time) File "/root/incubator-superset/superset/sql_lab.py", line 224, in execute_sql_statements query = get_query(query_id, session) File "/root/incubator-superset/superset/sql_lab.py", line 96, in get_query raise SqlLabException('Failed at getting query') superset.sql_lab.SqlLabException: Failed at getting query During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/celery/app/trace.py", line 385, in trace_task R = retval = fun(*args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/celery/app/trace.py", line 648, in __protected_call__ return self.run(*args, **kwargs) File "/root/incubator-superset/superset/sql_lab.py", line 140, in get_sql_results query = get_query(query_id, session) File "/root/incubator-superset/superset/sql_lab.py", line 96, in get_query raise SqlLabException('Failed at getting query') superset.sql_lab.SqlLabException: Failed at getting query ``` I found out you could work around it by straight away explore chart from the query itself rather than saving the table first using ctas button.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org