Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

executor failed running [/bin/sh -c yarn install --production]: exit code: 1 #347

Closed
marcovanwoudenberg opened this issue Jan 6, 2023 · 8 comments

Comments

@marcovanwoudenberg
Copy link

Hi,

I'm getting the following error when following the getting started tutorial from this site: https://docs.docker.com/get-started/02_our_app/

When executing the steps from "3. Build the container image using the following commands" i get the below error.
executor failed running [/bin/sh -c yarn install --production]: exit code: 1

Sadly I dont get an yarn-error.log so I cannot check what happens. below the full overview of the executed steps when performing the docker build
[+] Building 24.2s (12/12) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> resolve image config for docker.io/docker/dockerfile:1 1.1s
=> CACHED docker-image://docker.io/docker/dockerfile:1@sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e94c4e8 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> [internal] load .dockerignore 0.0s
=> [internal] load metadata for docker.io/library/node:18-alpine 0.8s
=> [internal] load build context 0.0s
=> => transferring context: 2.49kB 0.0s
=> [1/4] FROM docker.io/library/node:18-alpine@sha256:a136ed7b0df71082cdb171f36d640ea3b392a5c70401c642326acee 0.0s
=> CACHED [2/4] WORKDIR /app 0.0s
=> CACHED [3/4] COPY . . 0.0s
=> ERROR [4/4] RUN yarn install --production 22.0s

[4/4] RUN yarn install --production:
#12 0.503 yarn install v1.22.19
#12 0.564 [1/4] Resolving packages...
#12 0.711 [2/4] Fetching packages...
#12 5.808 error An unexpected error occurred: "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz: getaddrinfo EAI_AGAIN registry.yarnpkg.com".
#12 5.808 info If you think this is a bug, please open a bug report with the information provided in "/app/yarn-error.log".
#12 5.808 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.


executor failed running [/bin/sh -c yarn install --production]: exit code: 1

I already have a running container "docker/getting-started" which shows me the docker dekstop getting-started page which contains the exact same steps. This one is running fine on localhost/80:80

System requirements:
Windows 11 Pro (MSI Desktop)
Executed the docker build using GIT Bash and PowerShell (in admin mode)
Nothing else running on port 3000
Code Editor is VsCode

@mikesir87
Copy link
Member

Hi @marcovanwoudenberg! We're sorry to hear you're running into troubles but will see if we can get you up and going again.

The error that you're getting is occurring when yarn is trying to install the dependencies needed for the application and it's throwing the getaddrinfo EAI_AGAIN registry.yarnpkg.com error. That error occurs if the DNS lookup for registry.yarnpkg.com fails. Are you by chance on a VPN? Or anything else that might be unique about your network setup?

@marcovanwoudenberg
Copy link
Author

Hi @mikesir87 , no there is no VPN installed or change in DNS.

@mikesir87
Copy link
Member

Ok! Let's see if we can recreate the issue outside of a build. Can you try running the following command and see if it succeeds/fails?

docker run busybox nslookup registry.yarnpkg.com

@marcovanwoudenberg
Copy link
Author

Hi @mikesir87,

The issue is resolved. Turns-out it was a DNS change that was still hidden in mij network settings.
After removing it everything went fine and the App is up and running.

KR,
Marco

@mikesir87
Copy link
Member

Awesome! Great to hear you got it working @marcovanwoudenberg! Let us know if you run into anybother issues or have other questions!

@bastarte
Copy link

bastarte commented Mar 31, 2023

Edited my comment into a new issue

@taozhiyuai
Copy link

Ok! Let's see if we can recreate the issue outside of a build. Can you try running the following command and see if it succeeds/fails?

docker run busybox nslookup registry.yarnpkg.com

@bastarte @mikesir87

Not work for me .I install Quvir on ubuntu,Err info:

run docker run busybox nslookup registry.yarnpkg.com, and show:

