Trouble connecting to another service via private host
I set up a docker image which uses port 6333. The connection url they expect is http://host:6333. I set an environment variable PORT to 6333.
I have a web app which tries to connect to the port but gets denied.
If I expose the docker image via public url, it connects without a problem.
Error initializing vector db TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11576:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async fetchJson (/app/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:113:22)
at async /app/node_modules/@qdrant/js-client-rest/dist/cjs/api-client.js:44:26
at async handler (/app/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:134:16)
at async /app/node_modules/@qdrant/js-client-rest/dist/cjs/api-client.js:30:24
at async handler (/app/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:134:16)
at async fetchUrl (/app/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:140:22)
at async Object.fun [as getCollections] (/app/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:146:20)
at async QdrantClient.getCollections (/app/node_modules/@qdrant/js-client-rest/dist/cjs/qdrant-client.js:780:26) {
cause: Error: connect ECONNREFUSED fd12:cf8d:782e::c:a73d:5c5:6333
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: 'fd12:cf8d:782e::c:a73d:5c5',
port: 6333
}
Want to figure out what's the configuration to allow the connection?
Solution:Jump to solution
the private network is ipv6 only, so this docker service would need to be listening on all ipv6 addresses
11 Replies
Project ID:
9e9c5496-a3a5-4083-ac51-08f3c6805c97
9e9c5496-a3a5-4083-ac51-08f3c6805c97 caring-ghost
Solution
the private network is ipv6 only, so this docker service would need to be listening on all ipv6 addresses
hey Brody, thanks for the answer. is there an example docker config that works for railway?
nothing universal, it depends entirely on the app the docker image runs
so what docker image are you trying to deploy
managed to get it to work. made the image to listen to "::" as host, and used the service name without
railway.internal
as the connection url and it worked!
somehow getaddrinfo fails when using railway.internal.still?
it's working now with the service name only. i first tried to connect using the url with
railway.internal
and it gave me an error. wonder what the difference is.
but happy it's working now tho.awsome! what docker image where you deploying though?
qdrant/qdrant
cool!