Vscode-docker: Starting container process caused "process_linux.go:297: applying cgroup configuration for process caused \"open

Created on 7 Nov 2019  路  9Comments  路  Source: microsoft/vscode-docker

Repro steps:

  1. docker network create server
  2. docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro 鈥攏etwork="server" 鈥攏ame="nginx_proxy" 鈥攔estart="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

external

Most helpful comment

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

All 9 comments

I found this similar issue: https://github.com/moby/moby/issues/29496#issuecomment-267766589

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?

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

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

@MarttiR thanks a lot, it worked!

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

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)

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

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).

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bradygmsft picture bradygmsft  路  7Comments

thernstig picture thernstig  路  3Comments

dwbelliston picture dwbelliston  路  4Comments

bpasero picture bpasero  路  5Comments

gngchrs picture gngchrs  路  3Comments