`root@ser766361423613:~/quivr# docker run busybox nslookup registry.yarnpkg.com
Unable to find image 'busybox:latest' locally
latest: Pulling from library/busybox
3f4d90098f5b: Pull complete
Digest: sha256:3fbc632167424a6d997e74f52b878d7cc478225cffac6bc977eedfe51c7f4e79
Status: Downloaded newer image for busybox:latest
Server: 223.5.5.5
Address: 223.5.5.5:53

Non-authoritative answer:
registry.yarnpkg.com canonical name = yarn.npmjs.org
Name: yarn.npmjs.org
Address: 104.16.25.34
Name: yarn.npmjs.org
Address: 104.16.24.34
Name: yarn.npmjs.org
Address: 104.16.2.35
Name: yarn.npmjs.org
Address: 104.16.26.34
Name: yarn.npmjs.org
Address: 104.16.29.34
Name: yarn.npmjs.org
Address: 104.16.1.35
Name: yarn.npmjs.org
Address: 104.16.31.34
Name: yarn.npmjs.org
Address: 104.16.27.34
Name: yarn.npmjs.org
Address: 104.16.0.35
Name: yarn.npmjs.org
Address: 104.16.28.34
Name: yarn.npmjs.org
Address: 104.16.30.34
Name: yarn.npmjs.org
Address: 104.16.3.35

Non-authoritative answer:
registry.yarnpkg.com canonical name = yarn.npmjs.org
Name: yarn.npmjs.org
Address: 2606:4700::6810:1922
Name: yarn.npmjs.org
Address: 2606:4700::6810:323
Name: yarn.npmjs.org
Address: 2606:4700::6810:1a22
Name: yarn.npmjs.org
Address: 2606:4700::6810:1f22
Name: yarn.npmjs.org
Address: 2606:4700::6810:1c22
Name: yarn.npmjs.org
Address: 2606:4700::6810:1d22
Name: yarn.npmjs.org
Address: 2606:4700::6810:123
Name: yarn.npmjs.org
Address: 2606:4700::6810:1b22
Name: yarn.npmjs.org
Address: 2606:4700::6810:23
Name: yarn.npmjs.org
Address: 2606:4700::6810:223
Name: yarn.npmjs.org
Address: 2606:4700::6810:1822
Name: yarn.npmjs.org
Address: 2606:4700::6810:1e22

`

and then install quivr

`root@ser766361423613:~/quivr# docker compose up --build
[+] Building 213.6s (24/26) docker:default
=> [worker internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 1.07kB 0.1s
=> [worker internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [frontend internal] load .dockerignore 0.0s
=> => transferring context: 60B 0.0s
=> [frontend internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 828B 0.0s
=> [frontend internal] load metadata for docker.io/library/node:18.13.0-alpine 1.5s
=> [worker internal] load metadata for docker.io/library/python:3.11-slim-bullseye 1.5s
=> [frontend 1/10] FROM docker.io/library/node:18.13.0-alpine@sha256:fda98168118e5a8f4269efca4101ee51dd5c75c0fe56d8eb6fad80455c2f5827 0.0s
=> [frontend internal] load build context 0.3s
=> => transferring context: 59.23kB 0.3s
=> [worker 1/8] FROM docker.io/library/python:3.11-slim-bullseye@sha256:4efa875ed8710408f96db21a163ce897f149cda3c2a4111f0af6caa258f2c536 0.0s
=> [worker internal] load build context 0.1s
=> => transferring context: 9.67kB 0.1s
=> CACHED [worker 2/8] RUN apt-get update && apt-get install -y libgeos-dev libcurl4-openssl-dev libssl-dev pandoc binutils curl git build-essential && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y 0.0s
=> CACHED [worker 3/8] WORKDIR /code 0.0s
=> CACHED [worker 4/8] COPY ./requirements.txt . 0.0s
=> CACHED [worker 5/8] RUN pip install --upgrade pip 0.0s
=> CANCELED [worker 6/8] RUN pip install --no-cache-dir -r requirements.txt --timeout 200 211.9s
=> CACHED [frontend 2/10] RUN apk add --update --no-cache python3 make g++ && ln -sf python3 /usr/bin/python 0.0s
=> CACHED [frontend 3/10] RUN python3 -m ensurepip 0.0s
=> CACHED [frontend 4/10] RUN pip3 install --no-cache --upgrade pip setuptools 0.0s
=> CACHED [frontend 5/10] RUN mkdir -p /app 0.0s
=> CACHED [frontend 6/10] WORKDIR /app 0.0s
=> CACHED [frontend 7/10] COPY package*.json yarn.lock ./ 0.0s
=> CACHED [frontend 8/10] RUN yarn install --network-timeout 1000000 0.0s
=> CACHED [frontend 9/10] COPY . . 0.0s
=> ERROR [frontend 10/10] RUN yarn build 211.1s

[frontend 10/10] RUN yarn build:
1.096 yarn run v1.22.19
1.232 $ next build
3.066 - info Loaded env from /app/.env
3.728 Attention: Next.js now collects completely anonymous telemetry regarding usage.
3.729 This information is used to shape Next.js' roadmap and prioritize features.
3.729 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:
3.730 https://nextjs.org/telemetry
3.730
3.925 - info Creating an optimized production build...
210.9 error Command failed with signal "SIGKILL".
210.9 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.


failed to solve: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1
root@ser766361423613:~/quivr#
`

@cdivyanambiar
Copy link

Getting same error.
What is the solution ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants