R
Railway13mo ago
theodor

redis connection fails

Hi! Having some issues with redis. I'm getting
Error: connect ECONNREFUSED 34.82.163.149:7679
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '34.82.163.149',
port: 7679
}
Error: connect ECONNREFUSED 34.82.163.149:7679
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '34.82.163.149',
port: 7679
}
I already tried restarting Redis or restarting/redeploying the project. Any suggestions? everything was working fine previoously
17 Replies
Percy
Percy13mo ago
Project ID: 900023fc-eb3b-4c5e-b8bf-83d6fcb5a72f
theodor
theodor13mo ago
900023fc-eb3b-4c5e-b8bf-83d6fcb5a72f I'm trying to figure out what may be causing this but having some trouble here On closer inspection, something is weird about the port that redis is running on vs the port that Railway thinks Redis is running on. In the Redis logs I'm seeing:
redis 03:03:19.13 INFO ==> ** Starting Redis setup **
redis 03:03:19.14 INFO ==> Initializing Redis
redis 03:03:19.16 INFO ==> Setting Redis config file
redis 03:03:19.18 INFO ==> ** Redis setup finished! **
redis 03:03:19.19 INFO ==> ** Starting Redis **
1:C 02 Jul 2023 03:03:19.238 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 02 Jul 2023 03:03:19.238 # Redis version=6.2.12, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 02 Jul 2023 03:03:19.238 # Configuration loaded
1:M 02 Jul 2023 03:03:19.238 * monotonic clock: POSIX clock_gettime
1:M 02 Jul 2023 03:03:19.239 * Running mode=standalone, port=6379.
1:M 02 Jul 2023 03:03:19.239 # Server initialized
redis 03:03:19.13 INFO ==> ** Starting Redis setup **
redis 03:03:19.14 INFO ==> Initializing Redis
redis 03:03:19.16 INFO ==> Setting Redis config file
redis 03:03:19.18 INFO ==> ** Redis setup finished! **
redis 03:03:19.19 INFO ==> ** Starting Redis **
1:C 02 Jul 2023 03:03:19.238 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 02 Jul 2023 03:03:19.238 # Redis version=6.2.12, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 02 Jul 2023 03:03:19.238 # Configuration loaded
1:M 02 Jul 2023 03:03:19.238 * monotonic clock: POSIX clock_gettime
1:M 02 Jul 2023 03:03:19.239 * Running mode=standalone, port=6379.
1:M 02 Jul 2023 03:03:19.239 # Server initialized
Notice how it says port 6379. However, in the actual REDIS_URL env var, the port is 7679
Brody
Brody13mo ago
that's completely normal but can you connect to the database with the redis cli?
theodor
theodor13mo ago
i am just in the process of wiping redis and adding it back i was able to do that! it seems like an internal problem to the comms between railway services
Brody
Brody13mo ago
so yes you can connect to it from the redis cli?
theodor
theodor13mo ago
yeah!
Brody
Brody13mo ago
and is your service using variable references for the database?
theodor
theodor13mo ago
yep. Just ${{Redis.REDIS_URL}} nothing changed we haven't deployed in 3 days
Brody
Brody13mo ago
yep sounds like a network issues I will flag for team monday
theodor
theodor13mo ago
i am trying to restart now but we can't wait until monday if it doesn't work i hsouldn't need to wipe my db for this to work it's an incident really
Brody
Brody13mo ago
I'm sorry but the team doesn't usually work on the weekends
theodor
theodor13mo ago
wait what? so what if this was an emergency? we just don't get support? that is unacceptable i'm glad i found out - we will make sure to migrate earlier then i had to reset my redis database and that affected our customers. that's not something that we take lightly btw, wiping the database and starting anew worked but that's really a nuclear option
Brody
Brody13mo ago
for 24/7 support on outages you may want to look into the business class https://docs.railway.app/reference/support#business-class
theodor
theodor13mo ago
ok we'll reach out i expected to get support on the team plan for that but it seems not
Brody
Brody13mo ago
unfortunately there's no SLOs for the teams plan on a work day, you absolutely would get priority support with the teams plan
theodor
theodor13mo ago
i see thanks for clarifying thanks for the help @Brody! I see you here every day btw so we appreciate the fight in the trenches!
Brody
Brody13mo ago
thank you 🙂