Skip to content

Conversation

@fernandotonon
Copy link

Hi folks, this PR fixes the EAI_AGAIN errors in Docker Compose.

When running Docker Compose, I was getting these errors

rowboat-1  |  ⨯ TypeError: fetch failed
rowboat-1  |     at node:internal/deps/undici/undici:12637:11
rowboat-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
rowboat-1  |     at async h (/app/.next/server/app/api/copilot-stream-response/[streamId]/route.js:1:3585)
rowboat-1  |     at async /app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:38411
rowboat-1  |     at async e_.execute (/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:27880)
rowboat-1  |     at async e_.handle (/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:39943)
rowboat-1  |     at async doRender (/app/node_modules/next/dist/server/base-server.js:1366:42)
rowboat-1  |     at async cacheEntry.responseCache.get.routeKind (/app/node_modules/next/dist/server/base-server.js:1588:28)
rowboat-1  |     at async NextNodeServer.renderToResponseWithComponentsImpl (/app/node_modules/next/dist/server/base-server.js:1496:28)
rowboat-1  |     at async NextNodeServer.renderPageComponent (/app/node_modules/next/dist/server/base-server.js:1924:24) {
rowboat-1  |   cause: Error: getaddrinfo EAI_AGAIN copilot
rowboat-1  |       at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
rowboat-1  |       at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
rowboat-1  |     errno: -3001,
rowboat-1  |     code: 'EAI_AGAIN',
rowboat-1  |     syscall: 'getaddrinfo',
rowboat-1  |     hostname: 'copilot'
rowboat-1  |   }
rowboat-1  | }
rowboat-1  |  ⨯ TypeError: fetch failed
rowboat-1  |     at node:internal/deps/undici/undici:12637:11
rowboat-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
rowboat-1  |     at async f (/app/.next/server/app/api/stream-response/[streamId]/route.js:1:1809)
rowboat-1  |     at async /app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:38411
rowboat-1  |     at async e_.execute (/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:27880)
rowboat-1  |     at async e_.handle (/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:39943)
rowboat-1  |     at async doRender (/app/node_modules/next/dist/server/base-server.js:1366:42)
rowboat-1  |     at async cacheEntry.responseCache.get.routeKind (/app/node_modules/next/dist/server/base-server.js:1588:28)
rowboat-1  |     at async NextNodeServer.renderToResponseWithComponentsImpl (/app/node_modules/next/dist/server/base-server.js:1496:28)
rowboat-1  |     at async NextNodeServer.renderPageComponent (/app/node_modules/next/dist/server/base-server.js:1924:24) {
rowboat-1  |   cause: Error: getaddrinfo EAI_AGAIN rowboat_agents
rowboat-1  |       at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
rowboat-1  |       at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
rowboat-1  |     errno: -3001,
rowboat-1  |     code: 'EAI_AGAIN',
rowboat-1  |     syscall: 'getaddrinfo',
rowboat-1  |     hostname: 'rowboat_agents'
rowboat-1  |   }
rowboat-1  | }

The rowboat container couldn't find the other containers, explicitly adding all of them to the same network fixes the issue.

I believe this was happening on my side because of the initialization order, maybe another fix could be adding some depends_on, but the network seems to be a more reliable fix. Thanks for considering this PR.

@vercel
Copy link

vercel bot commented Jul 1, 2025

@fernandotonon is attempting to deploy a commit to the RowBoat Labs Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLAassistant commented Jul 1, 2025

CLA assistant check
All committers have signed the CLA.

@fernandotonon fernandotonon changed the title fix EAI_AGAIN error on docker compose fix: EAI_AGAIN error on docker compose Jul 1, 2025
@fernandotonon fernandotonon changed the base branch from main to dev July 1, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants