-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When deploying the application in Docker (locally, on cloud Linux, or in Render), both the worker and server containers fail to connect to Redis, resulting in an ECONNREFUSED
error.
#7768
Comments
This is because your redis is not running properly. Follow this instructions: https://twenty.com/developers/local-setup#step-4:-set-up-a-redis-database-(cache) Then try: if you get an error message you're not connected to Redis server.
Then try If you don't get error, type PING in cli. If Redis is up and running it will return PONG. Also, join discord for asking questions: https://discord.gg/txbw7Uxe |
in docker latest |
Probably linked to https://github.com/twentyhq/twenty/pull/7736/files but I can't find what's wrong 🤔 |
yep.. im looking too... it seems to ignore the ENV_VAR and i see no ref to 127.0.0.1 which imlpies perpas that the interface to the underlying library is wrong... but looks ok to me |
I guess the only different I see is |
ive commented REDIS_URL out in the compose and in the .env and get the error its missing.. so... something.. WEIRD is going on.. maybe the underlying redis library doesnt like "redis://redis" which would be kinda.... |
nope.. changed REDIS_URL=redis://redis.server:6379 and renamed redis service to the name.. .no joy..
|
@FelixMalfait perhaps redis/node-redis#2416 similar in the redis package you use? |
Aaaah I think I understood why! |
Having same issue on fresh deployment. My theory is that this was merged without making a new release #7736 Temporary fix is to add this to both server and worker containers: |
@stnby same comment at the same time haha :) |
We should update https://github.com/twentyhq/twenty/blob/main/install.sh#L48 to use the tagged release instead of the "main" branch. And we should probably update the docs on step 2 to replace |
seems to work! Good work I appreciate the input and well done, on what looks to be a fantastic CRM. I look forward to putting it through its paces |
## Description - `REDIS_URL` is required <img width="1903" alt="Redis Required" src="https://github.com/user-attachments/assets/5b53a4a6-29f4-4473-b7e4-52489f75204e"> ---- - Closes #7849 - Might be related #7768 --- - Wasn't gracefully reseting database ``` npx nx database:reset twenty-server ```
I'm curious as to why when I rebuilt the docker image from source, it doesn't work. But when pulling from the latest it does work when you apply all the fixes in this thread. Is the one on github not the same with the image on dockerhub? |
there is a mismatch between our docker-container on main branch (pointing to REDIS_URL) and the latest docker image of twenty 0.31.3 (pointing to REDIS_HOST. This will be resolved by 0.32 end of the week |
Re-opening as I think we should solve the root cause in the 1-click install script (using main branch instead of version branch). (Also fyi we realized REDIS_URL wasn't taken into account properly, a fix is being pushed today #7956) |
OK we can close I created this as a followup: #7968 |
Bug Description
When deploying the application in Docker (locally, on cloud Linux, or in Render), both the worker and server containers fail to connect to Redis, resulting in an
ECONNREFUSED
error. The application logs show the following error:[Nest] 7 - 10/16/2024, 10:27:38 PM ERROR [ExceptionHandler] connect ECONNREFUSED 127.0.0.1:6379
Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
Technical inputs
127.0.0.1:6379
, which might be incorrect in the context of Docker containers.The text was updated successfully, but these errors were encountered: