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

node:4-node18 fail to run with fake error #850

Open
khmyznikov opened this issue Feb 21, 2023 · 7 comments
Open

node:4-node18 fail to run with fake error #850

khmyznikov opened this issue Feb 21, 2023 · 7 comments

Comments

@khmyznikov
Copy link

From about January 30 image mcr.microsoft.com/azure-functions/node:4-node18 starts failing to run after extraction with fake error about access denied, the same error for any docker registry - azure or dockerhub doesn't matter.

  • 2023-02-21T10:53:19.738Z INFO - c8f4ee9f21c3 Extracting 365MB / 370MB
  • 2023-02-21T10:53:19.886Z INFO - c8f4ee9f21c3 Extracting 366MB / 370MB
  • 2023-02-21T10:53:20.352Z INFO - c8f4ee9f21c3 Extracting 366MB / 370MB
  • 2023-02-21T10:53:22.547Z INFO - c8f4ee9f21c3 Extracting 370MB / 370MB
  • 2023-02-21T10:53:23.883Z INFO -
  • 2023-02-21T10:53:23.890Z ERROR - failed to register layer: Error processing tar file(exit status 1): Container ID 718322462 cannot be mapped to a host IDErr: 0, Message: failed to register layer: Error processing tar file(exit status 1): Container ID 718322462 cannot be mapped to a host ID
  • 2023-02-21T10:53:23.898Z INFO - Pull Image failed, Time taken: 3 Minutes and 36 Seconds
  • 2023-02-21T10:53:23.905Z ERROR - Pulling docker image khmyznikov/pwabuilder-api-v2:latest failed:
  • 2023-02-21T10:53:24.598Z ERROR - DockerApiException: Docker API responded with status code=NotFound, response={"message":"pull access denied for khmyznikov/pwabuilder-api-v2, repository does not exist or may require 'docker login': denied: requested access to the resource is denied"}
  • 2023-02-21T10:53:24.604Z WARN - Image pull failed. Defaulting to local copy if present.
  • 2023-02-21T10:53:24.618Z ERROR - Image pull failed: Verify docker image configuration and credentials (if using private repository)
  • 2023-02-21T10:53:32.358Z INFO - Stopping site pwabuilder-tests-apiv2-preview because it failed during startup.

If I change nothing but node:4-node18 to node:4-node16 everything starts working again.

  • 2023-02-21T11:01:35.503Z INFO - 5ddb26ac105b Extracting 367MB / 367MB
  • 2023-02-21T11:01:38.522Z INFO - 5ddb26ac105b Pull complete
  • 2023-02-21T11:01:38.561Z INFO - Digest: sha256:....
  • 2023-02-21T11:01:38.590Z INFO - Status: Downloaded newer image for khmyznikov/pwabuilder-api-v2:latest
  • 2023-02-21T11:01:38.597Z INFO - Pull Image successful, Time taken: 3 Minutes and 50 Seconds
  • 2023-02-21T11:01:38.666Z INFO - Starting container for site
  • 2023-02-21T11:01:38.672Z INFO - docker run -d -p 4398:7071 --name pwabuilder-tests-apiv2-preview ....
@tonynator
Copy link

I encountered a very similar error message today.
I have Node containers. I wanted to upgrade my containers from node:16-alpine to node:18-alpine, but I received the same error message on node:18-alpine. On node:16-alpine works well.

App service logs:

ERROR - failed to register layer: Error processing tar file(exit status 1): Container ID 718322462 cannot be mapped to a host IDErr: 0, Message: failed to register layer: Error processing tar file(exit status 1): Container ID 718322462 cannot be mapped to a host ID

@khmyznikov
Copy link
Author

It's weird because I'm sure it was working just fine few weeks ago, very annoyng problem, spent a lot of time to workaround this but I want native Fetch API so, don't like node downgrading solution 👎

@fgbaezp
Copy link

fgbaezp commented Feb 23, 2023

I encountered a very similar error message today. I have Node containers. I wanted to upgrade my containers from node:16-alpine to node:18-alpine, but I received the same error message on node:18-alpine. On node:16-alpine works well.

App service logs:

ERROR - failed to register layer: Error processing tar file(exit status 1): Container ID 718322462 cannot be mapped to a host IDErr: 0, Message: failed to register layer: Error processing tar file(exit status 1): Container ID 718322462 cannot be mapped to a host ID

Hey are you using alpine based images? Would you mind sharing how did you manage that? I thought Microsoft stopped releasing alpine-based images from version 3 :/

@tonynator
Copy link

@fgbaezp

The npm fix has been merged, but they haven't released yet.

If you use node:18-alpine that could be a temporary workaround for you:

FROM node:18-alpine
....
....
....
RUN npm install  \
 && chown -R $(id -u):$(id -g) node_modules
 ....
 ....
 ....

That will solve your issue.

@Jonatan-V
Copy link

I get the same problem on node:4-node18-appservice (however node:4-node16-appservice works). I dont think its a fake error but rather related to a bug/breaking change in npm. Its already fixed but the version in the MS node18 images are probably not up to speed yet.
You can read more about it here:
https://azureossd.github.io/2022/06/30/Docker-User-Namespace-remapping-issues/
npm/pacote#261
projectkudu/kudu#2512

@CooperLink
Copy link
Collaborator

Thank you for filing this issue. I am forwarding this thread to the Azure Functions node team to make sure that they are aware of it. Hopefully we can provide a timeline for resolving this.

@ejizba
Copy link
Contributor

ejizba commented Apr 10, 2023

Hi, I'm on the Azure Functions node team. It sounds like this was fixed in npm v9.5.1, but I'm not seeing a release of Node 18 using that npm version by default yet: https://nodejs.org/en/download/releases. Looks like the latest Node 18 release is from March 5th using npm v9.5.0. As soon as a that is out, the Azure Functions images should pick it up usually within a couple weeks

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

6 participants