Docker executor jobs failing on CircleCI Server 4 during environment spin up step

Overview

When running Docker Executor jobs on Server 4, you may see them fail on the 'Spin up environment' step with the error containing the message 

"cgroup doesn't match target mode"

Solution

The issue is caused by how the Nomad client tries to use cgroup v2 for memory usage control when running the Docker executor on Ubuntu 22 whereby v1 is the only version natively supported out of the box.

To resolve the issue, do the following to revert to cgroup v1:

  • Run the following command: sudo nano /etc/default/grub
  • Within /etc/default/grub, change the GRUB_CMDLINE_LINUX value such that it reads as follows:GRUB_CMDLINE_LINUX="systemd.unified_cgroup_hierarchy=0"
  •  Save the file and then run the following command: 

    sudo update-grub

  • Reboot the VM's upon which the Nomad client is installed and retry the job.
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.