5 months ago
Hi
I used railway templates to deploy a Redis Store. Then I'm using a nodejs app to connect to it.
I've tried both the public URL and the one in the internal network. Both connect fine and I can send jobs to my redis queue. I'm using BullMq and I can see the queue items going through the system.
Why then do I have these polluting my log files every 30 seconds continually.
Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 6379
}
Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 6379
}
I'm sure these are redis errors no? They are in RED in my deploy logs.
5 Replies
5 months ago
Is there anything else that's trying to connect to redis? For example, session/cookie manager?
5 months ago
These are your nodejs errors and yes it's related to redis as it's trying to connect to port 6379 on localhost which doesn't exist.
Somewhere in your application you
1. forgot to specify redis url so it's defaulting to localhost
2. the env is undefined so some libraries default to localhost
You can add some debug logs before your definitions to check if the env is undefined.
smolpaw
These are your nodejs errors and yes it's related to redis as it's trying to connect to port 6379 on localhost which doesn't exist.Somewhere in your application you1. forgot to specify redis url so it's defaulting to localhost2. the env is undefined so some libraries default to localhostYou can add some debug logs before your definitions to check if the env is undefined.
5 months ago
I have the same error rn only for BullMQ, the env is not undefined
It points to the rail way deployed redis url
charleslukes
I have the same error rn only for BullMQ, the env is not undefinedIt points to the rail way deployed redis url
5 months ago
Would it be possible to let me look at your code ? Perhaps give me a temporary access to your repo so i can reproduce and debug it
With this very little info it's just a guessing game.
5 months ago
The most likely cause for this would be redis or bullmq misconfiguration
https://station.railway.com/questions/getting-read-econnreset-when-trying-to-c-14637160
https://station.railway.com/questions/railway-redis-ioredis-bull-mq-not-connect-f8b79e9a
If you share more about your set up then we can help