postgres DNS not resolving

Is this an internal DNS problem? Private url isn't resolving but works with DATABASE_URL
npm WARN config production Use `--omit=dev` instead.

> tasmota-mqtt-subscriber@1.0.0 start

> node dist/index.js

Failed to connect to PostgreSQL Error: getaddrinfo ENOTFOUND postgres.railway.internal

at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {

errno: -3008,

code: 'ENOTFOUND',

syscall: 'getaddrinfo',

hostname: 'postgres.railway.internal'

}

npm WARN config production Use `--omit=dev` instead.

> tasmota-mqtt-subscriber@1.0.0 start

> node dist/index.js
npm WARN config production Use `--omit=dev` instead.

> tasmota-mqtt-subscriber@1.0.0 start

> node dist/index.js

Failed to connect to PostgreSQL Error: getaddrinfo ENOTFOUND postgres.railway.internal

at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {

errno: -3008,

code: 'ENOTFOUND',

syscall: 'getaddrinfo',

hostname: 'postgres.railway.internal'

}

npm WARN config production Use `--omit=dev` instead.

> tasmota-mqtt-subscriber@1.0.0 start

> node dist/index.js
Solution:
Legacy runtime is no fun, V2 is where it's at
Jump to solution
9 Replies
Percy
Percy5d ago
Project ID: 560b7a6c-de0e-4e7e-9735-0ae63ba4118a
croissant
croissant5d ago
560b7a6c-de0e-4e7e-9735-0ae63ba4118a Nvm fixed
Brody
Brody5d ago
are you on the v2 runtime?
croissant
croissant5d ago
I was on legacy
Solution
Brody
Brody5d ago
Legacy runtime is no fun, V2 is where it's at
croissant
croissant5d ago
I'm not sure why it carried over when I changed V2 to legacy on a different project. This expected? I switched back to V2 now and private networking works now.
Brody
Brody5d ago
it's a per service change, nothing would be carried anywhere
croissant
croissant5d ago
Interesting. The config defaulted to legacy I believe I started a project yesterday and switched the deploy to legacy. Later I deleted the project Today I started a new project which is this but it started as legacy. I'll ignore it i guess thanks
Brody
Brody5d ago
no problem