Skip to content

Instantly share code, notes, and snippets.

@TheBoroer
Created March 25, 2023 05:22
Show Gist options
  • Save TheBoroer/03d3b54504d621efca32cbc94821e826 to your computer and use it in GitHub Desktop.
Save TheBoroer/03d3b54504d621efca32cbc94821e826 to your computer and use it in GitHub Desktop.
Workaround for docker container issues on Ubuntu 22.04

This started happening with docker v20.10 on ubuntu 22.04. Specifically I had errors like these pop up when trying to run the rancher/agent (for rancher/server v1.6.30):

time="2021-06-29T09:13:28Z" level=fatal msg="Failed to find container id:\n0::/\n" 

Seems to be caused by cgroups v2

To make it work again run: echo 'GRUB_CMDLINE_LINUX=systemd.unified_cgroup_hierarchy=false' > /etc/default/grub.d/cgroup.cfg

OR (if it fails if you're not root) create/edit the file /etc/default/grub.d/cgroup.cfg and add this line to it: GRUB_CMDLINE_LINUX=systemd.unified_cgroup_hierarchy=false

Then run: update-grub

and finally reboot the system and it should all work again :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment