When running Elasticsearch docker container, it fails with the following cgroup error.
java.lang.NullPointerException: Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "anyController" is null
A quick search shows that it might be related to memory cgroup not enabled. /proc/cgroups
does not show memory
subsystem.
cat /proc/cgroups | column -t
#subsys_name hierarchy num_cgroups enabled
cpu 0 190 1
cpuacct 0 190 1
blkio 0 190 1
devices 0 190 1
freezer 0 190 1
net_cls 0 190 1
perf_event 0 190 1
net_prio 0 190 1
hugetlb 0 190 1
pids 0 190 1
rdma 0 190 1
misc 0 190 1
So, I added some additional kernel params to /etc/sdboot-manage.conf
:
cgroup_enable=memory cgroup_memory=1
then ran sudo sdboot-manage gen
and rebooted. I verified that I see the new kernel params in /prod/cmdline
.
But, the memory subsystem is still not listed in /proc/cgroups
and elasticsearch docker container still fails to start.
Any pointers to get the memory cgroup enabled would be much appreciated. Thanks.