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

Docker deploy fails due to network error #1653

Open
maxb2 opened this issue Mar 17, 2023 · 3 comments
Open

Docker deploy fails due to network error #1653

maxb2 opened this issue Mar 17, 2023 · 3 comments

Comments

@maxb2
Copy link
Member

maxb2 commented Mar 17, 2023

Occasionally the arm64 image fails to build due to a network error during npm install:

#31 [linux/arm64 dependency-builder 5/5] RUN npm install
#31 651.2 npm ERR! code ERR_SOCKET_TIMEOUT
#31 651.4 npm ERR! network Socket timeout
#31 651.4 npm ERR! network This is a problem related to network connectivity.
#31 651.4 npm ERR! network In most cases you are behind a proxy or have bad network settings.
#31 651.4 npm ERR! network 
#31 651.4 npm ERR! network If you are behind a proxy, please make sure that the
#31 651.4 npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
#31 655.0 
#31 655.0 npm ERR! A complete log of this run can be found in:
#31 655.0 npm ERR!     /root/.npm/_logs/2023-03-17T14_01_42_616Z-debug-0.log
#31 ERROR: process "/bin/sh -c npm install" did not complete successfully: exit code: 1

#26 [linux/arm/v7 dependency-builder 5/5] RUN npm install
#26 CANCELED
------
 > [linux/arm64 dependency-builder 5/5] RUN npm install:
 ERR! code ERR_SOCKET_TIMEOUT
ERR! network In most cases you are behind a proxy or have bad network settings.
#31 651.4 npm ERR! network 
#31 651.4 npm ERR! network If you are behind a proxy, please make sure that the
#31 651.4 npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
#31 655.0 
#31 655.0 npm ERR! A complete log of this run can be found in:
#31 655.0 npm ERR!     /root/.npm/_logs/2023-03-17T14_01_42_616Z-debug-0.log
------
Dockerfile:9
--------------------
   7 |     COPY . .
   8 |     
   9 | >>> RUN npm install
  10 |     
  11 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c npm install" did not complete successfully: exit code: 1
Error: buildx failed with: ERROR: failed to solve: process "/bin/sh -c npm install" did not complete successfully: exit code: 1

I think the only thing we can do is restart the job until it succeeds. Or we add a retry mechanism to the workflow.

@wsGolden
Copy link

I have encountered the same problem. Have you resolved it

@maxb2
Copy link
Member Author

maxb2 commented Jul 25, 2023

No, we haven't fixed this. We suspect it is a random network dropout.

@TheMBeat
Copy link

TheMBeat commented Sep 9, 2023

You can setup the npm Timeouts to Max

      - run: npm config set fetch-retry-mintimeout 20000
      - run: npm config set fetch-retry-maxtimeout 120000
      - run: npm config set fetch-timeout 300000

This works for me.

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

No branches or pull requests

3 participants