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

Open
Moshyfawn opened this issue Nov 7, 2019 · 8 comments

Comments

@Moshyfawn
Copy link

@Moshyfawn Moshyfawn commented Nov 7, 2019

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

This comment has been minimized.

Copy link
Contributor

@bwateratmsft bwateratmsft commented Nov 8, 2019

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

This comment has been minimized.

Copy link

@MarttiR 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

This comment has been minimized.

Copy link
Contributor

@bwateratmsft bwateratmsft commented Nov 14, 2019

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

@murych

This comment has been minimized.

Copy link

@murych 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
@penehyba penehyba mentioned this issue Dec 3, 2019
@H--o-l

This comment has been minimized.

Copy link

@H--o-l 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

This comment has been minimized.

Copy link
Author

@Moshyfawn Moshyfawn commented Dec 17, 2019

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

This comment has been minimized.

Copy link

@hoto 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

This comment has been minimized.

Copy link

@mmarquezv 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.