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

Starting container process caused "process_linux.go:297: applying cgroup configuration for process caused \"open #1402

Closed
Moshyfawn opened this issue Nov 7, 2019 · 9 comments
Labels

Comments

@Moshyfawn
Copy link

Repro steps:

  1. docker network create server
  2. docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro —network="server" —name="nginx_proxy" —restart="unless-stopped" jwilder/nginx-proxy

Action: vscode-docker.containers.start
Error type: 500
Error Message: (HTTP code 500) server error - OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:297: applying cgroup configuration for process caused "open /sys/fs/cgroup/docker/cpuset.cpus.effective: no such file or directory"": unknown

Version: 0.8.2
OS: linux
Product: Visual Studio Code
Product Version: 1.39.2
Language: en

Call Stack
extension.bundle.js:157:703098
extension.bundle.js:157:703061
m.buildPayload extension.bundle.js:157:703071
IncomingMessage.<anonymous> extension.bundle.js:157:702571
IncomingMessage.emit events.js:187:15
endReadableNT _stream_readable.js:1092:12
process._tickCallback next_tick.js:63:19
@bwateratmsft
Copy link
Contributor

I found this similar issue: moby/moby#29496 (comment)

The comment I linked recommends doing some extra setup work in order to get cgroups working. Can you try that and see if it works?

@MarttiR
Copy link

MarttiR commented Nov 14, 2019

@Moshyfawn If you're running Fedora 31, this is likely the solution until this issue is closed.

  1. Edit /etc/default/grub
  2. Add the following line below GRUB_CMDLINE_LINUX:
systemd.unified_cgroup_hierarchy=0
  1. Run grub2-mkconfig
  2. Restart the system

For more info, see CGroupsV2 on Fedora wiki.

@bwateratmsft
Copy link
Contributor

@Moshyfawn Let us know if that solution works! Thanks for finding it @MarttiR!

@murych
Copy link

murych commented Nov 19, 2019

@MarttiR thanks a lot, it worked!

  • Linux 5.3.11-300.fc31.x86_64
  • Docker version 19.03.5, build 633a0ea838

@H--o-l
Copy link

H--o-l commented Dec 4, 2019

The solution of @MarttiR did not work for me, and I think the Fedora 31 documentation had an update for this issue :
https://fedoraproject.org/wiki/Common_F31_bugs#Docker_package_no_longer_available_and_will_not_run_by_default_.28due_to_switch_to_cgroups_v2.29

Thus, another way to disable CGroupsV2 and allow Docker to run seems to be:

  • sudo grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0"
  • reboot

(or use podman that suport CGroupsV2 instead of Docker)

@Moshyfawn
Copy link
Author

Sorry for the late reply, being very busy.
I've tried @MarttiR's solution but it didn't work for me. Even had to deal with the secure boot and resetting my grub config. The solution @H--o-l mentioned did it.
Those seem like a similar two similar solutions, tho. Maybe I've made some mistake.

Working solution:
sudo grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0"

P.S. @H--o-l mentioned using podman but it still can't fully replace docker at least regarding docker-compose. That's why I ran into this issue in the first place

@hoto
Copy link

hoto commented Dec 25, 2019

I had the same problem with docker on fresh installation of Fedora 31 and Fedora 31 Server.
@H--o-l solution (using sudo grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0" then rebooting) is working like a charm in both cases.

Can't use podman as I'm using docker-compose (same as @Moshyfawn).

@mmarquezv
Copy link

mmarquezv commented Jan 2, 2020

I had the same problem and sudo grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0" worked fine. Thanks!

@bwateratmsft
Copy link
Contributor

I'll close this issue as external, seems to be a Fedora thing.

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

No branches or pull requests

7 participants