a month ago
Hello, I'm facing a persistent DNS resolution issue with my project.
Project ID: 37c991cf-3fb8-4822-8846-515d6ff13c48
Problem:
A Node.js service (Medusa.js) is unable to connect to a Redis service within the same project. The logs consistently show a getaddrinfo ENOTFOUND redis.railway.internal error.
Troubleshooting Steps Taken:
Confirmed
medusa-config.tsis correctly configured to useprocess.env.REDIS_URL.Set
REDIS_URLin the Medusa service to reference${{Redis.REDIS_URL}}. This failed.Set
REDIS_URLto reference${{Redis.REDIS_PRIVATE_URL}}. This also failed.Deleted and recreated the Medusa service entirely and re-linked all variables. The issue persisted.
Manually constructed the URL using component variables (
redis://default:${{RAILWAY_REDIS_PASSWORD}}@${{RAILWAY_REDIS_HOST}}:${{RAILWAY_REDIS_PORT}}). This also failed with the sameENOTFOUNDerror.Added debug logging which confirms that
process.env.REDIS_URL(and the underlyingREDISHOSTvariable) is being incorrectly resolved to the non-routableredis.railway.internalhostname.
The issue appears to be with the service discovery or internal DNS for this project, as the provided environment variables are not pointing to a valid internal address. Can you please investigate the networking for this project? Thank you.
1 Replies
a month ago
Hey there! 🫡
You should include ?family=0 at the end of the connection string for this to work. You can find more details at https://docs.railway.com/reference/errors/enotfound-redis-railway-internal