6 months ago
Error: getaddrinfo ENOTFOUND redis.railway.internal
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26)
at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -3007,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'redis.railway.internal'
}
11 Replies
6 months ago
What's your use case? where are you currently using it?
Status changed to Awaiting User Response railway[bot] • 6 months ago
6 months ago
im trying to connect to it from another service that has been launched inside railway
Status changed to Awaiting Railway Response railway[bot] • 6 months ago
6 months ago
Does medusa build command connect to redis?
Status changed to Awaiting User Response railway[bot] • 6 months ago
6 months ago
possibly but the build succeeds - the error shows up after the container has launched - some requests that arent using the redis are working - in the meanwhile the node process keeps trying to connect to redis and gets that error.
Status changed to Awaiting Railway Response railway[bot] • 6 months ago
6 months ago
Try using REDIS_URL instead of the REDIS_PRIVATE_URL and then redeploy and let me know what happens.
Status changed to Awaiting User Response railway[bot] • 6 months ago
6 months ago
i tried that it worked - but thats going to go over public - anyway to go over private network?
Status changed to Awaiting Railway Response railway[bot] • 6 months ago
6 months ago
Yeah I know, can you show me the part of the code that connects to Redis?
Status changed to Awaiting User Response railway[bot] • 6 months ago
6 months ago
the actualy code for connecting is hidden away in some module in medusa - the config is in medusa-config:
modules: {
[Modules.FILE]:{
key: Modules.FILE,
resolve: '@medusajs/file',
options: {
providers: [
...(MINIO_ENDPOINT && MINIO_ACCESS_KEY && MINIO_SECRET_KEY ? [{
resolve: './src/modules/minio-file',
id: 'minio',
options: {
endPoint: MINIO_ENDPOINT,
accessKey: MINIO_ACCESS_KEY,
secretKey: MINIO_SECRET_KEY,
bucket: MINIO_BUCKET // Optional, default: medusa-media
}
}] : [{
resolve: '@medusajs/file-local',
id: 'local',
options: {
upload_dir: 'static',
backend_url: `${BACKEND_URL}/static`
}
}])
]
}
},
...(REDIS_URL ? [{
key: Modules.EVENT_BUS,
resolve: '@medusajs/event-bus-redis',
options: {
redisUrl: REDIS_URL
}
},
{
key: Modules.WORKFLOW_ENGINE,
resolve: '@medusajs/workflow-engine-redis',
options: {
redis: {
url: REDIS_URL,
}
}
}] : []),
Status changed to Awaiting Railway Response railway[bot] • 6 months ago
6 months ago
Hello,
Please see our docs on this topic -
https://docs.railway.com/reference/errors/enotfound-redis-railway-internal
Status changed to Awaiting User Response railway[bot] • 6 months ago
Status changed to Awaiting Railway Response railway[bot] • 6 months ago
6 months ago
Glad it worked for you.
Status changed to Awaiting User Response railway[bot] • 6 months ago
Status changed to Solved brody • 6 months ago