Open johnfelipe opened 3 days ago
To resolve the "ERROR [client internal] load metadata for docker.io/library/node:19.4" and "fetch failed" errors during the Docker build process, you can try the following steps:
Check Docker Daemon Configuration: Ensure that your Docker daemon is running and properly configured. Sometimes, restarting the Docker service can resolve such issues.
Network Issues: The error might be due to network issues. Ensure that your machine has a stable internet connection. You can also try switching to a different network or using a VPN.
Docker Hub Connectivity: Sometimes, Docker Hub might be experiencing issues. You can check the status of Docker Hub at Docker Status.
Use a Different Node Version: There might be an issue with the specific Node.js version you are trying to use. You can try using a different version of the Node.js image. For example, you can change node:19.4.0-alpine3.17
to another version like node:18-alpine
.
Here is an example of how you can modify your Dockerfile to use a different Node.js version:
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]
--no-cache
option:docker build --no-cache -t your_image_name .
If the issue persists after trying these steps, it might be helpful to provide more detailed logs or error messages for further diagnosis [1].
To continue talking to Dosu, mention @dosu.
@dosu
=> ERROR [client 6/6] RUN npm run build 64.1s
------
> [client 6/6] RUN npm run build:
0.532
0.532 > client@0.1.0 build
0.532 > next build
0.532
1.592 Attention: Next.js now collects completely anonymous telemetry regarding usage.
1.593 This information is used to shape Next.js' roadmap and prioritize features.
1.593 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
1.593 https://nextjs.org/telemetry
1.593
1.706 ▲ Next.js 14.2.3
1.706 - Environments: .env
1.706
1.845 Creating an optimized production build ...
52.10 ✓ Compiled successfully
52.10 Skipping linting
52.10 Checking validity of types ...
59.69 Collecting page data ...
62.54 Generating static pages (0/15) ...
62.94 Get request failed TypeError: fetch failed
62.94 at node:internal/deps/undici/undici:12618:11
62.94 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
62.94 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
62.94 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
62.94 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
62.94 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
62.94 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
62.94 errno: -111,
62.94 code: 'ECONNREFUSED',
62.94 syscall: 'connect',
62.94 address: '192.168.20.20',
62.94 port: 8000
62.94 }
62.94 }
62.94 TypeError: fetch failed
62.94 at node:internal/deps/undici/undici:12618:11
62.94 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
62.94 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
62.94 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
62.94 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
62.94 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
62.94 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
62.94 errno: -111,
62.94 code: 'ECONNREFUSED',
62.94 syscall: 'connect',
62.94 address: '192.168.20.20',
62.94 port: 8000
62.94 },
62.94 digest: '776526506'
62.94 }
62.94 Get request failed TypeError: fetch failed
62.94 at node:internal/deps/undici/undici:12618:11
62.94 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
62.94 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
62.94 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
62.94 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
62.94 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
62.94 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
62.94 errno: -111,
62.94 code: 'ECONNREFUSED',
62.94 syscall: 'connect',
62.94 address: '192.168.20.20',
62.94 port: 8000
62.94 }
62.94 }
62.94 TypeError: fetch failed
62.94 at node:internal/deps/undici/undici:12618:11
62.94 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
62.94 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
62.94 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
62.94 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
62.94 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
62.94 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
62.94 errno: -111,
62.94 code: 'ECONNREFUSED',
62.94 syscall: 'connect',
62.94 address: '192.168.20.20',
62.94 port: 8000
62.94 },
62.94 digest: '776526506'
62.94 }
62.94
62.94 Error occurred prerendering page "/settings/logs". Read more: https://nextjs.org/docs/messages/prerender-error
62.94
62.94 TypeError: fetch failed
62.94 at node:internal/deps/undici/undici:12618:11
62.94 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
62.94 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
62.94 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873)
62.94 Generating static pages (3/15)
63.12 Generating static pages (7/15)
63.52 Generating static pages (11/15)
63.52 Get request failed TypeError: fetch failed
63.52 at node:internal/deps/undici/undici:12618:11
63.52 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.52 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
63.52 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
63.52 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
63.52 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
63.52 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
63.52 errno: -111,
63.52 code: 'ECONNREFUSED',
63.52 syscall: 'connect',
63.52 address: '192.168.20.20',
63.52 port: 8000
63.52 }
63.52 }
63.52 TypeError: fetch failed
63.52 at node:internal/deps/undici/undici:12618:11
63.52 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.52 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
63.52 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
63.52 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
63.52 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
63.52 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
63.52 errno: -111,
63.52 code: 'ECONNREFUSED',
63.52 syscall: 'connect',
63.52 address: '192.168.20.20',
63.52 port: 8000
63.52 },
63.52 digest: '143603942'
63.52 }
63.52 Get request failed TypeError: fetch failed
63.52 at node:internal/deps/undici/undici:12618:11
63.52 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.52 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
63.52 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
63.52 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
63.52 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
63.52 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
63.52 errno: -111,
63.52 code: 'ECONNREFUSED',
63.52 syscall: 'connect',
63.52 address: '192.168.20.20',
63.52 port: 8000
63.52 }
63.52 }
63.52 TypeError: fetch failed
63.52 at node:internal/deps/undici/undici:12618:11
63.52 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.52 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
63.52 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
63.52 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
63.52 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
63.52 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
63.52 errno: -111,
63.52 code: 'ECONNREFUSED',
63.52 syscall: 'connect',
63.52 address: '192.168.20.20',
63.52 port: 8000
63.52 },
63.52 digest: '143603942'
63.52 }
63.52
63.52 Error occurred prerendering page "/settings/workspaces/addspaces". Read more: https://nextjs.org/docs/messages/prerender-error
63.52
63.52 TypeError: fetch failed
63.52 at node:internal/deps/undici/undici:12618:11
63.52 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.52 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
63.52 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080)
63.69 Get request failed TypeError: fetch failed
63.69 at node:internal/deps/undici/undici:12618:11
63.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.69 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.69 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
63.69 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
63.69 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
63.69 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
63.69 errno: -111,
63.69 code: 'ECONNREFUSED',
63.69 syscall: 'connect',
63.69 address: '192.168.20.20',
63.69 port: 8000
63.69 }
63.69 }
63.69 TypeError: fetch failed
63.69 at node:internal/deps/undici/undici:12618:11
63.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.69 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.69 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
63.69 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
63.69 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
63.69 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
63.69 errno: -111,
63.69 code: 'ECONNREFUSED',
63.69 syscall: 'connect',
63.69 address: '192.168.20.20',
63.69 port: 8000
63.69 },
63.69 digest: '3387896984'
63.69 }
63.69 Get request failed TypeError: fetch failed
63.69 at node:internal/deps/undici/undici:12618:11
63.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.69 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.69 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
63.69 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
63.69 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
63.69 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
63.69 errno: -111,
63.69 code: 'ECONNREFUSED',
63.69 syscall: 'connect',
63.69 address: '192.168.20.20',
63.69 port: 8000
63.69 }
63.69 }
63.69 TypeError: fetch failed
63.69 at node:internal/deps/undici/undici:12618:11
63.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.69 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.69 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
63.69 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
63.69 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
63.69 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
63.69 errno: -111,
63.69 code: 'ECONNREFUSED',
63.69 syscall: 'connect',
63.69 address: '192.168.20.20',
63.69 port: 8000
63.69 },
63.69 digest: '3387896984'
63.69 }
63.69
63.69 Error occurred prerendering page "/settings/datasets". Read more: https://nextjs.org/docs/messages/prerender-error
63.69
63.69 TypeError: fetch failed
63.69 at node:internal/deps/undici/undici:12618:11
63.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.69 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
63.69 at async u (/app/build/server/app/settings/datasets/page.js:1:8848)
63.69 Get request failed TypeError: fetch failed
63.69 at node:internal/deps/undici/undici:12618:11
63.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.69 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
63.69 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
63.69 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
63.69 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
63.69 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
63.69 errno: -111,
63.69 code: 'ECONNREFUSED',
63.69 syscall: 'connect',
63.69 address: '192.168.20.20',
63.69 port: 8000
63.69 }
63.69 }
63.69 TypeError: fetch failed
63.69 at node:internal/deps/undici/undici:12618:11
63.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.69 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
63.69 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
63.69 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
63.69 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
63.69 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
63.69 errno: -111,
63.69 code: 'ECONNREFUSED',
63.69 syscall: 'connect',
63.69 address: '192.168.20.20',
63.69 port: 8000
63.69 },
63.69 digest: '1985277972'
63.69 }
63.69 Get request failed TypeError: fetch failed
63.69 at node:internal/deps/undici/undici:12618:11
63.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.69 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
63.69 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
63.69 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
63.69 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
63.69 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
63.69 errno: -111,
63.69 code: 'ECONNREFUSED',
63.69 syscall: 'connect',
63.69 address: '192.168.20.20',
63.69 port: 8000
63.69 }
63.69 }
63.69 TypeError: fetch failed
63.69 at node:internal/deps/undici/undici:12618:11
63.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.69 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
63.69 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
63.69 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
63.69 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
63.69 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
63.69 errno: -111,
63.69 code: 'ECONNREFUSED',
63.69 syscall: 'connect',
63.69 address: '192.168.20.20',
63.69 port: 8000
63.69 },
63.69 digest: '1985277972'
63.69 }
63.69
63.69 Error occurred prerendering page "/settings/workspaces/editspaces". Read more: https://nextjs.org/docs/messages/prerender-error
63.69
63.69 TypeError: fetch failed
63.69 at node:internal/deps/undici/undici:12618:11
63.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.69 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
63.69 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135)
63.69 Get request failed TypeError: fetch failed
63.69 at node:internal/deps/undici/undici:12618:11
63.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.69 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:14147)
63.69 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
63.69 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
63.69 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
63.69 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
63.69 errno: -111,
63.69 code: 'ECONNREFUSED',
63.69 syscall: 'connect',
63.69 address: '192.168.20.20',
63.69 port: 8000
63.69 }
63.69 }
63.69 TypeError: fetch failed
63.69 at node:internal/deps/undici/undici:12618:11
63.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.69 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:14147)
63.69 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
63.69 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
63.69 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
63.69 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
63.69 errno: -111,
63.69 code: 'ECONNREFUSED',
63.69 syscall: 'connect',
63.69 address: '192.168.20.20',
63.69 port: 8000
63.69 },
63.69 digest: '1183241840'
63.69 }
63.69 Get request failed TypeError: fetch failed
63.69 at node:internal/deps/undici/undici:12618:11
63.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.69 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:14147)
63.69 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
63.69 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
63.69 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
63.69 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
63.69 errno: -111,
63.69 code: 'ECONNREFUSED',
63.69 syscall: 'connect',
63.69 address: '192.168.20.20',
63.69 port: 8000
63.69 }
63.69 }
63.69 TypeError: fetch failed
63.69 at node:internal/deps/undici/undici:12618:11
63.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.69 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:14147)
63.69 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
63.69 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
63.69 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
63.69 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
63.69 errno: -111,
63.69 code: 'ECONNREFUSED',
63.69 syscall: 'connect',
63.69 address: '192.168.20.20',
63.69 port: 8000
63.69 },
63.69 digest: '1183241840'
63.69 }
63.69
63.69 Error occurred prerendering page "/settings/workspaces". Read more: https://nextjs.org/docs/messages/prerender-error
63.69
63.69 TypeError: fetch failed
63.69 at node:internal/deps/undici/undici:12618:11
63.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
63.69 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:14147)
63.69 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244)
63.69 ✓ Generating static pages (15/15)
63.71
63.71 > Export encountered errors on following paths:
63.71 /(ee)/settings/logs/page: /settings/logs
63.71 /settings/datasets/page: /settings/datasets
63.71 /settings/workspaces/addspaces/page: /settings/workspaces/addspaces
63.71 /settings/workspaces/editspaces/page: /settings/workspaces/editspaces
63.71 /settings/workspaces/page: /settings/workspaces
------
failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
how fix this?
To fix the "fetch failed" and "ECONNREFUSED" errors during the "npm run build" process in your Docker setup, you can try adding the following lines to your Dockerfile to ensure that the npm registry is accessible and to handle network issues:
FROM node:19.4.0-alpine3.17
WORKDIR /app
COPY package*.json ./
# Set npm registry to use HTTP instead of HTTPS
RUN npm config set registry http://registry.npmjs.org/
# Retry npm install in case of network issues
RUN npm install --retry 5
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]
This configuration sets the npm registry to use HTTP and adds a retry mechanism to the npm install
command, which can help mitigate transient network issues [1].
Additionally, ensure that your environment variables are correctly set up in the .env
file, as they are crucial for the Next.js application to function properly. Here is an example of the required environment variables:
# THE URL OF YOUR CLIENT
NEXT_PUBLIC_API_URL='http://localhost:8000/'
# ENVIRONMENT
NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN="development"
# ANALYTICS
NEXT_PUBLIC_MIXPANEL_TOKEN="04a81d58ade99299e19e5a89fe84c670"
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID="G-SD7MBGS6J9"
# SUPPORT CHAT
NEXT_PUBLIC_INTERCOM_APP_ID="jzfk3qc5"
# ENV
NODE_ENV="development"
These variables are used in the next.config.mjs
file for various configurations [2][3].
To continue talking to Dosu, mention @dosu.
@dosu i think issue is 192.168.20.20 i need to put
NEXT_PUBLIC_API_URL='http://192.168.20.20:8000/'
not localhost
=> ERROR [client 7/7] RUN npm run build 77.8s
------
> [client 7/7] RUN npm run build:
0.974
0.974 > client@0.1.0 build
0.974 > next build
0.974
2.212 Attention: Next.js now collects completely anonymous telemetry regarding usage.
2.213 This information is used to shape Next.js' roadmap and prioritize features.
2.213 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
2.213 https://nextjs.org/telemetry
2.213
2.340 ▲ Next.js 14.2.3
2.340 - Environments: .env
2.340
2.454 Creating an optimized production build ...
61.43 ✓ Compiled successfully
61.43 Skipping linting
61.43 Checking validity of types ...
72.56 Collecting page data ...
76.12 Generating static pages (0/15) ...
76.50 Generating static pages (3/15)
76.50 Get request failed TypeError: fetch failed
76.50 at Object.fetch (node:internal/deps/undici/undici:14152:11)
76.50 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
76.50 at async i (/app/build/server/app/(ee)/settings/logs/[id]/page.js:8:36612)
76.50 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
76.50 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
76.50 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
76.50 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
76.50 errno: -111,
76.50 code: 'ECONNREFUSED',
76.50 syscall: 'connect',
76.50 address: '192.168.20.20',
76.50 port: 8000
76.50 }
76.50 }
76.50 TypeError: fetch failed
76.50 at Object.fetch (node:internal/deps/undici/undici:14152:11)
76.50 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
76.50 at async i (/app/build/server/app/(ee)/settings/logs/[id]/page.js:8:36612)
76.50 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
76.50 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
76.50 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
76.50 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
76.50 errno: -111,
76.50 code: 'ECONNREFUSED',
76.50 syscall: 'connect',
76.50 address: '192.168.20.20',
76.50 port: 8000
76.50 },
76.50 digest: '2074752815'
76.50 }
76.50 Get request failed TypeError: fetch failed
76.50 at Object.fetch (node:internal/deps/undici/undici:14152:11)
76.50 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
76.50 at async i (/app/build/server/app/(ee)/settings/logs/[id]/page.js:8:36612)
76.50 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
76.50 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
76.50 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
76.50 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
76.50 errno: -111,
76.50 code: 'ECONNREFUSED',
76.50 syscall: 'connect',
76.50 address: '192.168.20.20',
76.50 port: 8000
76.50 }
76.50 }
76.50 TypeError: fetch failed
76.50 at Object.fetch (node:internal/deps/undici/undici:14152:11)
76.50 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
76.50 at async i (/app/build/server/app/(ee)/settings/logs/[id]/page.js:8:36612)
76.50 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
76.50 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
76.50 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
76.50 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
76.50 errno: -111,
76.50 code: 'ECONNREFUSED',
76.50 syscall: 'connect',
76.50 address: '192.168.20.20',
76.50 port: 8000
76.50 },
76.50 digest: '2074752815'
76.50 }
76.50
76.50 Error occurred prerendering page "/settings/logs". Read more: https://nextjs.org/docs/messages/prerender-error
76.50
76.50 TypeError: fetch failed
76.50 at Object.fetch (node:internal/deps/undici/undici:14152:11)
76.50 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
76.50 at async i (/app/build/server/app/(ee)/settings/logs/[id]/page.js:8:36612)
76.50 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873)
76.75 Generating static pages (7/15)
77.16 Generating static pages (11/15)
77.32 Get request failed TypeError: fetch failed
77.32 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.32 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
77.32 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
77.32 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
77.32 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.32 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.32 errno: -111,
77.32 code: 'ECONNREFUSED',
77.32 syscall: 'connect',
77.32 address: '192.168.20.20',
77.32 port: 8000
77.32 }
77.32 }
77.32 TypeError: fetch failed
77.32 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.32 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
77.32 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
77.32 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
77.32 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.32 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.32 errno: -111,
77.32 code: 'ECONNREFUSED',
77.32 syscall: 'connect',
77.32 address: '192.168.20.20',
77.32 port: 8000
77.32 },
77.32 digest: '4039937587'
77.32 }
77.32 Get request failed TypeError: fetch failed
77.32 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.32 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
77.32 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
77.32 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
77.32 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.32 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.32 errno: -111,
77.32 code: 'ECONNREFUSED',
77.32 syscall: 'connect',
77.32 address: '192.168.20.20',
77.32 port: 8000
77.32 }
77.32 }
77.32 TypeError: fetch failed
77.32 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.32 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
77.32 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
77.32 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
77.32 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.32 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.32 errno: -111,
77.32 code: 'ECONNREFUSED',
77.32 syscall: 'connect',
77.32 address: '192.168.20.20',
77.32 port: 8000
77.32 },
77.32 digest: '4039937587'
77.32 }
77.32
77.32 Error occurred prerendering page "/settings/datasets". Read more: https://nextjs.org/docs/messages/prerender-error
77.32
77.32 TypeError: fetch failed
77.32 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.32 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
77.32 at async u (/app/build/server/app/settings/datasets/page.js:1:8848)
77.32 Get request failed TypeError: fetch failed
77.32 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.32 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
77.32 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
77.32 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
77.32 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.32 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.32 errno: -111,
77.32 code: 'ECONNREFUSED',
77.32 syscall: 'connect',
77.32 address: '192.168.20.20',
77.32 port: 8000
77.32 }
77.32 }
77.32 TypeError: fetch failed
77.32 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.32 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
77.32 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
77.32 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
77.32 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.32 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.32 errno: -111,
77.32 code: 'ECONNREFUSED',
77.32 syscall: 'connect',
77.32 address: '192.168.20.20',
77.32 port: 8000
77.32 },
77.32 digest: '2692158989'
77.32 }
77.32 Get request failed TypeError: fetch failed
77.32 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.32 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
77.32 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
77.32 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
77.32 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.32 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.32 errno: -111,
77.32 code: 'ECONNREFUSED',
77.32 syscall: 'connect',
77.32 address: '192.168.20.20',
77.32 port: 8000
77.32 }
77.32 }
77.32 TypeError: fetch failed
77.32 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.32 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
77.32 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
77.32 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
77.32 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.32 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.32 errno: -111,
77.32 code: 'ECONNREFUSED',
77.32 syscall: 'connect',
77.32 address: '192.168.20.20',
77.32 port: 8000
77.32 },
77.32 digest: '2692158989'
77.32 }
77.32
77.32 Error occurred prerendering page "/settings/workspaces/addspaces". Read more: https://nextjs.org/docs/messages/prerender-error
77.32
77.32 TypeError: fetch failed
77.32 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.32 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
77.32 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080)
77.32 Get request failed TypeError: fetch failed
77.32 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.32 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
77.32 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
77.32 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
77.32 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.32 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.32 errno: -111,
77.32 code: 'ECONNREFUSED',
77.32 syscall: 'connect',
77.32 address: '192.168.20.20',
77.32 port: 8000
77.32 }
77.32 }
77.32 TypeError: fetch failed
77.32 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.32 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
77.32 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
77.32 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
77.32 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.32 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.32 errno: -111,
77.32 code: 'ECONNREFUSED',
77.32 syscall: 'connect',
77.32 address: '192.168.20.20',
77.32 port: 8000
77.32 },
77.32 digest: '1656975805'
77.32 }
77.32 Get request failed TypeError: fetch failed
77.32 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.32 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
77.32 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
77.32 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
77.32 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.32 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.32 errno: -111,
77.32 code: 'ECONNREFUSED',
77.32 syscall: 'connect',
77.32 address: '192.168.20.20',
77.32 port: 8000
77.32 }
77.32 }
77.32 TypeError: fetch failed
77.32 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.32 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
77.32 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
77.32 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
77.32 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.32 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.32 errno: -111,
77.32 code: 'ECONNREFUSED',
77.32 syscall: 'connect',
77.32 address: '192.168.20.20',
77.32 port: 8000
77.32 },
77.32 digest: '1656975805'
77.32 }
77.32
77.32 Error occurred prerendering page "/settings/workspaces/editspaces". Read more: https://nextjs.org/docs/messages/prerender-error
77.32
77.32 TypeError: fetch failed
77.32 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.32 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
77.32 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135)
77.38 Get request failed TypeError: fetch failed
77.38 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.38 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.38 at async n (/app/build/server/app/settings/workspaces/[id]/page.js:1:21597)
77.38 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
77.38 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
77.38 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.38 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.38 errno: -111,
77.38 code: 'ECONNREFUSED',
77.38 syscall: 'connect',
77.38 address: '192.168.20.20',
77.38 port: 8000
77.38 }
77.38 }
77.38 TypeError: fetch failed
77.38 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.38 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.38 at async n (/app/build/server/app/settings/workspaces/[id]/page.js:1:21597)
77.38 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
77.38 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
77.38 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.38 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.38 errno: -111,
77.38 code: 'ECONNREFUSED',
77.38 syscall: 'connect',
77.38 address: '192.168.20.20',
77.38 port: 8000
77.38 },
77.38 digest: '3812785553'
77.38 }
77.38 Get request failed TypeError: fetch failed
77.38 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.38 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.38 at async n (/app/build/server/app/settings/workspaces/[id]/page.js:1:21597)
77.38 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
77.38 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
77.38 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.38 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.38 errno: -111,
77.38 code: 'ECONNREFUSED',
77.38 syscall: 'connect',
77.38 address: '192.168.20.20',
77.38 port: 8000
77.38 }
77.38 }
77.38 TypeError: fetch failed
77.38 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.38 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.38 at async n (/app/build/server/app/settings/workspaces/[id]/page.js:1:21597)
77.38 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
77.38 cause: Error: connect ECONNREFUSED 192.168.20.20:8000
77.38 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.38 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.38 errno: -111,
77.38 code: 'ECONNREFUSED',
77.38 syscall: 'connect',
77.38 address: '192.168.20.20',
77.38 port: 8000
77.38 },
77.38 digest: '3812785553'
77.38 }
77.38
77.38 Error occurred prerendering page "/settings/workspaces". Read more: https://nextjs.org/docs/messages/prerender-error
77.38
77.38 TypeError: fetch failed
77.38 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.38 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.38 at async n (/app/build/server/app/settings/workspaces/[id]/page.js:1:21597)
77.38 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244)
77.38 ✓ Generating static pages (15/15)
77.40
77.40 > Export encountered errors on following paths:
77.40 /(ee)/settings/logs/page: /settings/logs
77.40 /settings/datasets/page: /settings/datasets
77.40 /settings/workspaces/addspaces/page: /settings/workspaces/addspaces
77.40 /settings/workspaces/editspaces/page: /settings/workspaces/editspaces
77.40 /settings/workspaces/page: /settings/workspaces
------
failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
how solve this issue?
To resolve the "fetch failed" and "ECONNREFUSED" errors during the "npm run build" process when using the URL http://192.168.20.20:8000/
in the NEXT_PUBLIC_API_URL
environment variable, ensure that the server at http://192.168.20.20:8000/
is running and accessible from the machine where you are running the build process.
Here are some steps you can take to troubleshoot and resolve the issue:
Check Server Status: Verify that the server at http://192.168.20.20:8000/
is up and running. You can do this by trying to access the URL in a web browser or using a tool like curl
:
curl http://192.168.20.20:8000/
Network Accessibility: Ensure that the machine running the build process can reach 192.168.20.20
on the network. This might involve checking network configurations, firewall settings, or VPN connections.
Environment Configuration: Double-check that the NEXT_PUBLIC_API_URL
is correctly set in your environment configuration file (.env
):
NEXT_PUBLIC_API_URL='http://192.168.20.20:8000/'
Server Logs: Check the logs of the server running at 192.168.20.20:8000
for any errors or issues that might be causing it to refuse connections.
Localhost Testing: As a temporary measure, you can set the NEXT_PUBLIC_API_URL
to http://localhost:8000/
if you are running the server locally:
NEXT_PUBLIC_API_URL='http://localhost:8000/'
By following these steps, you should be able to identify and resolve the cause of the "fetch failed" and "ECONNREFUSED" errors [1].
To continue talking to Dosu, mention @dosu.
@dosu i chante to localhost and still show error:
=> ERROR [client 7/7] RUN npm run build 77.6s
------
> [client 7/7] RUN npm run build:
1.005
1.005 > client@0.1.0 build
1.005 > next build
1.005
2.134 Attention: Next.js now collects completely anonymous telemetry regarding usage.
2.135 This information is used to shape Next.js' roadmap and prioritize features.
2.136 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
2.136 https://nextjs.org/telemetry
2.136
2.269 ▲ Next.js 14.2.3
2.269 - Environments: .env
2.270
2.396 Creating an optimized production build ...
61.16 ✓ Compiled successfully
61.16 Skipping linting
61.16 Checking validity of types ...
72.12 Collecting page data ...
75.83 Generating static pages (0/15) ...
76.22 Generating static pages (3/15)
76.22 Get request failed TypeError: fetch failed
76.22 at Object.fetch (node:internal/deps/undici/undici:14152:11)
76.22 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
76.22 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
76.22 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
76.22 cause: Error: connect ECONNREFUSED ::1:8000
76.22 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
76.22 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
76.22 errno: -111,
76.22 code: 'ECONNREFUSED',
76.22 syscall: 'connect',
76.22 address: '::1',
76.22 port: 8000
76.22 }
76.22 }
76.22 TypeError: fetch failed
76.22 at Object.fetch (node:internal/deps/undici/undici:14152:11)
76.22 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
76.22 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
76.22 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
76.22 cause: Error: connect ECONNREFUSED ::1:8000
76.22 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
76.22 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
76.22 errno: -111,
76.22 code: 'ECONNREFUSED',
76.22 syscall: 'connect',
76.22 address: '::1',
76.22 port: 8000
76.22 },
76.22 digest: '1265277443'
76.22 }
76.22 Get request failed TypeError: fetch failed
76.22 at Object.fetch (node:internal/deps/undici/undici:14152:11)
76.22 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
76.22 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
76.22 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
76.22 cause: Error: connect ECONNREFUSED ::1:8000
76.22 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
76.22 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
76.22 errno: -111,
76.22 code: 'ECONNREFUSED',
76.22 syscall: 'connect',
76.22 address: '::1',
76.22 port: 8000
76.22 }
76.22 }
76.22 TypeError: fetch failed
76.22 at Object.fetch (node:internal/deps/undici/undici:14152:11)
76.22 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
76.22 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
76.22 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
76.22 cause: Error: connect ECONNREFUSED ::1:8000
76.22 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
76.22 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
76.22 errno: -111,
76.22 code: 'ECONNREFUSED',
76.22 syscall: 'connect',
76.22 address: '::1',
76.22 port: 8000
76.22 },
76.22 digest: '1265277443'
76.22 }
76.22
76.22 Error occurred prerendering page "/settings/logs". Read more: https://nextjs.org/docs/messages/prerender-error
76.22
76.22 TypeError: fetch failed
76.22 at Object.fetch (node:internal/deps/undici/undici:14152:11)
76.22 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
76.22 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
76.22 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873)
76.43 Generating static pages (7/15)
77.03 Get request failed TypeError: fetch failed
77.03 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.03 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.03 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
77.03 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
77.03 cause: Error: connect ECONNREFUSED ::1:8000
77.03 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.03 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.03 errno: -111,
77.03 code: 'ECONNREFUSED',
77.03 syscall: 'connect',
77.03 address: '::1',
77.03 port: 8000
77.03 }
77.03 }
77.03 TypeError: fetch failed
77.03 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.03 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.03 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
77.03 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
77.03 cause: Error: connect ECONNREFUSED ::1:8000
77.03 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.03 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.03 errno: -111,
77.03 code: 'ECONNREFUSED',
77.03 syscall: 'connect',
77.03 address: '::1',
77.03 port: 8000
77.03 },
77.03 digest: '4039937587'
77.03 }
77.03 Get request failed TypeError: fetch failed
77.03 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.03 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.03 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
77.03 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
77.03 cause: Error: connect ECONNREFUSED ::1:8000
77.03 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.03 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.03 errno: -111,
77.03 code: 'ECONNREFUSED',
77.03 syscall: 'connect',
77.03 address: '::1',
77.03 port: 8000
77.03 }
77.03 }
77.03 TypeError: fetch failed
77.03 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.03 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.03 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
77.03 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
77.03 cause: Error: connect ECONNREFUSED ::1:8000
77.03 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.03 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.03 errno: -111,
77.03 code: 'ECONNREFUSED',
77.03 syscall: 'connect',
77.03 address: '::1',
77.03 port: 8000
77.03 },
77.03 digest: '4039937587'
77.03 }
77.03
77.03 Error occurred prerendering page "/settings/datasets". Read more: https://nextjs.org/docs/messages/prerender-error
77.03
77.03 TypeError: fetch failed
77.03 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.03 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.03 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
77.03 at async u (/app/build/server/app/settings/datasets/page.js:1:8848)
77.03 Generating static pages (11/15)
77.19 Get request failed TypeError: fetch failed
77.19 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.19 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.19 at async n (/app/build/server/app/settings/workspaces/page.js:1:13344)
77.19 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
77.19 cause: Error: connect ECONNREFUSED ::1:8000
77.19 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.19 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.19 errno: -111,
77.19 code: 'ECONNREFUSED',
77.19 syscall: 'connect',
77.19 address: '::1',
77.19 port: 8000
77.19 }
77.19 }
77.19 TypeError: fetch failed
77.19 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.19 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.19 at async n (/app/build/server/app/settings/workspaces/page.js:1:13344)
77.19 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
77.19 cause: Error: connect ECONNREFUSED ::1:8000
77.19 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.19 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.19 errno: -111,
77.19 code: 'ECONNREFUSED',
77.19 syscall: 'connect',
77.19 address: '::1',
77.19 port: 8000
77.19 },
77.19 digest: '3628362172'
77.19 }
77.19 Get request failed TypeError: fetch failed
77.19 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.19 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.19 at async n (/app/build/server/app/settings/workspaces/page.js:1:13344)
77.19 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
77.19 cause: Error: connect ECONNREFUSED ::1:8000
77.19 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.19 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.19 errno: -111,
77.19 code: 'ECONNREFUSED',
77.19 syscall: 'connect',
77.19 address: '::1',
77.19 port: 8000
77.19 }
77.19 }
77.19 TypeError: fetch failed
77.19 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.19 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.19 at async n (/app/build/server/app/settings/workspaces/page.js:1:13344)
77.19 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
77.19 cause: Error: connect ECONNREFUSED ::1:8000
77.19 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.19 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.19 errno: -111,
77.19 code: 'ECONNREFUSED',
77.19 syscall: 'connect',
77.19 address: '::1',
77.19 port: 8000
77.19 },
77.19 digest: '3628362172'
77.19 }
77.19
77.19 Error occurred prerendering page "/settings/workspaces". Read more: https://nextjs.org/docs/messages/prerender-error
77.19
77.19 TypeError: fetch failed
77.19 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.19 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.19 at async n (/app/build/server/app/settings/workspaces/page.js:1:13344)
77.19 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244)
77.19 Get request failed TypeError: fetch failed
77.19 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.19 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.19 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:13704)
77.19 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
77.19 cause: Error: connect ECONNREFUSED ::1:8000
77.19 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.19 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.19 errno: -111,
77.19 code: 'ECONNREFUSED',
77.19 syscall: 'connect',
77.19 address: '::1',
77.19 port: 8000
77.19 }
77.19 }
77.19 TypeError: fetch failed
77.19 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.19 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.19 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:13704)
77.19 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
77.19 cause: Error: connect ECONNREFUSED ::1:8000
77.19 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.19 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.19 errno: -111,
77.19 code: 'ECONNREFUSED',
77.19 syscall: 'connect',
77.19 address: '::1',
77.19 port: 8000
77.19 },
77.19 digest: '711901359'
77.19 }
77.19 Get request failed TypeError: fetch failed
77.19 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.19 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.19 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:13704)
77.19 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
77.19 cause: Error: connect ECONNREFUSED ::1:8000
77.19 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.19 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.19 errno: -111,
77.19 code: 'ECONNREFUSED',
77.19 syscall: 'connect',
77.19 address: '::1',
77.19 port: 8000
77.19 }
77.19 }
77.19 TypeError: fetch failed
77.19 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.19 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.19 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:13704)
77.19 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
77.19 cause: Error: connect ECONNREFUSED ::1:8000
77.19 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.19 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.19 errno: -111,
77.19 code: 'ECONNREFUSED',
77.19 syscall: 'connect',
77.19 address: '::1',
77.19 port: 8000
77.19 },
77.19 digest: '711901359'
77.19 }
77.19
77.19 Error occurred prerendering page "/settings/workspaces/editspaces". Read more: https://nextjs.org/docs/messages/prerender-error
77.19
77.19 TypeError: fetch failed
77.19 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.19 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.19 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:13704)
77.19 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135)
77.20 Get request failed TypeError: fetch failed
77.20 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.20 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.20 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
77.20 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
77.20 cause: Error: connect ECONNREFUSED ::1:8000
77.20 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.20 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.20 errno: -111,
77.20 code: 'ECONNREFUSED',
77.20 syscall: 'connect',
77.20 address: '::1',
77.20 port: 8000
77.20 }
77.20 }
77.20 TypeError: fetch failed
77.20 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.20 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.20 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
77.20 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
77.20 cause: Error: connect ECONNREFUSED ::1:8000
77.20 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.20 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.20 errno: -111,
77.20 code: 'ECONNREFUSED',
77.20 syscall: 'connect',
77.20 address: '::1',
77.20 port: 8000
77.20 },
77.20 digest: '2692158989'
77.20 }
77.20 Get request failed TypeError: fetch failed
77.20 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.20 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.20 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
77.20 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
77.20 cause: Error: connect ECONNREFUSED ::1:8000
77.20 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.20 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.20 errno: -111,
77.20 code: 'ECONNREFUSED',
77.20 syscall: 'connect',
77.20 address: '::1',
77.20 port: 8000
77.20 }
77.20 }
77.20 TypeError: fetch failed
77.20 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.20 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.20 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
77.20 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
77.20 cause: Error: connect ECONNREFUSED ::1:8000
77.20 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
77.20 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
77.20 errno: -111,
77.20 code: 'ECONNREFUSED',
77.20 syscall: 'connect',
77.20 address: '::1',
77.20 port: 8000
77.20 },
77.20 digest: '2692158989'
77.20 }
77.20
77.20 Error occurred prerendering page "/settings/workspaces/addspaces". Read more: https://nextjs.org/docs/messages/prerender-error
77.20
77.20 TypeError: fetch failed
77.20 at Object.fetch (node:internal/deps/undici/undici:14152:11)
77.20 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
77.20 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
77.20 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080)
77.20 ✓ Generating static pages (15/15)
77.21
77.21 > Export encountered errors on following paths:
77.21 /(ee)/settings/logs/page: /settings/logs
77.21 /settings/datasets/page: /settings/datasets
77.21 /settings/workspaces/addspaces/page: /settings/workspaces/addspaces
77.21 /settings/workspaces/editspaces/page: /settings/workspaces/editspaces
77.21 /settings/workspaces/page: /settings/workspaces
------
failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
To resolve the "fetch failed" and "ECONNREFUSED ::1:8000" errors during the "npm run build" process, you can try the following steps:
Check Network Configuration: Ensure that the network configuration in your Docker setup allows connections to the required services. The ECONNREFUSED
error indicates that the connection to ::1:8000
(IPv6 loopback address) is being refused, which might be due to the service not running or not being accessible.
Modify Dockerfile: Ensure that the Dockerfile is correctly set up to install dependencies and build the project. The provided Dockerfile looks correct, but you might need to ensure that all necessary services are running and accessible during the build process.
Service Availability: Make sure that any services your build process depends on (e.g., a local server running on port 8000) are available and running. You might need to start these services before running the build.
Use IPv4: If the issue is related to IPv6, you can try forcing the use of IPv4 by modifying the host configuration or using 127.0.0.1
instead of ::1
.
Additionally, you can use a docker-compose.yml
file to manage your services and ensure they are properly networked and started in the correct order. Here is an example docker-compose.yml
file that sets up a PostgreSQL database, a backend server, and a frontend client:
services:
postgresql:
image: postgres:14.2-alpine
environment:
POSTGRES_USER: pandasai
POSTGRES_PASSWORD: password123
POSTGRES_DB: pandasai-db
ports:
- "5430:5432"
volumes:
- ./pgdata:/var/lib/postgresql/data
networks:
- pandabi-network
server:
container_name: pandabi-backend
build:
context: ./server
dockerfile: Dockerfile
ports:
- "8000:8000"
restart: always
env_file:
- ./server/.env
depends_on:
- postgresql
networks:
- pandabi-network
command: "/bin/bash startup.sh"
client:
container_name: pandabi-frontend
build:
context: ./client
dockerfile: Dockerfile
ports:
- "3000:3000"
restart: always
env_file:
- ./client/.env
environment:
- NODE_ENV=development
command: npm run start
networks:
- pandabi-network
networks:
pandabi-network:
driver: bridge
This docker-compose.yml
file ensures that the PostgreSQL database, backend server, and frontend client are all properly networked and started in the correct order, which can help resolve connection issues during the build process [1][2].
If the issue persists, you might need to provide more details about the specific services and network configuration in your Docker setup.
To continue talking to Dosu, mention @dosu.
@dosu error persist:
=> ERROR [client 7/7] RUN npm run build 75.0s
=> [server] resolving provenance for metadata file 0.0s
------
> [client 7/7] RUN npm run build:
0.992
0.992 > client@0.1.0 build
0.992 > next build
0.992
2.124 Attention: Next.js now collects completely anonymous telemetry regarding usage.
2.124 This information is used to shape Next.js' roadmap and prioritize features.
2.124 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
2.125 https://nextjs.org/telemetry
2.125
2.239 ▲ Next.js 14.2.3
2.239 - Environments: .env
2.240
2.355 Creating an optimized production build ...
59.05 ✓ Compiled successfully
59.05 Skipping linting
59.05 Checking validity of types ...
69.78 Collecting page data ...
73.30 Generating static pages (0/15) ...
73.72 Generating static pages (3/15)
73.72 Get request failed TypeError: fetch failed
73.72 at Object.fetch (node:internal/deps/undici/undici:14152:11)
73.72 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
73.72 at async i (/app/build/server/app/(ee)/settings/logs/[id]/page.js:8:36612)
73.72 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
73.72 cause: Error: connect ECONNREFUSED ::1:8000
73.72 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
73.72 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
73.72 errno: -111,
73.72 code: 'ECONNREFUSED',
73.72 syscall: 'connect',
73.72 address: '::1',
73.72 port: 8000
73.72 }
73.72 }
73.72 TypeError: fetch failed
73.72 at Object.fetch (node:internal/deps/undici/undici:14152:11)
73.72 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
73.72 at async i (/app/build/server/app/(ee)/settings/logs/[id]/page.js:8:36612)
73.72 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
73.72 cause: Error: connect ECONNREFUSED ::1:8000
73.72 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
73.72 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
73.72 errno: -111,
73.72 code: 'ECONNREFUSED',
73.72 syscall: 'connect',
73.72 address: '::1',
73.72 port: 8000
73.72 },
73.72 digest: '2074752815'
73.72 }
73.72 Get request failed TypeError: fetch failed
73.72 at Object.fetch (node:internal/deps/undici/undici:14152:11)
73.72 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
73.72 at async i (/app/build/server/app/(ee)/settings/logs/[id]/page.js:8:36612)
73.72 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
73.72 cause: Error: connect ECONNREFUSED ::1:8000
73.72 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
73.72 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
73.72 errno: -111,
73.72 code: 'ECONNREFUSED',
73.72 syscall: 'connect',
73.72 address: '::1',
73.72 port: 8000
73.72 }
73.72 }
73.72 TypeError: fetch failed
73.72 at Object.fetch (node:internal/deps/undici/undici:14152:11)
73.72 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
73.72 at async i (/app/build/server/app/(ee)/settings/logs/[id]/page.js:8:36612)
73.72 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
73.72 cause: Error: connect ECONNREFUSED ::1:8000
73.72 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
73.72 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
73.72 errno: -111,
73.72 code: 'ECONNREFUSED',
73.72 syscall: 'connect',
73.72 address: '::1',
73.72 port: 8000
73.72 },
73.72 digest: '2074752815'
73.72 }
73.72
73.72 Error occurred prerendering page "/settings/logs". Read more: https://nextjs.org/docs/messages/prerender-error
73.72
73.72 TypeError: fetch failed
73.72 at Object.fetch (node:internal/deps/undici/undici:14152:11)
73.72 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
73.72 at async i (/app/build/server/app/(ee)/settings/logs/[id]/page.js:8:36612)
73.72 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873)
73.93 Generating static pages (7/15)
74.40 Generating static pages (11/15)
74.40 Get request failed TypeError: fetch failed
74.40 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.40 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.40 at async n (/app/build/server/app/settings/workspaces/addspaces/page.js:1:15050)
74.40 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
74.40 cause: Error: connect ECONNREFUSED ::1:8000
74.40 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
74.40 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
74.40 errno: -111,
74.40 code: 'ECONNREFUSED',
74.40 syscall: 'connect',
74.40 address: '::1',
74.40 port: 8000
74.40 }
74.40 }
74.40 TypeError: fetch failed
74.40 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.40 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.40 at async n (/app/build/server/app/settings/workspaces/addspaces/page.js:1:15050)
74.40 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
74.40 cause: Error: connect ECONNREFUSED ::1:8000
74.40 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
74.40 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
74.40 errno: -111,
74.40 code: 'ECONNREFUSED',
74.40 syscall: 'connect',
74.40 address: '::1',
74.40 port: 8000
74.40 },
74.40 digest: '3951235925'
74.40 }
74.40 Get request failed TypeError: fetch failed
74.40 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.40 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.40 at async n (/app/build/server/app/settings/workspaces/addspaces/page.js:1:15050)
74.40 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
74.40 cause: Error: connect ECONNREFUSED ::1:8000
74.40 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
74.40 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
74.40 errno: -111,
74.40 code: 'ECONNREFUSED',
74.40 syscall: 'connect',
74.40 address: '::1',
74.40 port: 8000
74.40 }
74.40 }
74.40 TypeError: fetch failed
74.40 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.40 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.40 at async n (/app/build/server/app/settings/workspaces/addspaces/page.js:1:15050)
74.40 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
74.40 cause: Error: connect ECONNREFUSED ::1:8000
74.40 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
74.40 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
74.40 errno: -111,
74.40 code: 'ECONNREFUSED',
74.40 syscall: 'connect',
74.40 address: '::1',
74.40 port: 8000
74.40 },
74.40 digest: '3951235925'
74.40 }
74.40
74.40 Error occurred prerendering page "/settings/workspaces/editspaces". Read more: https://nextjs.org/docs/messages/prerender-error
74.40
74.40 TypeError: fetch failed
74.40 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.40 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.40 at async n (/app/build/server/app/settings/workspaces/addspaces/page.js:1:15050)
74.40 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135)
74.58 Get request failed TypeError: fetch failed
74.58 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.58 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.58 at async n (/app/build/server/app/settings/workspaces/addspaces/page.js:1:15050)
74.58 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
74.58 cause: Error: connect ECONNREFUSED ::1:8000
74.58 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
74.58 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
74.58 errno: -111,
74.58 code: 'ECONNREFUSED',
74.58 syscall: 'connect',
74.58 address: '::1',
74.58 port: 8000
74.58 }
74.58 }
74.58 TypeError: fetch failed
74.58 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.58 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.58 at async n (/app/build/server/app/settings/workspaces/addspaces/page.js:1:15050)
74.58 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
74.58 cause: Error: connect ECONNREFUSED ::1:8000
74.58 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
74.58 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
74.58 errno: -111,
74.58 code: 'ECONNREFUSED',
74.58 syscall: 'connect',
74.58 address: '::1',
74.58 port: 8000
74.58 },
74.58 digest: '3287353831'
74.58 }
74.58 Get request failed TypeError: fetch failed
74.58 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.58 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.58 at async n (/app/build/server/app/settings/workspaces/addspaces/page.js:1:15050)
74.58 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
74.58 cause: Error: connect ECONNREFUSED ::1:8000
74.58 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
74.58 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
74.58 errno: -111,
74.58 code: 'ECONNREFUSED',
74.58 syscall: 'connect',
74.58 address: '::1',
74.58 port: 8000
74.58 }
74.58 }
74.58 TypeError: fetch failed
74.58 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.58 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.58 at async n (/app/build/server/app/settings/workspaces/addspaces/page.js:1:15050)
74.58 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
74.58 cause: Error: connect ECONNREFUSED ::1:8000
74.58 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
74.58 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
74.58 errno: -111,
74.58 code: 'ECONNREFUSED',
74.58 syscall: 'connect',
74.58 address: '::1',
74.58 port: 8000
74.58 },
74.58 digest: '3287353831'
74.58 }
74.58
74.58 Error occurred prerendering page "/settings/workspaces/addspaces". Read more: https://nextjs.org/docs/messages/prerender-error
74.58
74.58 TypeError: fetch failed
74.58 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.58 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.58 at async n (/app/build/server/app/settings/workspaces/addspaces/page.js:1:15050)
74.58 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080)
74.58 Get request failed TypeError: fetch failed
74.58 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.58 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.58 at async n (/app/build/server/app/settings/workspaces/[id]/page.js:1:21597)
74.58 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
74.58 cause: Error: connect ECONNREFUSED ::1:8000
74.58 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
74.58 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
74.58 errno: -111,
74.58 code: 'ECONNREFUSED',
74.58 syscall: 'connect',
74.58 address: '::1',
74.58 port: 8000
74.58 }
74.58 }
74.58 TypeError: fetch failed
74.58 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.58 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.58 at async n (/app/build/server/app/settings/workspaces/[id]/page.js:1:21597)
74.58 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
74.58 cause: Error: connect ECONNREFUSED ::1:8000
74.58 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
74.58 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
74.58 errno: -111,
74.58 code: 'ECONNREFUSED',
74.58 syscall: 'connect',
74.58 address: '::1',
74.58 port: 8000
74.58 },
74.58 digest: '3812785553'
74.58 }
74.58 Get request failed TypeError: fetch failed
74.58 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.58 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.58 at async n (/app/build/server/app/settings/workspaces/[id]/page.js:1:21597)
74.58 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
74.58 cause: Error: connect ECONNREFUSED ::1:8000
74.58 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
74.58 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
74.58 errno: -111,
74.58 code: 'ECONNREFUSED',
74.58 syscall: 'connect',
74.58 address: '::1',
74.58 port: 8000
74.58 }
74.58 }
74.58 TypeError: fetch failed
74.58 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.58 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.58 at async n (/app/build/server/app/settings/workspaces/[id]/page.js:1:21597)
74.58 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
74.58 cause: Error: connect ECONNREFUSED ::1:8000
74.58 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
74.58 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
74.58 errno: -111,
74.58 code: 'ECONNREFUSED',
74.58 syscall: 'connect',
74.58 address: '::1',
74.58 port: 8000
74.58 },
74.58 digest: '3812785553'
74.58 }
74.58
74.58 Error occurred prerendering page "/settings/workspaces". Read more: https://nextjs.org/docs/messages/prerender-error
74.58
74.58 TypeError: fetch failed
74.58 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.58 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.58 at async n (/app/build/server/app/settings/workspaces/[id]/page.js:1:21597)
74.58 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244)
74.58 Get request failed TypeError: fetch failed
74.58 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.58 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.58 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
74.58 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
74.58 cause: Error: connect ECONNREFUSED ::1:8000
74.58 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
74.58 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
74.58 errno: -111,
74.58 code: 'ECONNREFUSED',
74.58 syscall: 'connect',
74.58 address: '::1',
74.58 port: 8000
74.58 }
74.58 }
74.58 TypeError: fetch failed
74.58 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.58 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.58 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
74.58 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
74.58 cause: Error: connect ECONNREFUSED ::1:8000
74.58 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
74.58 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
74.58 errno: -111,
74.58 code: 'ECONNREFUSED',
74.58 syscall: 'connect',
74.58 address: '::1',
74.58 port: 8000
74.58 },
74.58 digest: '4039937587'
74.58 }
74.58 Get request failed TypeError: fetch failed
74.58 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.58 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.58 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
74.58 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
74.58 cause: Error: connect ECONNREFUSED ::1:8000
74.58 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
74.58 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
74.58 errno: -111,
74.58 code: 'ECONNREFUSED',
74.58 syscall: 'connect',
74.58 address: '::1',
74.58 port: 8000
74.58 }
74.58 }
74.58 TypeError: fetch failed
74.58 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.58 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.58 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
74.58 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
74.58 cause: Error: connect ECONNREFUSED ::1:8000
74.58 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
74.58 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
74.58 errno: -111,
74.58 code: 'ECONNREFUSED',
74.58 syscall: 'connect',
74.58 address: '::1',
74.58 port: 8000
74.58 },
74.58 digest: '4039937587'
74.58 }
74.58
74.58 Error occurred prerendering page "/settings/datasets". Read more: https://nextjs.org/docs/messages/prerender-error
74.58
74.58 TypeError: fetch failed
74.58 at Object.fetch (node:internal/deps/undici/undici:14152:11)
74.58 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
74.58 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
74.58 at async u (/app/build/server/app/settings/datasets/page.js:1:8848)
74.58 ✓ Generating static pages (15/15)
74.62
74.62 > Export encountered errors on following paths:
74.62 /(ee)/settings/logs/page: /settings/logs
74.62 /settings/datasets/page: /settings/datasets
74.62 /settings/workspaces/addspaces/page: /settings/workspaces/addspaces
74.62 /settings/workspaces/editspaces/page: /settings/workspaces/editspaces
74.62 /settings/workspaces/page: /settings/workspaces
------
failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
To resolve the "fetch failed" and "ECONNREFUSED ::1:8000" errors during the "npm run build" process, you can try the following steps:
Ensure Services are Running: Verify that the backend server is running and accessible on port 8000. You can do this by running:
curl http://localhost:8000/
or
curl http://127.0.0.1:8000/
Use IPv4 Address: Modify the NEXT_PUBLIC_API_URL
in your .env
file to use the IPv4 address 127.0.0.1
instead of localhost
or ::1
:
NEXT_PUBLIC_API_URL='http://127.0.0.1:8000/'
Check Docker Network Configuration: Ensure that your Docker containers are properly networked. If you are using Docker Compose, make sure the services are correctly defined and networked. Here is an example docker-compose.yml
file that sets up the necessary services:
services:
postgresql:
image: postgres:14.2-alpine
environment:
POSTGRES_USER: pandasai
POSTGRES_PASSWORD: password123
POSTGRES_DB: pandasai-db
ports:
- "5430:5432"
volumes:
- ./pgdata:/var/lib/postgresql/data
networks:
- pandabi-network
server:
container_name: pandabi-backend
build:
context: ./server
dockerfile: Dockerfile
ports:
- "8000:8000"
restart: always
env_file:
- ./server/.env
depends_on:
- postgresql
networks:
- pandabi-network
command: "/bin/bash startup.sh"
client:
container_name: pandabi-frontend
build:
context: ./client
dockerfile: Dockerfile
ports:
- "3000:3000"
restart: always
env_file:
- ./client/.env
environment:
- NODE_ENV=development
command: npm run start
networks:
- pandabi-network
networks:
pandabi-network:
driver: bridge
Check Dockerfile: Ensure that your Dockerfile is correctly set up to install dependencies and build the project. Here is an example Dockerfile for the client:
FROM node:19.4.0-alpine3.17
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]
By following these steps, you should be able to identify and resolve the cause of the "fetch failed" and "ECONNREFUSED" errors [1][2].
To continue talking to Dosu, mention @dosu.
@dosu i think is port 8000
felipe@template:~/pandas-ai$ curl http://localhost:8000/
curl: (7) Failed to connect to localhost port 8000 after 0 ms: Connection refused
felipe@template:~/pandas-ai$ curl http://127.0.0.1:8000/
curl: (7) Failed to connect to 127.0.0.1 port 8000 after 0 ms: Connection refused
To resolve the "Connection refused" error when trying to connect to port 8000 on localhost or 127.0.0.1, ensure that the server is running and listening on the correct host and port. Here are steps to troubleshoot and resolve the issue:
Check if the server is running:
Ensure that the script server/main.py
is being executed and the server is running. You can do this by checking the process list or using a command like:
ps aux | grep uvicorn
Verify the host and port:
Ensure that the environment variables SERVER_HOST
and SERVER_PORT
are set correctly. If they are not set, the server will default to 0.0.0.0
and port 8000
.
Check firewall settings:
Ensure that your firewall is not blocking connections to port 8000
.
Check for errors in the server logs: Look at the server logs to see if there are any errors that might indicate why the server is not accepting connections.
Test the connection:
Use a tool like curl
or telnet
to test the connection to the server:
curl http://127.0.0.1:8000
Check Docker configuration:
If you are using Docker, ensure that the Docker container is running and properly configured. Based on the provided docker-compose.yml
file, the server service is named pandabi-backend
and is set to expose port 8000
:
services:
server:
container_name: pandabi-backend
build:
context: ./server
dockerfile: Dockerfile
ports:
- "8000:8000"
restart: always
env_file:
- ./server/.env
depends_on:
- postgresql
networks:
- pandabi-network
command: "/bin/bash startup.sh"
Ensure that the Docker container is running by using the command:
docker-compose ps
If the container is not running, you can start it with:
docker-compose up -d
Here is the relevant part of the script for reference:
import os
import uvicorn
from dotenv import load_dotenv
load_dotenv()
from core.config import config
if __name__ == "__main__":
uvicorn.run(
app="core.server:app",
reload=True if config.ENVIRONMENT != "production" else False,
host=os.environ.get("SERVER_HOST", "0.0.0.0"),
port=os.environ.get("SERVER_PORT", 8000),
workers=1,
)
Ensure that the server is running and listening on the correct host and port, and that there are no network issues preventing the connection [1][2].
To continue talking to Dosu, mention @dosu.
@dosu still error, look this is all my enviroment:
/home/felipe/pandas-ai/docker-compose.yml
services:
postgresql:
image: postgres:14.2-alpine
environment:
POSTGRES_USER: pandasai
POSTGRES_PASSWORD: password123
POSTGRES_DB: pandasai-db
ports:
- "5430:5432"
volumes:
- ./pgdata:/var/lib/postgresql/data
networks:
- pandabi-network
server:
container_name: pandabi-backend
build:
context: ./server
dockerfile: Dockerfile
ports:
- "8000:8000"
restart: always
env_file:
- ./server/.env
depends_on:
- postgresql
networks:
- pandabi-network
command: "/bin/bash startup.sh"
client:
container_name: pandabi-frontend
build:
context: ./client
dockerfile: Dockerfile
ports:
- "3000:3000"
restart: always
env_file:
- ./client/.env
environment:
- NODE_ENV=development
command: npm run start
networks:
- pandabi-network
networks:
pandabi-network:
driver: bridge
/home/felipe/pandas-ai/client/Dockerfile
FROM node:19.4.0-alpine3.17
WORKDIR /app
COPY package*.json ./
# Set npm registry to use HTTP instead of HTTPS
RUN npm config set registry http://registry.npmjs.org/
# Retry npm install in case of network issues
RUN npm install --retry 5
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]
/home/felipe/pandas-ai/client/.env
# THE URL OF YOUR CLIENT
NEXT_PUBLIC_API_URL='http://localhost:8000/'
# ENVIRONMENT
NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN="development"
# ANALYTICS
NEXT_PUBLIC_MIXPANEL_TOKEN="04a81d58ade99299e19e5a89fe84c670"
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID="G-SD7MBGS6J9"
# SUPPORT CHAT
NEXT_PUBLIC_INTERCOM_APP_ID="jzfk3qc5"
# ENV
NODE_ENV="development"
/home/felipe/pandas-ai/server/Dockerfile
# Use an official Python runtime as a parent image
FROM python:3.11-slim
# Set the working directory in the container
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
make \
libpq-dev \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Install Poetry
RUN curl -sSL https://install.python-poetry.org | python3 -
RUN apt-get update && apt-get install netcat-openbsd -y
# Add Poetry to PATH
ENV PATH="/root/.local/bin:$PATH"
# Copy the current directory contents into the container at /app
COPY . /app
RUN poetry lock --no-update
# Install Python dependencies
RUN poetry install --no-root
# Add wait-for-it.sh script to the container
COPY wait-for-it.sh /wait-for-it.sh
RUN chmod +x /wait-for-it.sh
# Make port 8000 available to the world outside this container
EXPOSE 8000
# Copy entrypoint script to the container
COPY startup.sh /startup.sh
RUN chmod +x /startup.sh
# RUN dos2unix startup.sh
# Run the entrypoint script
CMD ["/startup.sh"]
/home/felipe/pandas-ai/server/.env
# Database
POSTGRES_URL=postgresql+asyncpg://pandasai:password123@postgresql:5432/pandasai-db
TEST_POSTGRES_URL=postgresql+asyncpg://pandasai:password123@postgresql:5432/pandasai-db
PANDASAI_API_KEY=$2a$10$BALBLALBLALBLABLALBL
# OPENAI_API_KEY= use only in case you want to use OpenAI else use PANDASAI_API_KEY
# Environment
ENVIRONMENT=development
DEBUG=1
SHOW_SQL_ALCHEMY_QUERIES=0
SERVER_HOST=0.0.0.0
SERVER_PORT=8000
=> ERROR [client 7/7] RUN npm run build 82.1s
=> [server 6/12] COPY . /app 0.1s
=> [server 7/12] RUN poetry lock --no-update 14.2s
=> [server 8/12] RUN poetry install --no-root 33.6s
=> [server 9/12] COPY wait-for-it.sh /wait-for-it.sh 0.0s
=> [server 10/12] RUN chmod +x /wait-for-it.sh 0.3s
=> [server 11/12] COPY startup.sh /startup.sh 0.0s
=> [server 12/12] RUN chmod +x /startup.sh 2.0s
=> [server] exporting to image 4.8s
=> => exporting layers 4.7s
=> => writing image sha256:6e2b7e04a0c7cd41c31295b8a9bc48667ccd567a32bd6 0.0s
=> => naming to docker.io/library/pandas-ai-server 0.0s
=> [server] resolving provenance for metadata file 0.0s
------
> [client 7/7] RUN npm run build:
1.171
1.171 > client@0.1.0 build
1.171 > next build
1.171
2.449 Attention: Next.js now collects completely anonymous telemetry regarding usage.
2.450 This information is used to shape Next.js' roadmap and prioritize features.
2.450 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
2.450 https://nextjs.org/telemetry
2.450
2.569 ▲ Next.js 14.2.3
2.569 - Environments: .env
2.570
2.724 Creating an optimized production build ...
66.26 ✓ Compiled successfully
66.26 Skipping linting
66.26 Checking validity of types ...
77.06 Collecting page data ...
80.65 Generating static pages (0/15) ...
80.98 Generating static pages (3/15)
80.98 Get request failed TypeError: fetch failed
80.98 at Object.fetch (node:internal/deps/undici/undici:14152:11)
80.98 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
80.98 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
80.98 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
80.98 cause: Error: connect ECONNREFUSED ::1:8000
80.98 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
80.98 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
80.98 errno: -111,
80.98 code: 'ECONNREFUSED',
80.98 syscall: 'connect',
80.98 address: '::1',
80.98 port: 8000
80.98 }
80.98 }
80.98 TypeError: fetch failed
80.98 at Object.fetch (node:internal/deps/undici/undici:14152:11)
80.98 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
80.98 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
80.98 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
80.98 cause: Error: connect ECONNREFUSED ::1:8000
80.98 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
80.98 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
80.98 errno: -111,
80.98 code: 'ECONNREFUSED',
80.98 syscall: 'connect',
80.98 address: '::1',
80.98 port: 8000
80.98 },
80.98 digest: '1265277443'
80.98 }
80.98 Get request failed TypeError: fetch failed
80.98 at Object.fetch (node:internal/deps/undici/undici:14152:11)
80.98 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
80.98 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
80.98 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
80.98 cause: Error: connect ECONNREFUSED ::1:8000
80.98 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
80.98 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
80.98 errno: -111,
80.98 code: 'ECONNREFUSED',
80.98 syscall: 'connect',
80.98 address: '::1',
80.98 port: 8000
80.98 }
80.98 }
80.98 TypeError: fetch failed
80.98 at Object.fetch (node:internal/deps/undici/undici:14152:11)
80.98 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
80.98 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
80.98 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
80.98 cause: Error: connect ECONNREFUSED ::1:8000
80.98 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
80.98 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
80.98 errno: -111,
80.98 code: 'ECONNREFUSED',
80.98 syscall: 'connect',
80.98 address: '::1',
80.98 port: 8000
80.98 },
80.98 digest: '1265277443'
80.98 }
80.98
80.98 Error occurred prerendering page "/settings/logs". Read more: https://nextjs.org/docs/messages/prerender-error
80.98
80.98 TypeError: fetch failed
80.98 at Object.fetch (node:internal/deps/undici/undici:14152:11)
80.98 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
80.98 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
80.98 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873)
81.19 Generating static pages (7/15)
81.83 Generating static pages (11/15)
81.83 Get request failed TypeError: fetch failed
81.83 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.83 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.83 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
81.83 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
81.83 cause: Error: connect ECONNREFUSED ::1:8000
81.83 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
81.83 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.83 errno: -111,
81.83 code: 'ECONNREFUSED',
81.83 syscall: 'connect',
81.83 address: '::1',
81.83 port: 8000
81.83 }
81.83 }
81.83 TypeError: fetch failed
81.83 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.83 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.83 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
81.83 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
81.83 cause: Error: connect ECONNREFUSED ::1:8000
81.83 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
81.83 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.83 errno: -111,
81.83 code: 'ECONNREFUSED',
81.83 syscall: 'connect',
81.83 address: '::1',
81.83 port: 8000
81.83 },
81.83 digest: '1656975805'
81.83 }
81.83 Get request failed TypeError: fetch failed
81.83 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.83 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.83 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
81.83 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
81.83 cause: Error: connect ECONNREFUSED ::1:8000
81.83 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
81.83 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.83 errno: -111,
81.83 code: 'ECONNREFUSED',
81.83 syscall: 'connect',
81.83 address: '::1',
81.83 port: 8000
81.83 }
81.83 }
81.83 TypeError: fetch failed
81.83 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.83 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.83 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
81.83 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
81.83 cause: Error: connect ECONNREFUSED ::1:8000
81.83 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
81.83 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.83 errno: -111,
81.83 code: 'ECONNREFUSED',
81.83 syscall: 'connect',
81.83 address: '::1',
81.83 port: 8000
81.83 },
81.83 digest: '1656975805'
81.83 }
81.83
81.83 Error occurred prerendering page "/settings/workspaces/editspaces". Read more: https://nextjs.org/docs/messages/prerender-error
81.83
81.83 TypeError: fetch failed
81.83 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.83 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.83 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
81.83 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135)
81.83 Get request failed TypeError: fetch failed
81.83 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.83 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.83 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
81.83 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
81.83 cause: Error: connect ECONNREFUSED ::1:8000
81.83 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
81.83 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.83 errno: -111,
81.83 code: 'ECONNREFUSED',
81.83 syscall: 'connect',
81.83 address: '::1',
81.83 port: 8000
81.83 }
81.83 }
81.83 TypeError: fetch failed
81.83 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.83 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.83 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
81.83 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
81.83 cause: Error: connect ECONNREFUSED ::1:8000
81.83 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
81.83 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.83 errno: -111,
81.83 code: 'ECONNREFUSED',
81.83 syscall: 'connect',
81.83 address: '::1',
81.83 port: 8000
81.83 },
81.83 digest: '4039937587'
81.83 }
81.83 Get request failed TypeError: fetch failed
81.83 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.83 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.83 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
81.83 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
81.83 cause: Error: connect ECONNREFUSED ::1:8000
81.83 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
81.83 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.83 errno: -111,
81.83 code: 'ECONNREFUSED',
81.83 syscall: 'connect',
81.83 address: '::1',
81.83 port: 8000
81.83 }
81.83 }
81.83 TypeError: fetch failed
81.83 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.83 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.83 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
81.83 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
81.83 cause: Error: connect ECONNREFUSED ::1:8000
81.83 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
81.83 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.83 errno: -111,
81.83 code: 'ECONNREFUSED',
81.83 syscall: 'connect',
81.83 address: '::1',
81.83 port: 8000
81.83 },
81.83 digest: '4039937587'
81.83 }
81.83
81.83 Error occurred prerendering page "/settings/datasets". Read more: https://nextjs.org/docs/messages/prerender-error
81.83
81.83 TypeError: fetch failed
81.83 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.83 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.83 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
81.83 at async u (/app/build/server/app/settings/datasets/page.js:1:8848)
81.87 Get request failed TypeError: fetch failed
81.87 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.87 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.87 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
81.87 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
81.87 cause: Error: connect ECONNREFUSED ::1:8000
81.87 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
81.87 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.87 errno: -111,
81.87 code: 'ECONNREFUSED',
81.87 syscall: 'connect',
81.87 address: '::1',
81.87 port: 8000
81.87 }
81.87 }
81.87 TypeError: fetch failed
81.87 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.87 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.87 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
81.87 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
81.87 cause: Error: connect ECONNREFUSED ::1:8000
81.87 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
81.87 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.87 errno: -111,
81.87 code: 'ECONNREFUSED',
81.87 syscall: 'connect',
81.87 address: '::1',
81.87 port: 8000
81.87 },
81.87 digest: '335043919'
81.87 }
81.87 Get request failed TypeError: fetch failed
81.87 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.87 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.87 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
81.87 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
81.87 cause: Error: connect ECONNREFUSED ::1:8000
81.87 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
81.87 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.87 errno: -111,
81.87 code: 'ECONNREFUSED',
81.87 syscall: 'connect',
81.87 address: '::1',
81.87 port: 8000
81.87 }
81.87 }
81.87 TypeError: fetch failed
81.87 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.87 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.87 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
81.87 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
81.87 cause: Error: connect ECONNREFUSED ::1:8000
81.87 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
81.87 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.87 errno: -111,
81.87 code: 'ECONNREFUSED',
81.87 syscall: 'connect',
81.87 address: '::1',
81.87 port: 8000
81.87 },
81.87 digest: '335043919'
81.87 }
81.87
81.87 Error occurred prerendering page "/settings/workspaces/addspaces". Read more: https://nextjs.org/docs/messages/prerender-error
81.87
81.87 TypeError: fetch failed
81.87 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.87 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.87 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
81.87 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080)
81.89 Get request failed TypeError: fetch failed
81.89 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.89 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.89 at async n (/app/build/server/app/settings/workspaces/page.js:1:13344)
81.89 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
81.89 cause: Error: connect ECONNREFUSED ::1:8000
81.89 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
81.89 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.89 errno: -111,
81.89 code: 'ECONNREFUSED',
81.89 syscall: 'connect',
81.89 address: '::1',
81.89 port: 8000
81.89 }
81.89 }
81.89 TypeError: fetch failed
81.89 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.89 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.89 at async n (/app/build/server/app/settings/workspaces/page.js:1:13344)
81.89 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
81.89 cause: Error: connect ECONNREFUSED ::1:8000
81.89 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
81.89 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.89 errno: -111,
81.89 code: 'ECONNREFUSED',
81.89 syscall: 'connect',
81.89 address: '::1',
81.89 port: 8000
81.89 },
81.89 digest: '3628362172'
81.89 }
81.89 Get request failed TypeError: fetch failed
81.89 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.89 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.89 at async n (/app/build/server/app/settings/workspaces/page.js:1:13344)
81.89 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
81.89 cause: Error: connect ECONNREFUSED ::1:8000
81.89 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
81.89 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.89 errno: -111,
81.89 code: 'ECONNREFUSED',
81.89 syscall: 'connect',
81.89 address: '::1',
81.89 port: 8000
81.89 }
81.89 }
81.89 TypeError: fetch failed
81.89 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.89 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.89 at async n (/app/build/server/app/settings/workspaces/page.js:1:13344)
81.89 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
81.89 cause: Error: connect ECONNREFUSED ::1:8000
81.89 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
81.89 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.89 errno: -111,
81.89 code: 'ECONNREFUSED',
81.89 syscall: 'connect',
81.89 address: '::1',
81.89 port: 8000
81.89 },
81.89 digest: '3628362172'
81.89 }
81.89
81.89 Error occurred prerendering page "/settings/workspaces". Read more: https://nextjs.org/docs/messages/prerender-error
81.89
81.89 TypeError: fetch failed
81.89 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.89 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.89 at async n (/app/build/server/app/settings/workspaces/page.js:1:13344)
81.89 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244)
81.90 ✓ Generating static pages (15/15)
81.92
81.92 > Export encountered errors on following paths:
81.92 /(ee)/settings/logs/page: /settings/logs
81.92 /settings/datasets/page: /settings/datasets
81.92 /settings/workspaces/addspaces/page: /settings/workspaces/addspaces
81.92 /settings/workspaces/editspaces/page: /settings/workspaces/editspaces
81.92 /settings/workspaces/page: /settings/workspaces
------
failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
How solve this issue?
To resolve the "fetch failed" and "ECONNREFUSED ::1:8000" errors during the "npm run build" process, ensure that the backend server is running and accessible on port 8000. Here are steps to troubleshoot and resolve the issue:
Ensure the Server is Running:
Verify that the backend server is running and listening on port 8000. You can do this by checking the logs of the pandabi-backend
container:
docker-compose logs server
Check Server Startup Script:
Ensure that the startup.sh
script is correctly starting the server. The content of startup.sh
should be:
#!/bin/bash
# Load environment variables from .env file if it exists
if [ -f .env ]; then
export $(cat .env | sed 's/#.*//g' | xargs)
fi
source $(poetry env info --path)/bin/activate
poetry lock --no-update
make install
/bin/sh wait-for-it.sh
# Run database migrations
make migrate
# Start the server in the background
make start
Verify Network Configuration:
Ensure that the Docker network is correctly set up and that the containers can communicate with each other. Your docker-compose.yml
file looks correct, but double-check that the network is properly configured:
networks:
pandabi-network:
driver: bridge
Check Environment Variables:
Ensure that the environment variables in the .env
files are correctly set. For the server, the .env
file should include:
POSTGRES_URL=postgresql+asyncpg://pandasai:password123@postgresql:5432/pandasai-db
TEST_POSTGRES_URL=postgresql+asyncpg://pandasai:password123@postgresql:5432/pandasai-db
PANDASAI_API_KEY=$2a$10$BALBLALBLALBLABLALBL
ENVIRONMENT=development
DEBUG=1
SHOW_SQL_ALCHEMY_QUERIES=0
SERVER_HOST=0.0.0.0
SERVER_PORT=8000
Test Server Accessibility: After starting the Docker containers, test if the server is accessible from within the Docker network:
docker-compose exec client curl http://pandabi-backend:8000/
Update Client Environment Variable:
Ensure that the NEXT_PUBLIC_API_URL
in the client .env
file is set to the backend service name within the Docker network:
NEXT_PUBLIC_API_URL='http://pandabi-backend:8000/'
Rebuild and Restart Docker Containers: Rebuild and restart the Docker containers to apply any changes:
docker-compose down
docker-compose up --build
By following these steps, you should be able to identify and resolve the cause of the "fetch failed" and "ECONNREFUSED" errors during the build process [1][2].
To continue talking to Dosu, mention @dosu.
@dosu still error:
=> ERROR [client 7/7] RUN npm run build 101.5s
=> [server 8/12] RUN poetry install --no-root 29.0s
=> [server 9/12] COPY wait-for-it.sh /wait-for-it.sh 0.0s
=> [server 10/12] RUN chmod +x /wait-for-it.sh 0.3s
=> [server 11/12] COPY startup.sh /startup.sh 0.0s
=> [server 12/12] RUN chmod +x /startup.sh 1.4s
=> [server] exporting to image 4.2s
=> => exporting layers 4.2s
=> => writing image sha256:80d353ff35548fbdaefcade48be7f918360a9b79d99da 0.0s
=> => naming to docker.io/library/pandas-ai-server 0.0s
=> [server] resolving provenance for metadata file 0.0s
------
> [client 7/7] RUN npm run build:
1.256
1.256 > client@0.1.0 build
1.256 > next build
1.256
2.387 Attention: Next.js now collects completely anonymous telemetry regarding usage.
2.387 This information is used to shape Next.js' roadmap and prioritize features.
2.387 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
2.387 https://nextjs.org/telemetry
2.387
2.535 ▲ Next.js 14.2.3
2.535 - Environments: .env
2.537
2.665 Creating an optimized production build ...
65.68 ✓ Compiled successfully
65.68 Skipping linting
65.69 Checking validity of types ...
76.42 Collecting page data ...
80.03 Generating static pages (0/15) ...
80.37 Generating static pages (3/15)
81.08 Generating static pages (7/15)
85.26 Get request failed TypeError: fetch failed
85.26 at Object.fetch (node:internal/deps/undici/undici:14152:11)
85.26 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
85.26 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
85.26 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
85.26 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
85.26 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
85.26 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
85.26 errno: -3001,
85.26 code: 'EAI_AGAIN',
85.26 syscall: 'getaddrinfo',
85.26 hostname: 'pandabi-backend'
85.26 }
85.26 }
85.26 TypeError: fetch failed
85.26 at Object.fetch (node:internal/deps/undici/undici:14152:11)
85.26 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
85.26 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
85.26 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
85.26 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
85.26 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
85.26 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
85.26 errno: -3001,
85.26 code: 'EAI_AGAIN',
85.26 syscall: 'getaddrinfo',
85.26 hostname: 'pandabi-backend'
85.26 },
85.26 digest: '1265277443'
85.26 }
87.05 Get request failed TypeError: fetch failed
87.05 at Object.fetch (node:internal/deps/undici/undici:14152:11)
87.05 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
87.05 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
87.05 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
87.05 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
87.05 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
87.05 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
87.05 errno: -3001,
87.05 code: 'EAI_AGAIN',
87.05 syscall: 'getaddrinfo',
87.05 hostname: 'pandabi-backend'
87.05 }
87.05 }
87.05 TypeError: fetch failed
87.05 at Object.fetch (node:internal/deps/undici/undici:14152:11)
87.05 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
87.05 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
87.05 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
87.05 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
87.05 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
87.05 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
87.05 errno: -3001,
87.05 code: 'EAI_AGAIN',
87.05 syscall: 'getaddrinfo',
87.05 hostname: 'pandabi-backend'
87.05 },
87.05 digest: '4039937587'
87.05 }
87.05 Get request failed TypeError: fetch failed
87.05 at Object.fetch (node:internal/deps/undici/undici:14152:11)
87.05 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
87.05 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:13704)
87.05 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
87.05 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
87.05 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
87.05 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
87.05 errno: -3001,
87.05 code: 'EAI_AGAIN',
87.05 syscall: 'getaddrinfo',
87.05 hostname: 'pandabi-backend'
87.05 }
87.05 }
87.05 TypeError: fetch failed
87.05 at Object.fetch (node:internal/deps/undici/undici:14152:11)
87.05 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
87.05 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:13704)
87.05 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
87.05 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
87.05 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
87.05 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
87.05 errno: -3001,
87.05 code: 'EAI_AGAIN',
87.05 syscall: 'getaddrinfo',
87.05 hostname: 'pandabi-backend'
87.05 },
87.05 digest: '711901359'
87.05 }
90.27 Get request failed TypeError: fetch failed
90.27 at Object.fetch (node:internal/deps/undici/undici:14152:11)
90.27 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
90.27 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
90.27 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
90.27 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
90.27 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
90.27 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
90.27 errno: -3001,
90.27 code: 'EAI_AGAIN',
90.27 syscall: 'getaddrinfo',
90.27 hostname: 'pandabi-backend'
90.27 }
90.27 }
90.27 TypeError: fetch failed
90.27 at Object.fetch (node:internal/deps/undici/undici:14152:11)
90.27 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
90.27 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
90.27 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
90.27 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
90.27 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
90.27 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
90.27 errno: -3001,
90.27 code: 'EAI_AGAIN',
90.27 syscall: 'getaddrinfo',
90.27 hostname: 'pandabi-backend'
90.27 },
90.27 digest: '1265277443'
90.27 }
90.27
90.27 Error occurred prerendering page "/settings/logs". Read more: https://nextjs.org/docs/messages/prerender-error
90.27
90.27 TypeError: fetch failed
90.27 at Object.fetch (node:internal/deps/undici/undici:14152:11)
90.27 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
90.27 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
90.27 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873)
90.27 Generating static pages (11/15)
91.33 Get request failed TypeError: fetch failed
91.33 at Object.fetch (node:internal/deps/undici/undici:14152:11)
91.33 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
91.33 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
91.33 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
91.33 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
91.33 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
91.33 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
91.33 errno: -3001,
91.33 code: 'EAI_AGAIN',
91.33 syscall: 'getaddrinfo',
91.33 hostname: 'pandabi-backend'
91.33 }
91.33 }
91.33 TypeError: fetch failed
91.33 at Object.fetch (node:internal/deps/undici/undici:14152:11)
91.33 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
91.33 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
91.33 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
91.33 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
91.33 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
91.33 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
91.33 errno: -3001,
91.33 code: 'EAI_AGAIN',
91.33 syscall: 'getaddrinfo',
91.33 hostname: 'pandabi-backend'
91.33 },
91.33 digest: '4039937587'
91.33 }
91.33
91.33 Error occurred prerendering page "/settings/datasets". Read more: https://nextjs.org/docs/messages/prerender-error
91.33
91.33 TypeError: fetch failed
91.33 at Object.fetch (node:internal/deps/undici/undici:14152:11)
91.33 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
91.33 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
91.33 at async u (/app/build/server/app/settings/datasets/page.js:1:8848)
91.35 Get request failed TypeError: fetch failed
91.35 at Object.fetch (node:internal/deps/undici/undici:14152:11)
91.35 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
91.35 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:13704)
91.35 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
91.35 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
91.35 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
91.35 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
91.35 errno: -3001,
91.35 code: 'EAI_AGAIN',
91.35 syscall: 'getaddrinfo',
91.35 hostname: 'pandabi-backend'
91.35 }
91.35 }
91.36 TypeError: fetch failed
91.36 at Object.fetch (node:internal/deps/undici/undici:14152:11)
91.36 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
91.36 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:13704)
91.36 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
91.36 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
91.36 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
91.36 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
91.36 errno: -3001,
91.36 code: 'EAI_AGAIN',
91.36 syscall: 'getaddrinfo',
91.36 hostname: 'pandabi-backend'
91.36 },
91.36 digest: '711901359'
91.36 }
91.36
91.36 Error occurred prerendering page "/settings/workspaces/editspaces". Read more: https://nextjs.org/docs/messages/prerender-error
91.36
91.36 TypeError: fetch failed
91.36 at Object.fetch (node:internal/deps/undici/undici:14152:11)
91.36 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
91.36 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:13704)
91.36 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135)
95.32 Get request failed TypeError: fetch failed
95.32 at Object.fetch (node:internal/deps/undici/undici:14152:11)
95.32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
95.32 at async n (/app/build/server/app/settings/workspaces/page.js:1:13344)
95.32 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
95.32 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
95.32 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
95.32 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
95.32 errno: -3001,
95.32 code: 'EAI_AGAIN',
95.32 syscall: 'getaddrinfo',
95.32 hostname: 'pandabi-backend'
95.32 }
95.32 }
95.33 TypeError: fetch failed
95.33 at Object.fetch (node:internal/deps/undici/undici:14152:11)
95.33 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
95.33 at async n (/app/build/server/app/settings/workspaces/page.js:1:13344)
95.33 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
95.33 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
95.33 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
95.33 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
95.33 errno: -3001,
95.33 code: 'EAI_AGAIN',
95.33 syscall: 'getaddrinfo',
95.33 hostname: 'pandabi-backend'
95.33 },
95.33 digest: '3628362172'
95.33 }
96.37 Get request failed TypeError: fetch failed
96.37 at Object.fetch (node:internal/deps/undici/undici:14152:11)
96.37 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
96.37 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
96.37 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
96.37 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
96.37 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
96.37 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
96.37 errno: -3001,
96.37 code: 'EAI_AGAIN',
96.37 syscall: 'getaddrinfo',
96.37 hostname: 'pandabi-backend'
96.37 }
96.37 }
96.38 TypeError: fetch failed
96.38 at Object.fetch (node:internal/deps/undici/undici:14152:11)
96.38 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
96.38 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
96.38 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
96.38 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
96.38 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
96.38 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
96.38 errno: -3001,
96.38 code: 'EAI_AGAIN',
96.38 syscall: 'getaddrinfo',
96.38 hostname: 'pandabi-backend'
96.38 },
96.38 digest: '335043919'
96.38 }
100.3 Get request failed TypeError: fetch failed
100.3 at Object.fetch (node:internal/deps/undici/undici:14152:11)
100.3 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
100.3 at async n (/app/build/server/app/settings/workspaces/page.js:1:13344)
100.3 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
100.3 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
100.3 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
100.3 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
100.3 errno: -3001,
100.3 code: 'EAI_AGAIN',
100.3 syscall: 'getaddrinfo',
100.3 hostname: 'pandabi-backend'
100.3 }
100.3 }
100.3 TypeError: fetch failed
100.3 at Object.fetch (node:internal/deps/undici/undici:14152:11)
100.3 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
100.3 at async n (/app/build/server/app/settings/workspaces/page.js:1:13344)
100.3 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
100.3 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
100.3 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
100.3 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
100.3 errno: -3001,
100.3 code: 'EAI_AGAIN',
100.3 syscall: 'getaddrinfo',
100.3 hostname: 'pandabi-backend'
100.3 },
100.3 digest: '3628362172'
100.3 }
100.3
100.3 Error occurred prerendering page "/settings/workspaces". Read more: https://nextjs.org/docs/messages/prerender-error
100.3
100.3 TypeError: fetch failed
100.3 at Object.fetch (node:internal/deps/undici/undici:14152:11)
100.3 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
100.3 at async n (/app/build/server/app/settings/workspaces/page.js:1:13344)
100.3 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244)
101.4 Get request failed TypeError: fetch failed
101.4 at Object.fetch (node:internal/deps/undici/undici:14152:11)
101.4 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
101.4 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
101.4 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
101.4 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
101.4 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
101.4 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
101.4 errno: -3001,
101.4 code: 'EAI_AGAIN',
101.4 syscall: 'getaddrinfo',
101.4 hostname: 'pandabi-backend'
101.4 }
101.4 }
101.4 TypeError: fetch failed
101.4 at Object.fetch (node:internal/deps/undici/undici:14152:11)
101.4 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
101.4 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
101.4 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
101.4 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
101.4 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
101.4 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
101.4 errno: -3001,
101.4 code: 'EAI_AGAIN',
101.4 syscall: 'getaddrinfo',
101.4 hostname: 'pandabi-backend'
101.4 },
101.4 digest: '335043919'
101.4 }
101.4
101.4 Error occurred prerendering page "/settings/workspaces/addspaces". Read more: https://nextjs.org/docs/messages/prerender-error
101.4
101.4 TypeError: fetch failed
101.4 at Object.fetch (node:internal/deps/undici/undici:14152:11)
101.4 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
101.4 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
101.4 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080)
101.4 ✓ Generating static pages (15/15)
101.4
101.4 > Export encountered errors on following paths:
101.4 /(ee)/settings/logs/page: /settings/logs
101.4 /settings/datasets/page: /settings/datasets
101.4 /settings/workspaces/addspaces/page: /settings/workspaces/addspaces
101.4 /settings/workspaces/editspaces/page: /settings/workspaces/editspaces
101.4 /settings/workspaces/page: /settings/workspaces
------
failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
To resolve the "getaddrinfo EAI_AGAIN pandabi-backend" error during the "npm run build" process in your Docker setup, you should ensure that the DNS resolution within the Docker network is functioning correctly. This error typically indicates a DNS resolution issue where the hostname pandabi-backend
cannot be resolved.
Here are a few steps you can take to troubleshoot and resolve this issue:
Check Network Configuration: Ensure that all services are correctly connected to the pandabi-network
.
Service Dependencies: Make sure that the client
service is not trying to resolve pandabi-backend
before it is up and running. You can use the depends_on
directive to ensure the client
service waits for the server
service to be ready.
DNS Configuration: Verify that Docker's internal DNS is working correctly. Sometimes restarting Docker can resolve transient DNS issues.
Network Alias: You can explicitly set network aliases to ensure that services can resolve each other by name.
Here is an updated version of your docker-compose.yml
file with the depends_on
directive added to the client
service to ensure it waits for the server
service:
services:
postgresql:
image: postgres:14.2-alpine
environment:
POSTGRES_USER: pandasai
POSTGRES_PASSWORD: password123
POSTGRES_DB: pandasai-db
ports:
- "5430:5432"
volumes:
- ./pgdata:/var/lib/postgresql/data
networks:
- pandabi-network
server:
container_name: pandabi-backend
build:
context: ./server
dockerfile: Dockerfile
ports:
- "8000:8000"
restart: always
env_file:
- ./server/.env
depends_on:
- postgresql
networks:
- pandabi-network
command: "/bin/bash startup.sh"
client:
container_name: pandabi-frontend
build:
context: ./client
dockerfile: Dockerfile
ports:
- "3000:3000"
restart: always
env_file:
- ./client/.env
environment:
- NODE_ENV=development
command: npm run start
depends_on:
- server
networks:
- pandabi-network
networks:
pandabi-network:
driver: bridge
By adding depends_on: - server
to the client
service, you ensure that the client
service will wait for the server
service to be up and running before starting. This should help resolve the DNS resolution issue [1].
To continue talking to Dosu, mention @dosu.
@dosu still error with your suggestion:
=> ERROR [client 7/7] RUN npm run build 97.0s
------
> [client 7/7] RUN npm run build:
0.966
0.966 > client@0.1.0 build
0.966 > next build
0.966
2.196 Attention: Next.js now collects completely anonymous telemetry regarding usage.
2.197 This information is used to shape Next.js' roadmap and prioritize features.
2.197 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
2.197 https://nextjs.org/telemetry
2.197
2.315 ▲ Next.js 14.2.3
2.316 - Environments: .env
2.316
2.434 Creating an optimized production build ...
61.08 ✓ Compiled successfully
61.08 Skipping linting
61.08 Checking validity of types ...
71.76 Collecting page data ...
75.45 Generating static pages (0/15) ...
75.79 Generating static pages (3/15)
76.48 Generating static pages (7/15)
80.69 Get request failed TypeError: fetch failed
80.69 at Object.fetch (node:internal/deps/undici/undici:14152:11)
80.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
80.69 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
80.69 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
80.69 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
80.69 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
80.69 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
80.69 errno: -3001,
80.69 code: 'EAI_AGAIN',
80.69 syscall: 'getaddrinfo',
80.69 hostname: 'pandabi-backend'
80.69 }
80.69 }
80.69 TypeError: fetch failed
80.69 at Object.fetch (node:internal/deps/undici/undici:14152:11)
80.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
80.69 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
80.69 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
80.69 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
80.69 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
80.69 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
80.69 errno: -3001,
80.69 code: 'EAI_AGAIN',
80.69 syscall: 'getaddrinfo',
80.69 hostname: 'pandabi-backend'
80.69 },
80.69 digest: '1265277443'
80.69 }
81.76 Get request failed TypeError: fetch failed
81.76 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.76 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.76 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
81.76 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
81.76 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
81.76 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
81.76 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.76 errno: -3001,
81.76 code: 'EAI_AGAIN',
81.76 syscall: 'getaddrinfo',
81.76 hostname: 'pandabi-backend'
81.76 }
81.76 }
81.76 TypeError: fetch failed
81.76 at Object.fetch (node:internal/deps/undici/undici:14152:11)
81.76 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
81.76 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
81.76 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
81.76 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
81.76 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
81.76 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
81.76 errno: -3001,
81.76 code: 'EAI_AGAIN',
81.76 syscall: 'getaddrinfo',
81.76 hostname: 'pandabi-backend'
81.76 },
81.76 digest: '4039937587'
81.76 }
82.67 Get request failed TypeError: fetch failed
82.67 at Object.fetch (node:internal/deps/undici/undici:14152:11)
82.67 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
82.67 at async n (/app/build/server/app/settings/workspaces/addspaces/page.js:1:15050)
82.67 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
82.67 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
82.67 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
82.67 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
82.67 errno: -3001,
82.67 code: 'EAI_AGAIN',
82.67 syscall: 'getaddrinfo',
82.67 hostname: 'pandabi-backend'
82.67 }
82.67 }
82.67 TypeError: fetch failed
82.67 at Object.fetch (node:internal/deps/undici/undici:14152:11)
82.67 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
82.67 at async n (/app/build/server/app/settings/workspaces/addspaces/page.js:1:15050)
82.67 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
82.67 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
82.67 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
82.67 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
82.67 errno: -3001,
82.67 code: 'EAI_AGAIN',
82.67 syscall: 'getaddrinfo',
82.67 hostname: 'pandabi-backend'
82.67 },
82.67 digest: '3287353831'
82.67 }
85.69 Get request failed TypeError: fetch failed
85.69 at Object.fetch (node:internal/deps/undici/undici:14152:11)
85.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
85.69 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
85.69 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
85.69 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
85.69 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
85.69 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
85.69 errno: -3001,
85.69 code: 'EAI_AGAIN',
85.69 syscall: 'getaddrinfo',
85.69 hostname: 'pandabi-backend'
85.69 }
85.69 }
85.69 TypeError: fetch failed
85.69 at Object.fetch (node:internal/deps/undici/undici:14152:11)
85.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
85.69 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
85.69 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873) {
85.69 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
85.69 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
85.69 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
85.69 errno: -3001,
85.69 code: 'EAI_AGAIN',
85.69 syscall: 'getaddrinfo',
85.69 hostname: 'pandabi-backend'
85.69 },
85.69 digest: '1265277443'
85.69 }
85.69
85.69 Error occurred prerendering page "/settings/logs". Read more: https://nextjs.org/docs/messages/prerender-error
85.69
85.69 TypeError: fetch failed
85.69 at Object.fetch (node:internal/deps/undici/undici:14152:11)
85.69 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
85.69 at async a (/app/build/server/app/(ee)/settings/logs/page.js:46:4428)
85.69 at async u (/app/build/server/app/(ee)/settings/logs/page.js:46:2873)
85.69 Generating static pages (11/15)
86.76 Get request failed TypeError: fetch failed
86.76 at Object.fetch (node:internal/deps/undici/undici:14152:11)
86.76 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
86.76 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
86.76 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
86.76 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
86.76 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
86.76 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
86.76 errno: -3001,
86.76 code: 'EAI_AGAIN',
86.76 syscall: 'getaddrinfo',
86.76 hostname: 'pandabi-backend'
86.76 }
86.76 }
86.77 TypeError: fetch failed
86.77 at Object.fetch (node:internal/deps/undici/undici:14152:11)
86.77 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
86.77 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
86.77 at async u (/app/build/server/app/settings/datasets/page.js:1:8848) {
86.77 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
86.77 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
86.77 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
86.77 errno: -3001,
86.77 code: 'EAI_AGAIN',
86.77 syscall: 'getaddrinfo',
86.77 hostname: 'pandabi-backend'
86.77 },
86.77 digest: '4039937587'
86.77 }
86.77
86.77 Error occurred prerendering page "/settings/datasets". Read more: https://nextjs.org/docs/messages/prerender-error
86.77
86.77 TypeError: fetch failed
86.77 at Object.fetch (node:internal/deps/undici/undici:14152:11)
86.77 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
86.77 at async i (/app/build/server/app/settings/datasets/page.js:1:13460)
86.77 at async u (/app/build/server/app/settings/datasets/page.js:1:8848)
86.82 Get request failed TypeError: fetch failed
86.82 at Object.fetch (node:internal/deps/undici/undici:14152:11)
86.82 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
86.82 at async n (/app/build/server/app/settings/workspaces/addspaces/page.js:1:15050)
86.82 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
86.82 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
86.82 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
86.82 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
86.82 errno: -3001,
86.82 code: 'EAI_AGAIN',
86.82 syscall: 'getaddrinfo',
86.82 hostname: 'pandabi-backend'
86.82 }
86.82 }
86.82 TypeError: fetch failed
86.82 at Object.fetch (node:internal/deps/undici/undici:14152:11)
86.82 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
86.82 at async n (/app/build/server/app/settings/workspaces/addspaces/page.js:1:15050)
86.82 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080) {
86.82 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
86.82 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
86.82 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
86.82 errno: -3001,
86.82 code: 'EAI_AGAIN',
86.82 syscall: 'getaddrinfo',
86.82 hostname: 'pandabi-backend'
86.82 },
86.82 digest: '3287353831'
86.82 }
86.82
86.82 Error occurred prerendering page "/settings/workspaces/addspaces". Read more: https://nextjs.org/docs/messages/prerender-error
86.82
86.82 TypeError: fetch failed
86.82 at Object.fetch (node:internal/deps/undici/undici:14152:11)
86.82 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
86.82 at async n (/app/build/server/app/settings/workspaces/addspaces/page.js:1:15050)
86.82 at async p (/app/build/server/app/settings/workspaces/addspaces/page.js:1:12080)
90.74 Get request failed TypeError: fetch failed
90.74 at Object.fetch (node:internal/deps/undici/undici:14152:11)
90.74 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
90.74 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
90.74 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
90.74 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
90.74 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
90.74 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
90.74 errno: -3001,
90.74 code: 'EAI_AGAIN',
90.74 syscall: 'getaddrinfo',
90.74 hostname: 'pandabi-backend'
90.74 }
90.74 }
90.75 TypeError: fetch failed
90.75 at Object.fetch (node:internal/deps/undici/undici:14152:11)
90.75 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
90.75 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
90.75 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
90.75 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
90.75 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
90.75 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
90.75 errno: -3001,
90.75 code: 'EAI_AGAIN',
90.75 syscall: 'getaddrinfo',
90.75 hostname: 'pandabi-backend'
90.75 },
90.75 digest: '4144802943'
90.75 }
91.82 Get request failed TypeError: fetch failed
91.82 at Object.fetch (node:internal/deps/undici/undici:14152:11)
91.82 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
91.82 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:14147)
91.82 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
91.82 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
91.82 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
91.82 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
91.82 errno: -3001,
91.82 code: 'EAI_AGAIN',
91.82 syscall: 'getaddrinfo',
91.82 hostname: 'pandabi-backend'
91.82 }
91.82 }
91.82 TypeError: fetch failed
91.82 at Object.fetch (node:internal/deps/undici/undici:14152:11)
91.82 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
91.82 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:14147)
91.82 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
91.82 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
91.82 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
91.82 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
91.82 errno: -3001,
91.82 code: 'EAI_AGAIN',
91.82 syscall: 'getaddrinfo',
91.82 hostname: 'pandabi-backend'
91.82 },
91.82 digest: '2032768281'
91.82 }
95.76 Get request failed TypeError: fetch failed
95.76 at Object.fetch (node:internal/deps/undici/undici:14152:11)
95.76 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
95.76 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
95.76 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
95.76 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
95.76 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
95.76 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
95.76 errno: -3001,
95.76 code: 'EAI_AGAIN',
95.76 syscall: 'getaddrinfo',
95.76 hostname: 'pandabi-backend'
95.76 }
95.76 }
95.77 TypeError: fetch failed
95.77 at Object.fetch (node:internal/deps/undici/undici:14152:11)
95.77 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
95.77 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
95.77 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135) {
95.77 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
95.77 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
95.77 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
95.77 errno: -3001,
95.77 code: 'EAI_AGAIN',
95.77 syscall: 'getaddrinfo',
95.77 hostname: 'pandabi-backend'
95.77 },
95.77 digest: '4144802943'
95.77 }
95.78
95.78 Error occurred prerendering page "/settings/workspaces/editspaces". Read more: https://nextjs.org/docs/messages/prerender-error
95.78
95.78 TypeError: fetch failed
95.78 at Object.fetch (node:internal/deps/undici/undici:14152:11)
95.78 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
95.78 at async n (/app/build/server/app/settings/datasets/[id]/page.js:1:18976)
95.78 at async p (/app/build/server/app/settings/workspaces/editspaces/page.js:1:12135)
96.83 Get request failed TypeError: fetch failed
96.83 at Object.fetch (node:internal/deps/undici/undici:14152:11)
96.83 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
96.83 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:14147)
96.83 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
96.83 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
96.83 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
96.83 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
96.83 errno: -3001,
96.83 code: 'EAI_AGAIN',
96.83 syscall: 'getaddrinfo',
96.83 hostname: 'pandabi-backend'
96.83 }
96.83 }
96.83 TypeError: fetch failed
96.83 at Object.fetch (node:internal/deps/undici/undici:14152:11)
96.83 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
96.83 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:14147)
96.83 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244) {
96.83 cause: Error: getaddrinfo EAI_AGAIN pandabi-backend
96.83 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
96.83 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
96.83 errno: -3001,
96.83 code: 'EAI_AGAIN',
96.83 syscall: 'getaddrinfo',
96.83 hostname: 'pandabi-backend'
96.83 },
96.83 digest: '2032768281'
96.83 }
96.83
96.83 Error occurred prerendering page "/settings/workspaces". Read more: https://nextjs.org/docs/messages/prerender-error
96.83
96.83 TypeError: fetch failed
96.83 at Object.fetch (node:internal/deps/undici/undici:14152:11)
96.83 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
96.83 at async i (/app/build/server/app/settings/workspaces/editspaces/page.js:1:14147)
96.83 at async c (/app/build/server/app/settings/workspaces/page.js:1:10244)
96.83 ✓ Generating static pages (15/15)
96.84
96.84 > Export encountered errors on following paths:
96.84 /(ee)/settings/logs/page: /settings/logs
96.84 /settings/datasets/page: /settings/datasets
96.84 /settings/workspaces/addspaces/page: /settings/workspaces/addspaces
96.84 /settings/workspaces/editspaces/page: /settings/workspaces/editspaces
96.84 /settings/workspaces/page: /settings/workspaces
------
failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
To resolve the "getaddrinfo EAI_AGAIN pandabi-backend" error during the "npm run build" process, you can try the following steps to ensure that the DNS resolution within the Docker network is functioning correctly:
Ensure Services are Running:
Verify that the backend server is running and accessible on port 8000. You can do this by checking the logs of the pandabi-backend
container:
docker-compose logs server
Check Network Configuration:
Ensure that all services are correctly connected to the pandabi-network
. Your docker-compose.yml
file should already have the correct network configuration, but double-check to ensure there are no issues.
Service Dependencies:
Make sure that the client
service is not trying to resolve pandabi-backend
before it is up and running. You can use the depends_on
directive to ensure the client
service waits for the server
service to be ready.
DNS Configuration: Verify that Docker's internal DNS is working correctly. Sometimes restarting Docker can resolve transient DNS issues:
sudo systemctl restart docker
Network Alias: You can explicitly set network aliases to ensure that services can resolve each other by name.
Here is an updated version of your docker-compose.yml
file with the depends_on
directive added to the client
service to ensure it waits for the server
service:
services:
postgresql:
image: postgres:14.2-alpine
environment:
POSTGRES_USER: pandasai
POSTGRES_PASSWORD: password123
POSTGRES_DB: pandasai-db
ports:
- "5430:5432"
volumes:
- ./pgdata:/var/lib/postgresql/data
networks:
- pandabi-network
server:
container_name: pandabi-backend
build:
context: ./server
dockerfile: Dockerfile
ports:
- "8000:8000"
restart: always
env_file:
- ./server/.env
depends_on:
- postgresql
networks:
- pandabi-network
command: "/bin/bash startup.sh"
client:
container_name: pandabi-frontend
build:
context: ./client
dockerfile: Dockerfile
ports:
- "3000:3000"
restart: always
env_file:
- ./client/.env
environment:
- NODE_ENV=development
command: npm run start
depends_on:
- server
networks:
- pandabi-network
networks:
pandabi-network:
driver: bridge
By adding depends_on: - server
to the client
service, you ensure that the client
service will wait for the server
service to be up and running before starting. This should help resolve the DNS resolution issue [1].
Check Docker Network: Ensure that the Docker network is functioning correctly. You can inspect the network to see if the containers are correctly connected:
docker network inspect pandabi-network
Test DNS Resolution:
From within the client
container, test if the DNS resolution for pandabi-backend
works:
docker-compose exec client ping pandabi-backend
By following these steps, you should be able to identify and resolve the cause of the "getaddrinfo EAI_AGAIN pandabi-backend" error during the build process.
If the issue persists, we might need the specialized knowledge of @gventuri to further diagnose and resolve the problem.
To continue talking to Dosu, mention @dosu.
i need human help pls
https://discord.com/channels/1102146545580785686/1288460421195501628
is important for install correctly and compare bigquery connections and prompts and inference with pandas ai with another options i already installed, can u help me?
System Info
latest ubuntu 22 3.11
🐛 Describe the bug
how solve this issue?