Railway Redid Bullmq Issue
flowclarity-apps
FREEOP

14 days ago

I have an app using bullmq deployed to railway that connects to redis. when I am trying to connect using Redis private network the connection is timing out. I have checked the existing threads and they recommend adding family=0 but that did not work for me.

Then I tried to also check from the container command line and it got the same result:

root@45db4e4c02f3:/app# REDIS_URL_VAR="redis://default:XXXXPASSWORDXXXX@redis.railway.internal:6379?family=0"

root@45db4e4c02f3:/app# node -e "const Redis = require('ioredis'); const r = new Redis("$REDIS_URL_VAR"); r.ping().then(res => {console.log('PING:', res); process.exit(0)}).catch(e => {console.error('Error:', e.message); process.exit(1)})"

[ioredis] Unhandled error event: Error: getaddrinfo ENOTFOUND redis.railway.internal

at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:122:26)

It is clear that DNS "redis.railway.internal" is not getting resolved. I am able to use the public URL without any issue but would not like to.

How to resolve this? If the DNS resolves the ping test should work.

Solved

2 Replies

Railway
BOT

14 days ago

Your Redis service and your app services (recoup-backend-worker, recoup-backend-api) are in different projects. Private networking is scoped to a single project and environment, so redis.railway.internal cannot resolve from a service in another project. Moving or recreating the Redis instance into the same project as your app will allow private network connectivity.


Status changed to Awaiting User Response Railway 14 days ago


flowclarity-apps
FREEOP

11 days ago

Thanks that worked


Status changed to Awaiting Railway Response Railway 11 days ago


Status changed to Solved Railway 11 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...