Fouzan
Fouzan
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
I am trying to connect my next.js app with Directus using internal routing. Both of them are within the same project. I keep getting this error:
cause: Error: getaddrinfo ENOTFOUND directus.railway.internal

#12 50.12 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26)

#12 50.12 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {

#12 50.12 errno: -3008,

#12 50.12 code: 'ENOTFOUND',

#12 50.12 syscall: 'getaddrinfo',

#12 50.12 hostname: 'directus.railway.internal'

#12 50.12 },

#12 50.12 digest: '2095498725'

#12 50.12 }
cause: Error: getaddrinfo ENOTFOUND directus.railway.internal

#12 50.12 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26)

#12 50.12 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {

#12 50.12 errno: -3008,

#12 50.12 code: 'ENOTFOUND',

#12 50.12 syscall: 'getaddrinfo',

#12 50.12 hostname: 'directus.railway.internal'

#12 50.12 },

#12 50.12 digest: '2095498725'

#12 50.12 }
This is the variable I am using for the route:
DIRECTUS_HOST_URL=http://${{directus.RAILWAY_PRIVATE_DOMAIN}}:${{directus.PORT}}
DIRECTUS_HOST_URL=http://${{directus.RAILWAY_PRIVATE_DOMAIN}}:${{directus.PORT}}
I believe it is due to setting up Ipv6 on the directus instance. I changed the host to :: , but that does not change anything, and neither does ::0.0.0.0.
43 replies