Issue Summary

Just upgraded from redash 6 to redash 7, all queries and databases were correctly migrated. However, I have an issue while executing queries as a simple SELECT * FROM … it does not output any result and when I then look at the list of queries, it shows that they were not executed.
Some insights:

  • I tried executing both existing and new queries. None worked.
  • I tried executing queries on old (migrated from redash 6) and new databases (added on redash 7). None worked.
  • When I see my scheduled queries, it shows that the last execution was just prior the migration.
  • When I add new databases I can search the schemas and each table’s structure, so I think redash does see the databases.

This never happened on Redash 6.
Is there any more details I can provide?
I am attaching screenshots of a test query that should provide a 4 row answer.



Technical details:

  • Redash Version: 7.0.0+b18042
  • Browser/OS: Chrome + MacOS Mojave
  • How did you install Redash: selfhosted docker + kubernetes, selfhosted on google cloud

Hmmm, when I was initially playing around with Redash a few weeks ago, I saw similar when I hadn’t started up the workers correctly. eg I’d submit a query… and no result would ever turn up as there was nothing running to process the outstanding query.

If you run docker-compose ps, what does it show?

For example, running that on my local CentOS 7 desktop here gives this:

$ docker-compose ps
          Name                         Command               State              Ports           
------------------------------------------------------------------------------------------------
redash_adhoc_worker_1       /app/bin/docker-entrypoint ...   Up      5000/tcp                   
redash_nginx_1              nginx -g daemon off;             Up      443/tcp, 0.0.0.0:80->80/tcp
redash_postgres_1           docker-entrypoint.sh postgres    Up      5432/tcp                   
redash_redis_1              docker-entrypoint.sh redis ...   Up      6379/tcp                   
redash_scheduled_worker_1   /app/bin/docker-entrypoint ...   Up      5000/tcp                   
redash_scheduler_1          /app/bin/docker-entrypoint ...   Up      5000/tcp                   
redash_server_1             /app/bin/docker-entrypoint ...   Up      0.0.0.0:5000->5000/tcp

If yours is showing something not being in the “Up” state, that’s might be the problem. :smile:

Maybe is ‘worker’ problem. Have you restart the redash and run again ?

What’s in the logs?

I would have thought that some sort of Celery change has probably bitten you - v6 had a warning to clear out Celery queues when upgrading but v7 doesn’t tend to.

I tend to just run ‘redis-cli flushdb’ when changing the Redash version as it’ll recreate everything it needs on startup. That said, I fear there were some features coming (if only tracking of when users were last active) that planned to store more long-term data in Redis - not sure what happened to them.

1 Like

I tried restarting, flushing redis and ran into the same error.
I am getting the following log:

I notice that this is the same issue as in
https://github.com/getredash/redash/issues/3617.
I did not set REDASH_COOKIE_SECRET when we migrated from v6 to v7. I tried to fix it by editing the environment variables and setting both REDASH_COOKIE_SECRET and REDASH_SECRET_KEY to the same value:

REDASH_LOG_LEVEL: {{ "INFO" | b64enc }}
REDASH_REDIS_URL: {{ "redis://localhost:6379/0" | b64enc }}
REDASH_DATABASE_URL: {{ "postgresql:///redash" | b64enc }}
REDASH_COOKIE_SECRET: {{ "l/nygtnyb5hPbcSvhjdeyiolwraqgb8i" | b64enc }}
REDASH_SECRET_KEY: {{ "l/nygtnyb5hPbcSvhjdeyiolwraqgb8i" | b64enc }}
REDASH_HOST: {{ .... | b64enc }}
REDASH_MAIL_SERVER: {{ .... | b64enc }}
REDASH_MAIL_PORT: {{ .... | b64enc }}
REDASH_MAIL_USERNAME: {{ .... | b64enc }}
REDASH_MAIL_PASSWORD: {{ .... | b64enc }}
REDASH_MAIL_DEFAULT_SENDER: {{ .... | b64enc }}
REDASH_GOOGLE_CLIENT_ID: {{ .... | b64enc }}
REDASH_GOOGLE_CLIENT_SECRET: {{ .... | b64enc }}

We tried this config and keep getting the same error. Any advice? I don’t want to lose the +200 queries :S

Had to delete everything and start fresh. Luckily there is a query importer

Hi Justin,

I just changed my server’s host name. When I type in docker-compose ps. I got same list as you showed. It looks like redash is running correctly (curl localhost:5000 on server works). But I cannot access to my redash at xxx.xxx.xxx:5000 from browser on other machine.
I tried to restart nginx container, but it is still not working.
Do you know how to troubleshoot this problem?
Cent OS 7
Redash V8

Thanks,

  • Nan

Hi Nan,

Two real possibilities spring to mind. :slight_smile:

  • It’s possible your docker container is connected (bound) to only localhost on your computer, not the ethernet interface. “localhost” is a special name, that only allows access from the computer itself.
  • Another possibility, is that the firewall rules on your computer are stopping other computers from accessing things.

Probably the easiest thing to try is running the firewall-cmd command, on your local computer, to temporarily allow access to port 5000. You can do this by running:

sudo firewall-cmd --zone=public --add-port=5000/tcp

That will allow connections to port 5000 from other computers, temporarily until you reboot. Give that a go, and see if it works. If not, we can try and figure out if it’s the “localhost only” type of problem. :smile:

1 Like

Hi Justin,

Thank you so much for detailed instructions.
I did restart docker (not only container) and it works. I think the first point you mentioned is closer to the root cause.

BR,

  • Nan

No worries Nan. :slight_smile:

When you say “and it works”, are you meaning the problem is solved? Or do we still need to troubleshoot this further?