cube icon indicating copy to clipboard operation
cube copied to clipboard

Silent crash if a Redis instance cannot be found

Open igorlukanin opened this issue 3 years ago • 4 comments

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"

igorlukanin avatar Mar 08 '21 02:03 igorlukanin

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.

github-actions[bot] avatar Mar 08 '21 02:03 github-actions[bot]

hey @igorlukanin I am having the same issue, any news on this?

mhd-adam avatar Apr 07 '22 13:04 mhd-adam

@igorlukanin I found the issue, you have to use REDIS_URL instead of CUBEJS_REDIS_URL in older versions

mhd-adam avatar Apr 08 '22 13:04 mhd-adam

👋 a quick reminder that we will be replacing Redis with Cube Store as announced in this blog post.

rpaik avatar Jul 28 '22 05:07 rpaik