Issue Summary

Installed Redash 8 on docker from scratch. Update env to point to v6 postgresql database. Ran migrations.
Everything seems to be working, except Data Sources page, which returns a 500 error. Dashoards also show errors in place of widgets. Opening a query opens, shows sql, but schema browser is empty.

Technical details:

  • Redash Version: 8
  • Browser/OS: chrome, ubuntu
  • How did you install Redash: docker

I looked at the datasources table and options are encrypted. I did not change any secrets in env file. May be I should have kept the secret from v6?

Please help…

So in the logs I get:

[2020-07-16 16:43:09,769] ERROR in app: Exception on /api/data_sources [GET]
Traceback (most recent call last):

File “/usr/local/lib/python2.7/site-packages/cryptography/fernet.py”, line 119, in _decrypt_data
self._verify_signature(data)
File “/usr/local/lib/python2.7/site-packages/cryptography/fernet.py”, line 108, in _verify_signature
raise InvalidToken
InvalidToken
[2020-07-16 16:43:09,772][PID:16][INFO][metrics] method=GET path=/api/data_sources endpoint=data_sources status=500 content_type=application/json content_length=36 duration=12.55 query_count=5 query_duration=10.29

Invalid token… hmmm… what would this be…

Oh my god… this sucks really…

So just to get over this error I’ve set REDASH_SECRET_KEY to the same key as REDASH_COOKIE_SECRET.

Seems to be working.

Thanks for sharing your solution! Glad you figured this out.

It’s the least we can do. Giving something back for this amazing product!

Hi,
I’m new to Redash, and I encounter the same problem: first I installed redash on a server and configured some dashboards. Then I re-installed redash on a new server, with docker, and I restored the database from a pg_dump of the previous server database. Now I have errors 500 on the data sources page. I want to try your solution, but I can’t figure how to set the REDASH_SECRET_KEY to the REDASH_COOKIE_SECRET value. I read the documentation about the secret keys but it’s really not my cup of tea and I really don’t know how to proceed ! Help would be really welcome :slight_smile: Thanks !

Hey there. Just look for the redash.env file. All your env vars are there. Edit and restart redash docker container.

Thanks a lot, I must have been tired last friday because I didn’t see this env file :slight_smile: I edited it and restarted the server, but now I have an error 500 on the whole Redash application :slight_smile: In the redash server logs I found "password authentication failed for user “postgres”.
My env file:

REDASH_LOG_LEVEL=INFO
REDASH_REDIS_URL=redis://redis:6379/0
POSTGRES_PASSWORD=oeN29nv7S4LbAlSSqyYPkcIUl3eBIsif
REDASH_COOKIE_SECRET=7frzsIeoZda4BWTgcVzFTcBXwqIC6kQk
REDASH_SECRET_KEY=7frzsIeoZda4BWTgcVzFTcBXwqIC6kQk
REDASH_DATABASE_URL=postgresql://postgres:oeN29nv7S4LbAlSSqyYPkcIUl3eBIsif@postgres/postgres

Look at the redash_database_url line. It has a password defined for user postgres. It’s hashed so you can’t see what it is. If you’re using the same database you have to keep the same pwd. Copy that value from the previous installation.

Thanks, but it doesn’t work, I still have the same error. But before I changed the REDASH_SECRET_KEY and restarted the server, I was able to see the Redash home page, and the list of dashboards. So I guess that it was able to connect to the database. It seems that something went wrong when I restarted the server. (If I put back the original env file, I still have the postgres connection error).

Hi, I managed to fix the postgres authentication problem by changing the postgres password in psql.
But I’m back to the beginning, as I still have the error 500 on the data source page ^^.
(I changed the REDASH_SECRET_KEY value to the REDASH_COOKIE_SECRET one) …