Need Help with deployment

cheentiofficialapps
HOBBYOP

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:

  1. Confirmed medusa-config.ts is correctly configured to use process.env.REDIS_URL.

  2. Set REDIS_URL in the Medusa service to reference ${{Redis.REDIS_URL}}. This failed.

  3. Set REDIS_URL to reference ${{Redis.REDIS_PRIVATE_URL}}. This also failed.

  4. Deleted and recreated the Medusa service entirely and re-linked all variables. The issue persisted.

  5. Manually constructed the URL using component variables (redis://default:${{RAILWAY_REDIS_PASSWORD}}@${{RAILWAY_REDIS_HOST}}:${{RAILWAY_REDIS_PORT}}). This also failed with the same ENOTFOUND error.

  6. Added debug logging which confirms that process.env.REDIS_URL (and the underlying REDISHOST variable) is being incorrectly resolved to the non-routable redis.railway.internal hostname.

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.

$10 Bounty

1 Replies

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


Loading...