a month ago
my backend service is not able to connect to my redis service,
deployment to the backend is successful but it gives error as:ERROR [ConsultationLiveUpdatesService] Subscriber error: getaddrinfo ENOTFOUND redis-xjxw.railway.internal
48 Replies
a month ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open Railway • about 1 month ago
a month ago
Go to your Redis service settings > Networking. If there are any capitals in the URL, try changing it to all lowercase then redeploy your Redis and backend service.
Additionally, make sure that both services are in the same project and environment.
a month ago
..
0x5b62656e5d
Go to your Redis service settings > Networking. If there are any capitals in the URL, try changing it to all lowercase then redeploy your Redis and backend service.Additionally, make sure that both services are in the same project and environment.
a month ago
tried that, there is no capitals in the URL.
this is the error on my backend log:
[Nest] 13 - 02/12/2026, 4:00:54 PM ERROR [ConsultationLiveUpdatesService] Reader error: getaddrinfo ENOTFOUND redis.railway.internal
[Nest] 13 - 02/12/2026, 4:00:54 PM ERROR [ConsultationLiveUpdatesService] Subscriber error: getaddrinfo ENOTFOUND redis.railway.internal
[Nest] 13 - 02/12/2026, 4:00:56 PM WARN [CacheService] Redis connection failed: getaddrinfo ENOTFOUND redis.railway.internal. Cache operations will be disabled.
[Nest] 13 - 02/12/2026, 4:00:56 PM ERROR [ConsultationLiveUpdatesService] Reader error: getaddrinfo ENOTFOUND redis.railway.internal
a month ago
Are your backend and Redis in the same project and running in the same environment?
a month ago
I think there is a general issue with internal url - I am also not able to connect to postgrees instances.
The status page is not still mentioning anything - I think the team should investigate what is happening.
tenderly-care
tried that, there is no capitals in the URL.this is the error on my backend log:[Nest] 13 - 02/12/2026, 4:00:54 PM ERROR [ConsultationLiveUpdatesService] Reader error: getaddrinfo ENOTFOUND redis.railway.internal[Nest] 13 - 02/12/2026, 4:00:54 PM ERROR [ConsultationLiveUpdatesService] Subscriber error: getaddrinfo ENOTFOUND redis.railway.internal[Nest] 13 - 02/12/2026, 4:00:56 PM WARN [CacheService] Redis connection failed: getaddrinfo ENOTFOUND redis.railway.internal. Cache operations will be disabled.[Nest] 13 - 02/12/2026, 4:00:56 PM ERROR [ConsultationLiveUpdatesService] Reader error: getaddrinfo ENOTFOUND redis.railway.internal
a month ago
Your backend logs show it's connecting to redis.railway.internal but your actual Redis hostname is redis-xjxw.railway.internal.Looks like the URL in your backend config is missing the -xjxw suffix.
dharmateja
Your backend logs show it's connecting to redis.railway.internal but your actual Redis hostname is redis-xjxw.railway.internal.Looks like the URL in your backend config is missing the -xjxw suffix.
a month ago
Mine doesn't have it, should he remove the suffix instead?
darklight9811
Mine doesn't have it, should he remove the suffix instead?
a month ago
The hostname depends on your service name in railway. The safest approach is to not hardcode it at all. Go to your Redis service tab copy the exact REDIS_URL value, or use ${{Redis.REDIS_URL}} as a variable reference in your backend service. That way it always uses whatever Railway assigns, suffix or not.
a month ago
You can also just edit the private networking URL and/or variable directly.
dharmateja
Your backend logs show it's connecting to redis.railway.internal but your actual Redis hostname is redis-xjxw.railway.internal.Looks like the URL in your backend config is missing the -xjxw suffix.
a month ago
Later changed it to redis.railway.internal, but still does not work
dharmateja
The hostname depends on your service name in railway. The safest approach is to not hardcode it at all. Go to your Redis service tab copy the exact REDIS_URL value, or use ${{Redis.REDIS_URL}} as a variable reference in your backend service. That way it always uses whatever Railway assigns, suffix or not.
a month ago
Tried this as well, but it still does not work
a month ago
Can you try connecting to redis using the external/public url (TCP proxy) as a temporary workaround? Go to your rredis service -> Settings ->
networking -> enable TCP proxy, then use that url instead.
a month ago
let me try
a month ago
Nope it still does not work
a month ago
Sorry man, I couldn’t be of that much help. If I were you, I’d delete and recreate the redis service for a clean start. Just keep in mind this will wipe any data stored in redis. If you’re only using it for caching and pub/sub, that’s fine; otherwise, make sure to export the data first.
But I’m curious like what’s the main issue here? could it be something internal on railway?
dharmateja
Sorry man, I couldn’t be of that much help. If I were you, I’d delete and recreate the redis service for a clean start. Just keep in mind this will wipe any data stored in redis. If you’re only using it for caching and pub/sub, that’s fine; otherwise, make sure to export the data first.But I’m curious like what’s the main issue here? could it be something internal on railway?
a month ago
Tried that as well, it doesnt work
tenderly-care
Tried that as well, it doesnt work
a month ago
Here it is
Attachments
a month ago
The env var name which my backend uses is REDIS_URL or REDIS_HOST
but i in the Redis service the name of vars there is like REDISURL or REDISHOST
and i am trying to reference it in my backend
this could be a problem?
tenderly-care
Here it is
a month ago
It seems like you generated a domain.
You need to generate a TCP proxy. Not a domain.
Attachments
0x5b62656e5d
It seems like you generated a domain.You need to generate a TCP proxy. Not a domain.
a month ago
but this will incur egress fees?
a month ago
This is for testing purposes, but yes you are correct. Using public networking will incur egress fees.
0x5b62656e5d
It seems like you generated a domain.You need to generate a TCP proxy. Not a domain.
a month ago
also TCP proxy is only needed if you want to connect to Redis from outside Railway right?
dharmateja
also TCP proxy is only needed if you want to connect to Redis from outside Railway right?
a month ago
Yes.
Services such as Postgres or Redis require TCP proxies for public networking, not domains.
tenderly-care
The env var name which my backend uses is REDIS_URL or REDIS_HOSTbut i in the Redis service the name of vars there is like REDISURL or REDISHOSTand i am trying to reference it in my backendthis could be a problem?
a month ago
Can you check your variable names?
dharmateja
Can you check your variable names?
a month ago
these are some variables i am using
on backend which is perfectly has the values of redis
REDIS_DB
*******
REDIS_HOST
*******
REDIS_KEY_PREFIX
*******
REDIS_PASSWORD
*******
REDIS_PORT
*******
REDIS_TTL
*******
REDIS_URL
0x5b62656e5d
This is for testing purposes, but yes you are correct. Using public networking will incur egress fees.
a month ago
I tried deleting the domain, and deployed a tcp proxy and use that as my REDIS URL
it does not work gives these errors:
[Nest] 13 - 02/13/2026, 3:49:51 AM ERROR [ConsultationLiveUpdatesService] Subscriber error: getaddrinfo ENOTFOUND redis.railway.internal
[Nest] 13 - 02/13/2026, 3:49:51 AM ERROR [ConsultationLiveUpdatesService] Reader error: getaddrinfo ENOTFOUND redis.railway.internal
[Nest] 13 - 02/13/2026, 3:49:51 AM WARN [CacheService] Redis connection failed: getaddrinfo ENOTFOUND redis.railway.internal. Cache operations will be disabled.
SIGTERM received, shutting down gracefully
[Nest] 13 - 02/13/2026, 3:49:51 AM LOG [ConsultationLiveUpdatesService] Closing Redis subscriber connection...
[Nest] 13 - 02/13/2026, 3:49:51 AM LOG [ConsultationLiveUpdatesService] Closing Redis reader connection...
tenderly-care
these are some variables i am usingon backend which is perfectly has the values of redisREDIS_DB*******REDIS_HOST*******REDIS_KEY_PREFIX*******REDIS_PASSWORD*******REDIS_PORT*******REDIS_TTL*******REDIS_URL
a month ago
But are the values set manually or using railway variable references? can you check does REDIS_HOST contain something like redis.railway.internal (hardcoded) or ${{Redis.REDISHOST}} (reference)?
tenderly-care
I tried deleting the domain, and deployed a tcp proxy and use that as my REDIS URLit does not work gives these errors:[Nest] 13 - 02/13/2026, 3:49:51 AM ERROR [ConsultationLiveUpdatesService] Subscriber error: getaddrinfo ENOTFOUND redis.railway.internal[Nest] 13 - 02/13/2026, 3:49:51 AM ERROR [ConsultationLiveUpdatesService] Reader error: getaddrinfo ENOTFOUND redis.railway.internal[Nest] 13 - 02/13/2026, 3:49:51 AM WARN [CacheService] Redis connection failed: getaddrinfo ENOTFOUND redis.railway.internal. Cache operations will be disabled.SIGTERM received, shutting down gracefully[Nest] 13 - 02/13/2026, 3:49:51 AM LOG [ConsultationLiveUpdatesService] Closing Redis subscriber connection...[Nest] 13 - 02/13/2026, 3:49:51 AM LOG [ConsultationLiveUpdatesService] Closing Redis reader connection...
a month ago
You're still using the *.railway.internal URL.
I'd just try SSH-ing into the container and pinging your TCP proxy for now to see if it can resolve.
a month ago
How do i ssh?
a month ago
Right click your service and click Copy SSH Command.
You'll need Railway CLI installed prior to this.
0x5b62656e5d
You're still using the *.railway.internal URL.I'd just try SSH-ing into the container and pinging your TCP proxy for now to see if it can resolve.
a month ago
i tried with the proxy url, still it uses *.railway.internal
tenderly-care
i tried with the proxy url, still it uses *.railway.internal
a month ago
Just curious is hostname hardcoded somewhere in your code?
0x5b62656e5d
Right click your service and click Copy SSH Command.You'll need Railway CLI installed prior to this.
a month ago
i tried this says: proxy is open
dharmateja
Just curious is hostname hardcoded somewhere in your code?
a month ago
no it is not
tenderly-care
i tried this says: proxy is open
a month ago
proxy is open means the SSH tunnel is connected. now in that same terminal, can you try:
redis-cli -h localhost -p <the-port-shown> ping
dharmateja
proxy is open means the SSH tunnel is connected. now in that same terminal, can you try:redis-cli -h localhost -p <the-port-shown> ping
a month ago
yeah it pongs back
tenderly-care
yeah it pongs back
a month ago
so redis is good, issue is 100% your backend not connecting to it correctly.. Can you search your entire codebase for railway.internal and also check if you have a .env file that might be overriding Railway's environment variables? (I know you already said you didn't hardcode but can you check once more )
dharmateja
so redis is good, issue is 100% your backend not connecting to it correctly.. Can you search your entire codebase for railway.internal and also check if you have a .env file that might be overriding Railway's environment variables? (I know you already said you didn't hardcode but can you check once more )
a month ago
checked again, it is not hardcoded anywhere i added a log in the backend which runs after successful deployment:
[Nest] 13 - 02/13/2026, 4:48:47 AM LOG [CacheService] Redis config mode=url (source=REDIS_URL, nodeEnv=production, url=redis://default:***@redis-stage.railway.internal:6379)
but still get the same subscriber and reader error:
[Nest] 13 - 02/13/2026, 4:49:43 AM ERROR [ConsultationLiveUpdatesService] Reader error: getaddrinfo ENOTFOUND redis-stage.railway.internal
[Nest] 13 - 02/13/2026, 4:49:43 AM ERROR [ConsultationLiveUpdatesService] Subscriber error: getaddrinfo ENOTFOUND redis-stage.railway.internal
[Nest] 13 - 02/13/2026, 4:49:45 AM WARN [CacheService] Redis connection failed: getaddrinfo ENOTFOUND redis-stage.railway.internal. Cache operations will be disabled
i've recently changed the name to redis-stage to check
the weired part is this error is only on staging environment
the connection for backend and redis works perfectly on prod
tenderly-care
checked again, it is not hardcoded anywhere i added a log in the backend which runs after successful deployment:[Nest] 13 - 02/13/2026, 4:48:47 AM LOG [CacheService] Redis config mode=url (source=REDIS_URL, nodeEnv=production, url=redis://default:***@redis-stage.railway.internal:6379)but still get the same subscriber and reader error:[Nest] 13 - 02/13/2026, 4:49:43 AM ERROR [ConsultationLiveUpdatesService] Reader error: getaddrinfo ENOTFOUND redis-stage.railway.internal[Nest] 13 - 02/13/2026, 4:49:43 AM ERROR [ConsultationLiveUpdatesService] Subscriber error: getaddrinfo ENOTFOUND redis-stage.railway.internal[Nest] 13 - 02/13/2026, 4:49:45 AM WARN [CacheService] Redis connection failed: getaddrinfo ENOTFOUND redis-stage.railway.internal. Cache operations will be disabledi've recently changed the name to redis-stage to checkthe weired part is this error is only on staging environmentthe connection for backend and redis works perfectly on prod
a month ago
I feel this is almost certainly an env issue. The REDIS_URL is resolving to redis-stage.railway.internal but private networking DNS can't find it.Is your Redis service actually deployed in the staging environment? Go to the Redis service -> make sure you're looking at the staging
environment tab and it shows as active.
=
If Redis was only deployed to production but not staging, the redis-stage.railway.internal hostname simply doesn't exist in the staging network hence ENOTFOUND. Also did the redis service get redeployed after you renamed it to redis-stage?
dharmateja
I feel this is almost certainly an env issue. The REDIS_URL is resolving to redis-stage.railway.internal but private networking DNS can't find it.Is your Redis service actually deployed in the staging environment? Go to the Redis service -> make sure you're looking at the stagingenvironment tab and it shows as active.=If Redis was only deployed to production but not staging, the redis-stage.railway.internal hostname simply doesn't exist in the staging network hence ENOTFOUND. Also did the redis service get redeployed after you renamed it to redis-stage?
a month ago
Also did the redis service get redeployed after you renamed it to redis-stage?
=> yes
I feel this is almost certainly an env issue. The REDIS_URL is resolving to redis-stage.railway.internal but private networking DNS can't find it.Is your Redis service actually deployed in the staging environment? Go to the Redis service -> make sure you're looking at the staging
=> yes, right environment, deployment is active, vars are referenced, same project, same env, same region
tenderly-care
Also did the redis service get redeployed after you renamed it to redis-stage?=> yesI feel this is almost certainly an env issue. The REDIS_URL is resolving to redis-stage.railway.internal but private networking DNS can't find it.Is your Redis service actually deployed in the staging environment? Go to the Redis service -> make sure you're looking at the staging=> yes, right environment, deployment is active, vars are referenced, same project, same env, same region
a month ago
I have've exhausted all the usual suspects :( wondering if railway's internal DNS for the staging environment has a cached/broken record that didn't update after the rename or redeploy .
a month ago
Makes sense, how can we talk to the railway support team for this issue?
a month ago
how do i raise the railway support ticket? for this ?
this is a major outage
a month ago
Exact problem:
Staging backend couldn’t resolve Redis internal hostname (ENOTFOUND redis-*.railway.internal).
Our backend uses ioredis, which in some Railway legacy/private-network cases can fail with IPv4-only DNS lookup.
Because Redis was unreachable, session cache checks failed, causing 401 Session expired or invalid.
What I fixed:
Updated backend Redis clients to force dual-stack DNS lookup (family: 0) in both places:
cache client (CacheService)
live updates clients (ConsultationLiveUpdatesService)
This makes hostname resolution work across IPv4/IPv6 environments.
Result:
Redis connectivity path is now production-safe for both staging and prod-style environments
tenderly-care
Exact problem:Staging backend couldn’t resolve Redis internal hostname (ENOTFOUND redis-*.railway.internal).Our backend uses ioredis, which in some Railway legacy/private-network cases can fail with IPv4-only DNS lookup.Because Redis was unreachable, session cache checks failed, causing 401 Session expired or invalid.What I fixed:Updated backend Redis clients to force dual-stack DNS lookup (family: 0) in both places:cache client (CacheService)live updates clients (ConsultationLiveUpdatesService)This makes hostname resolution work across IPv4/IPv6 environments.Result:Redis connectivity path is now production-safe for both staging and prod-style environments
a month ago
so it's IPv6 vs IPv4!
Status changed to Open brody • about 1 month ago



