I'm trying to install RKE2 on a virtual Rocky Linux 8 server, with "minimal server install" and a CIS Server Level 2 hardening profile, but when I start the service, I get some errors. Always when I install on a server with separate /var partition (which is required by the hardening profile), I have this issue.
When I start the service (systemctl start rke2-server.service) with root user, I give the following response:
Apr 25 18:24:45 server.companyeli.local rke2[3351]: time="2023-04-25T18:24:45-03:00" level=info msg="Updated manifest /var/lib/rancher/rke2/server/manifests/harvester-csi-driver.yaml to set clust> Apr 25 18:24:45 server.companyeli.local rke2[3351]: time="2023-04-25T18:24:45-03:00" level=info msg="Updated manifest /var/lib/rancher/rke2/server/manifests/rke2-calico-crd.yaml to set cluster co> Apr 25 18:24:45 server.companyeli.local rke2[3351]: time="2023-04-25T18:24:45-03:00" level=info msg="Updated manifest /var/lib/rancher/rke2/server/manifests/rke2-multus.yaml to set cluster config> Apr 25 18:24:45 server.companyeli.local rke2[3351]: time="2023-04-25T18:24:45-03:00" level=info msg="Updated manifest /var/lib/rancher/rke2/server/manifests/rke2-snapshot-controller.yaml to set c> Apr 25 18:24:45 server.companyeli.local rke2[3351]: time="2023-04-25T18:24:45-03:00" level=info msg="Logging containerd to /var/lib/rancher/rke2/agent/containerd/containerd.log" Apr 25 18:24:45 server.companyeli.local rke2[3351]: time="2023-04-25T18:24:45-03:00" level=info msg="Running containerd -c /var/lib/rancher/rke2/agent/etc/containerd/config.toml -a /run/k3s/conta> Apr 25 18:24:45 server.companyeli.local rke2[3351]: containerd: fork/exec /var/lib/rancher/rke2/data/v1.25.9-rke2r1-177f016694ea/bin/containerd: permission denied Apr 25 18:24:45 server.companyeli.local systemd[1]: rke2-server.service: Main process exited, code=exited, status=1/FAILURE Apr 25 18:24:45 server.companyeli.local systemd[1]: rke2-server.service: Failed with result 'exit-code'. -- Subject: Unit failed -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- The unit rke2-server.service has entered the 'failed' state with result 'exit-code'. Apr 25 18:24:45 server.companyeli.local systemd[1]: Failed to start Rancher Kubernetes Engine v2 (server). -- Subject: Unit rke2-server.service has failed -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
On step 3 of the quick rancher tutorial (https://docs.rke2.io/install/quickstart), I have the error above that start with a permission denied on /var/lib/rancher/rke2/data/v1.25.9-rke2r1-177f016694ea/bin/containerd. I changed the /var directory permissions and owner, without success..
How can I solve this issue?