dyrnq / dist

K8s manifest yaml files(simple demos for concepts and exploration).
4 stars 2 forks source link

Error: failed to create containerd container: get apparmor_parser #7

Open dyrnq opened 1 year ago

dyrnq commented 1 year ago
Error: failed to create containerd container: get apparmor_parser version: exec: "apparmor_parser": executable file not found in $PATH

journalctl -exu containerd --no-pager

Jan 13 08:45:23 m223 containerd[664]: time="2023-01-13T08:45:23.953973499+08:00" level=error msg="CreateContainer within sandbox \"5da31a211dd52593b2326553a11c55f216a745b55ae530af931f5dd5e4fa22c8\" for &ContainerMetadata{Name:nginx,Attempt:0,} failed" error="failed to create containerd container: get apparmor_parser version: exec: \"apparmor_parser\": executable file not found in $PATH"

journalctl -exu kubelet --no-pager

Jan 13 08:46:48 m223 kubelet[720]: E0113 08:46:48.012377     720 remote_runtime.go:442] "CreateContainer in sandbox from runtime service failed" err="rpc error: code = Unknown desc = failed to create containerd container: get apparmor_parser version: exec: \"apparmor_parser\": executable file not found in $PATH" podSandboxID="5da31a211dd52593b2326553a11c55f216a745b55ae530af931f5dd5e4fa22c8"
Jan 13 08:46:48 m223 kubelet[720]: E0113 08:46:48.012632     720 kuberuntime_manager.go:862] container &Container{Name:nginx,Image:nginx:latest,Command:[],Args:[],WorkingDir:,Ports:[]ContainerPort{ContainerPort{Name:http,HostPort:0,ContainerPort:80,Protocol:TCP,HostIP:,},},Env:[]EnvVar{},Resources:ResourceRequirements{Limits:ResourceList{},Requests:ResourceList{},},VolumeMounts:[]VolumeMount{VolumeMount{Name:maven-cache,ReadOnly:false,MountPath:/usr/share/nginx/html,SubPath:,MountPropagation:nil,SubPathExpr:,},VolumeMount{Name:kube-api-access-czkgt,ReadOnly:true,MountPath:/var/run/secrets/kubernetes.io/serviceaccount,SubPath:,MountPropagation:nil,SubPathExpr:,},},LivenessProbe:nil,ReadinessProbe:nil,Lifecycle:nil,TerminationMessagePath:/dev/termination-log,ImagePullPolicy:Always,SecurityContext:nil,Stdin:false,StdinOnce:false,TTY:false,EnvFrom:[]EnvFromSource{},TerminationMessagePolicy:File,VolumeDevices:[]VolumeDevice{},StartupProbe:nil,} start failed in pod test-nginx-65c6d4bf48-n55zn_default(77c2bdb2-9386-45da-8461-0cbc571b47d1): CreateContainerError: failed to create containerd container: get apparmor_parser version: exec: "apparmor_parser": executable file not found in $PATH
Jan 13 08:46:48 m223 kubelet[720]: E0113 08:46:48.012718     720 pod_workers.go:965] "Error syncing pod, skipping" err="failed to \"StartContainer\" for \"nginx\" with CreateContainerError: \"failed to create containerd container: get apparmor_parser version: exec: \\\"apparmor_parser\\\": executable file not found in $PATH\"" pod="default/test-nginx-65c6d4bf48-n55zn" podUID=77c2bdb2-9386-45da-8461-0cbc571b47d1
dyrnq commented 1 year ago
cat /etc/os-release 
NAME="openEuler"
VERSION="22.03 (LTS-SP1)"
ID="openEuler"
VERSION_ID="22.03"
PRETTY_NAME="openEuler 22.03 (LTS-SP1)"
ANSI_COLOR="0;31"

uname -a
Linux m223 5.10.0-136.12.0.86.oe2203sp1.x86_64 #1 SMP Tue Dec 27 17:50:15 CST 2022 x86_64 x86_64 x86_64 GNU/Linux

kubectl version --client=true
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.5", GitCommit:"804d6167111f6858541cef440ccc53887fbbc96a", GitTreeState:"clean", BuildDate:"2022-12-08T10:15:02Z", GoVersion:"go1.19.4", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7

containerd --version
containerd containerd.io 1.6.14 9ba4b250366a5ddde94bb7c9d1def331423aa323
dyrnq commented 1 year ago

https://command-not-found.com/apparmor_parser try install apparmor

dnf install apparmor
Last metadata expiration check: 15:38:28 ago on Thu 12 Jan 2023 05:05:19 PM CST.
No match for argument: apparmor
Error: Unable to find a match: apparmor

yum install apparmor
Last metadata expiration check: 15:39:21 ago on Thu 12 Jan 2023 05:05:19 PM CST.
No match for argument: apparmor
Error: Unable to find a match: apparmor
dyrnq commented 1 year ago

xref https://github.com/rancher/k3os/issues/702