cube
cube copied to clipboard
Silent crash if a Redis instance cannot be found
Describe the bug
If Cube.js is run in production mode and a Redis instance is not present, it silently crashes in any /load
request (/meta
and /sql
requests work).
To Reproduce
Set CUBEJS_DEV_MODE=false
and CUBEJS_CACHE_AND_QUEUE_DRIVER=redis
, make sure Redis isn't running at 127.0.0.1:6379
, then run a request to Cube.js.. It will silently crash with the following output to the console:
> ./node_modules/.bin/cubejs-server
🚀 Cube.js server (0.26.49) is listening on 4000
Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1137:16)
Expected behavior Cube.js reports that it wasn't able to connect to Redis.
Also, during its startup, Cube.js can probe a Redis instance and report if it's not present.
Version:
"@cubejs-backend/server": "^0.26.49"
If you are interested in working on this issue, please leave a comment below and we will be happy to assign the issue to you. If this is the first time you are contributing a Pull Request to Cube.js, please check our contribution guidelines. You can also post any questions while contributing in the #contributors channel in the Cube.js Slack.
hey @igorlukanin I am having the same issue, any news on this?
@igorlukanin I found the issue, you have to use REDIS_URL instead of CUBEJS_REDIS_URL in older versions
👋 a quick reminder that we will be replacing Redis with Cube Store as announced in this blog post.