Skip to content
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

SQL_lab :: Results backend isn't configured. #1984

Closed
wyndhblb opened this issue Jan 14, 2017 · 12 comments
Closed

SQL_lab :: Results backend isn't configured. #1984

wyndhblb opened this issue Jan 14, 2017 · 12 comments

Comments

@wyndhblb
Copy link
Contributor

Superset version

.15.2

Expected results

No Error

Actual results

Results backend isn't configured.


Hi

Recent install of things, that was doing fine till .15.1

[2017-01-14 19:27:08,242: ERROR/PoolWorker-1] Task superset.sql_lab.get_sql_results[dde83c63-0e3d-4e83-94ec-d82f9c0f2624] raised unexpected: Exception("Results backend isn't configured.",)
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/celery/app/trace.py", line 367, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/celery/app/trace.py", line 622, in __protected_call__
    return self.run(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/superset/sql_lab.py", line 91, in get_sql_results
    handle_error("Results backend isn't configured.")
  File "/usr/local/lib/python3.5/dist-packages/superset/sql_lab.py", line 88, in handle_error
    raise Exception(query.error_message)
Exception: Results backend isn't configured.

but my config seems a-ok

class CeleryConfig(object):
  BROKER_URL = 'redis://myredis:6379/0'
  CELERY_IMPORTS = ('superset.sql_lab', )
  CELERY_RESULT_BACKEND = 'redis://myredis:6379/0'
  CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}}

CELERY_CONFIG = CeleryConfig

Still trying to track this down, but not sure if this is continuing for others

@wyndhblb wyndhblb changed the title SQLlab :: Results backend isn't configured. SQLab :: Results backend isn't configured. Jan 16, 2017
@wyndhblb wyndhblb changed the title SQLab :: Results backend isn't configured. SQL_lab :: Results backend isn't configured. Jan 16, 2017
@xrmx
Copy link
Contributor

xrmx commented Jan 18, 2017

How to reproduce?

@wyndhblb
Copy link
Contributor Author

wyndhblb commented Jan 19, 2017

Not to sure, as all the settings are proper, celery workers use the same config (on the same box) even in my local docker based lands it does this, still trying to pin it down.

Kinda just wanted to post in case this was some issue w/ 15.2 and other saw it.

To add more info:: using the pyhive presto bits to connect to things. The sample data set does ok (mysql).

@bkyryliuk
Copy link
Member

@wyndhblb
Add this to your config:

from werkzeug.contrib.cache import FileSystemCache
RESULTS_BACKEND = FileSystemCache('/tmp/sqllab_cache', default_timeout=60*24*7)

@wyndhblb
Copy link
Contributor Author

Yep that seems to work. I guess that setting changed from before. Thanks

@bkyryliuk
Copy link
Member

those are not default ones, I have an open PR - #2017

@wyndhblb
Copy link
Contributor Author

yea dug into things and used a redis one instead

@Skeyelab
Copy link

@wyndhblb how can I get this working w a redis results backend?

@astawiarski
Copy link

FileSystemCache shouldn't be made default as that will save data locally. That's not only a bad practice (for sysadmins and developers trying to scale it horizontally), but it will also hide the fact you need to configure results backend to anything that Celery supports.

I think this parameter should be just properly documented and present in the sample configuration file - just like the BROKER_URL.

Since Celery supports Redis as a backend, then @wyndhblb example should work perfectly fine. But it doesn't, and I have an exact same problem, not sure why.

@astawiarski
Copy link

Looks like there is a conflict: superset/__init__.py defines results_backend and there is also superset/results_backend.py file. Separately to that, the error message refers to the RESULTS_BACKEND from the global scope that the superset is using internally, rather than to the one from Celery. So changing the value in CeleryConfig won't make a difference. Looks like a bigger change is needed here.

@mistercrunch
Copy link
Member

Good catch. I'm not sure why it's not a problem on our end. But upon looking I think we don't need the results_backend module anymore.

@mistercrunch
Copy link
Member

#2717

@mistercrunch
Copy link
Member

Notice: this issue has been closed because it has been inactive for 353 days. Feel free to comment and request for this issue to be reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants