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

Error: failed to create containerd container: rootpath on mountPath C: #4754

Closed
nimblenitin opened this issue Jan 17, 2025 · 2 comments
Closed

Comments

@nimblenitin
Copy link

nimblenitin commented Jan 17, 2025

Describe the bug
I am getting error on aks. Is there any workaorund for it?

Error: failed to create containerd container: rootpath on mountPath C:\Windows\SystemTemp\ctd-volume2059323837, volume c:\jsreport: CreateFile C:\Windows\SystemTemp\ctd-volume2059323837\c:: The filename, directory name, or volume label syntax is incorrect.

I am hosting nodejs app on windows node, repeatedly getting above.

Dockerfile-

FROM jsreport/jsreport:4.7.0-windowsservercore

WORKDIR /app

COPY .npmrc ./
COPY package.json ./

COPY /shared/customStudioAuthentication.js /app/node_modules/@jsreport/jsreport-authentication/lib/main.js

RUN npm install

COPY . ./

EXPOSE 5488

USER ContainerAdministrator # Or create a custom user as necessary

CMD ["node", "server.js"]
  volumes:
    - name: jsreport-volume
      hostPath:
        path: C:\jsreport
        type: DirectoryOrCreate
    - name: systemtemp
      hostPath:
        path: C:\Windows\SystemTemp
        type: DirectoryOrCreate

    volumeMounts:
    - mountPath: C:\jsreport
      name: jsreport-volume
    - mountPath: C:\Windows\SystemTemp
      name: systemtemp

To Reproduce
Steps to reproduce the behavior:

  1. Run command '...'
  2. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • CLI Version [e.g. 3.22]
  • Kubernetes version [e.g. 1.24.3]
  • CLI Extension version [e.g. 1.7.5] if applicable
  • Browser [e.g. chrome, safari] is applicable

Additional context
Add any other context about the problem here.

Copy link
Contributor

@allyford, @thecloudtaylor would you be able to assist?

@timmy-wright
Copy link

Hey, I had a quick look at this and my initial guess is that the mountPath in your YAML file is incorrect.

Try using /c/jsReport and /c/windows/SystemTemp instead of c:\jsReport and c:\windows\SystemTemp

From memory, "" is a special character in YAML. So if the /c/... approach doesn't work, then try enclosing the mountPath in quotes and escaping it. Like this:

mountPath: "c:\jsReport"

We have documentation about using mountPath in Windows containers here: https://learn.microsoft.com/en-us/azure/aks/windows-vs-linux-containers

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

5 participants