Can not load schema and query

Issue Summary

A summary of the issue and the browser/OS environment in which it occurs.

Technical details:

  • Redash Version: 9
  • Browser/OS: Edge
  • How did you install Redash:
    =====================
    [2020-09-09 04:22:49,296][PID:69][ERROR][redash.app] Exception on /api/jobs/fffd1992-c3bd-48c2-96ac-3c258d07c226 [GET]
    Traceback (most recent call last):
    File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 1949, in full_dispatch_request
    rv = self.dispatch_request()
    File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 1935, in dispatch_request
    return self.view_functionsrule.endpoint
    File “/usr/local/lib/python3.7/site-packages/flask_restful/init.py”, line 458, in wrapper
    resp = resource(*args, **kwargs)
    File “/usr/local/lib/python3.7/site-packages/flask_login/utils.py”, line 261, in decorated_view
    return func(*args, **kwargs)
    File “/usr/local/lib/python3.7/site-packages/flask/views.py”, line 89, in view
    return self.dispatch_request(*args, **kwargs)
    File “/app/redash/handlers/base.py”, line 33, in dispatch_request
    return super(BaseResource, self).dispatch_request(*args, **kwargs)
    File “/usr/local/lib/python3.7/site-packages/flask_restful/init.py”, line 573, in dispatch_request
    resp = meth(*args, **kwargs)
    File “/app/redash/handlers/query_results.py”, line 445, in get
    job = Job.fetch(job_id)
    File “/usr/local/lib/python3.7/site-packages/rq/job.py”, line 288, in fetch
    job.refresh()
    File “/usr/local/lib/python3.7/site-packages/rq/job.py”, line 461, in refresh
    raise NoSuchJobError(‘No such job: {0}’.format(self.key))
    rq.exceptions.NoSuchJobError: No such job: b’rq:job:fffd1992-c3bd-48c2-96ac-3c258d07c226’

I’m getting a similar-looking issue in Redash 10.1 (Docker installation). Prior to the exception there were several successful GET requests to the exact same endpoint - perhaps a job timeout?
This is specifically from the Docker logs from redash_server_1.

How did you deploy Redash? Are you using kubernetes?

Hi Jesse,

We used Docker on a dedicated EC2 instance. After doing some more investigation, we found two issues - first, in our configuration, we hadn’t assigned the schemas queue to any worker at all, and second, some of our Redshift data sources were incorrectly marked as Postgres (and the schema refresh query for Postgres was modified here to be incompatible with Redshift).

Our Redash instance now properly refreshes schemas going forward, thank you!

Thanks for posting your solution! Yes, the Redshift and Postgres query runners have deviated a bit.