Can't execute queries after migrating to redash 7

#1

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
0 Likes

#2

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:

0 Likes

#3

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

0 Likes

#4

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

#5

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

0 Likes

#6

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

0 Likes