question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The memory cgroup is not enabled.

See original GitHub issue

I appended cgroup_enable=memory cgroup_memory=1 to cmdline.txt file in each node and reboot but it not working.

microk8s inspect

Inspecting Certificates
Inspecting services
  Service snap.microk8s.daemon-cluster-agent is running
  Service snap.microk8s.daemon-containerd is running
  Service snap.microk8s.daemon-apiserver is running
  Service snap.microk8s.daemon-apiserver-kicker is running
  Service snap.microk8s.daemon-proxy is running
  Service snap.microk8s.daemon-kubelet is running
  Service snap.microk8s.daemon-scheduler is running
  Service snap.microk8s.daemon-controller-manager is running
  Copy service arguments to the final report tarball
Inspecting AppArmor configuration
Gathering system information
  Copy processes list to the final report tarball
  Copy snap list to the final report tarball
  Copy VM name (or none) to the final report tarball
  Copy disk usage information to the final report tarball
  Copy memory usage information to the final report tarball
  Copy server uptime to the final report tarball
  Copy current linux distribution to the final report tarball
  Copy openSSL information to the final report tarball
  Copy network configuration to the final report tarball
Inspecting kubernetes cluster
  Inspect kubernetes cluster

WARNING:  The memory cgroup is not enabled. 
The cluster may not be functioning properly. Please ensure cgroups are enabled 
See for example: https://microk8s.io/docs/install-alternatives#heading--arm 
Building the report tarball
  Report tarball is at /var/snap/microk8s/1669/inspection-report-20201027_221452.tar.gz

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:35 (3 by maintainers)

github_iconTop GitHub Comments

12reactions
Cerebuscommented, Oct 15, 2022
GRUB_CMDLINE_LINUX="cgroup_enable=memory cgroup_memory=1 systemd.unified_cgroup_hierarchy=0"

I needed all three of these.

9reactions
basebanditcommented, Oct 3, 2022

Here is a fix for this in ubuntu 22.04. Open the file /etc/default/grub in an editor. Find where the string GRUB_CMDLINE_LINUX is set. Add cgroup_enable=memory cgroup_memory=1 to that string. Save the file and exit the editor. Then run sudo update-grub. Here is how my grub file looks like:

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="cgroup_enable=memory cgroup_memory=1 swapaccount=1 systemd.unified_cgroup_hierarchy=0"

Then you may restart your computer. Then run microk8s.inspect, everything should be ok. Below is my microk8s version MicroK8s v1.25.2 revision 4055

Read more comments on GitHub >

github_iconTop Results From Across the Web

The memory cgroup is not enabled. · Issue #1691
I appended cgroup_enable=memory cgroup_memory=1 to cmdline.txt file in each node and reboot but it not working. microk8s inspect Inspecting ...
Read more >
Enabling memory cgroup in Ubuntu 20.04 - kubernetes
Instructions for enabling the memory cgroup on Ubuntu 18 and 19 involve adding cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1 to ...
Read more >
How to enable memory cgroup on DietPi
Enable memory cgroup on a Raspberry Pi with DietPi an extremely lightweight Debian operating system.
Read more >
enabling cgroup memory doesn't take effect
I'm trying to install Kubernetes and it recommends that I enable the memory cgroup. ... I've looked around for quite some time on...
Read more >
insights-client fails with "Memory cgroup is disabled
ERROR insights.client.phase.v1 Memory cgroup is disabled; insights-client will not run. To run anyway, set ignore_cgroup=True in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found