2 years ago
I am deploying a JavaScript application alongside a Redis and Postgres container.
As soon as the build process finishes, and the deployments tries to run, I receive the following error, indicating a connection failure.
Errorat GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26)
Aug 07 10:16:29
[ioredis] Unhandled error event: Error: getaddrinfo ENOTFOUND redis.railway.internal
EnvironmentREDIS_HOST=redis.railway.internal
REDIS_PORT=
REDIS_USERNAME=
REDIS_PASSWORD=
Application (using ioredis)import { Redis } from 'ioredis';
import config from './config';
new Redis({
host: config.REDIS_HOST,
port: config.REDIS_PORT,
username: config.REDIS_USERNAME,
password: config.REDIS_PASSWORD,
});
1 Replies
2 years ago
Try appending ?family=0 to the end of the URL
Read more: https://docs.railway.app/guides/private-networking#known-configuration-requirements-for-ipv6