jwaltzPRO
9 months ago
I have a web application connected to an API using private networking.
I seem to be receiving an error when trying to fetch.
TypeError: fetch failed
at fetch (/app/node_modules/undici/index.js:112:13)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at action$8 (file:///app/build/server/index.js?t=1721893528000:8308:22)
at Object.callRouteAction (/app/node_modules/@remix-run/server-runtime/dist/data.js:37:16)
at /app/node_modules/@remix-run/server-runtime/dist/single-fetch.js:88:20
at callLoaderOrAction (/app/node_modules/@remix-run/router/router.ts:4881:16)
at /app/node_modules/@remix-run/server-runtime/dist/single-fetch.js:83:20
at async Promise.all (index 1)
at /app/node_modules/@remix-run/server-runtime/dist/single-fetch.js:81:19
at callDataStrategyImpl (/app/node_modules/@remix-run/router/router.ts:4722:17) {
[cause]: Error: connect ECONNREFUSED fd12:8122:4304::7f:7611:cb72:8000
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: 'fd12:8122:4304::7f:7611:cb72',
port: 8000
}
}
The API is listening on "[::1]:8000" and the URL passed to fetch looks good to me:
[http://my-api.railway.internal:8000/api/endpoint](http://my-api.railway.internal:8000/api/endpoint)
I didn't specify https
per the docs.
0 Replies
9 months ago
it needs to listen on [::]
9 months ago
no problem!