简体   繁体   English

CrashLoopBackOff:后退重启失败的容器

[英]CrashLoopBackOff : Back-off restarting failed container

I am trying to debug my pod throwing CrashLoopBackOff error.我正在尝试调试我的 pod 抛出 CrashLoopBackOff 错误。 When I run decribe command, I found that Back-off restarting failed container is the error.当我运行 decribe 命令时,我发现Back-off restarting failed container是错误。 I excuted the logs for the failing pod and I got the below data.我为失败的 pod 执行了日志,并得到了以下数据。

vagrant@master:~> kubectl logs pod_name
standard_init_linux.go:228: exec user process caused: exec format error

vagrant@master:/vagrant> kubectl logs -p  pod_name
unable to retrieve container logs for containerd://db0f2dbd549676d8bf1026e5757ff45847c62152049b36037263f81915e948eavagrant

Why I am not able to execute the logs command?为什么我无法执行日志命令?

More details:更多细节:

在此处输入图像描述

yaml file is as follows yaml文件如下

apiVersion: v1
kind: Service
metadata:
  labels:
    service: udaconnect-app
  name: udaconnect-app
spec:
  ports:
  - name: "3000"
    port: 3000
    targetPort: 3000
    nodePort: 30000
  selector:
    service: udaconnect-app
  type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    service: udaconnect-app
  name: udaconnect-app
spec:
  replicas: 1
  selector:
    matchLabels:
      service: udaconnect-app
  template:
    metadata:
      labels:
        service: udaconnect-app
    spec:
      containers:
      - image: udacity/nd064-udaconnect-app:latest
        name: udaconnect-app
        imagePullPolicy: Always
        resources:
          requests:
            memory: "128Mi"
            cpu: "64m"
          limits:
            memory: "256Mi"
            cpu: "256m"
      restartPolicy: Always

My vagrant file我的 vagrant 文件

default_box = "opensuse/Leap-15.2.x86_64" 
Vagrant.configure("2") do |config|
config.vm.define "master" do |master|
    master.vm.box = default_box
    master.vm.hostname = "master"
    master.vm.network 'private_network', ip: "192.168.0.200",  virtualbox__intnet: true
    master.vm.network "forwarded_port", guest: 22, host: 2222, id: "ssh", disabled: true
    master.vm.network "forwarded_port", guest: 22, host: 2000 # Master Node SSH
    master.vm.network "forwarded_port", guest: 6443, host: 6443 # API Access
    for p in 30000..30100 # expose NodePort IP's
      master.vm.network "forwarded_port", guest: p, host: p, protocol: "tcp"
      end
    master.vm.provider "virtualbox" do |v|
      v.memory = "3072"
      v.name = "master"
      end
    master.vm.provision "shell", inline: <<-SHELL
      sudo zypper refresh
      sudo zypper --non-interactive install bzip2
      sudo zypper --non-interactive install etcd
      sudo zypper --non-interactive install apparmor-parser
      curl -sfL https://get.k3s.io | sh -
    SHELL
  end

  config.vm.provider "virtualbox" do |vb|
  vb.memory = "4096"
      vb.cpus = 4
end

Any help is appreciated.任何帮助表示赞赏。

Summarizing the comments: CrashLoopBackOff error occurs, when there is a mismatch of AMD64 and ARM64 devices.总结评论:当 AMD64 和 ARM64 设备不匹配时,会发生CrashLoopBackOff错误。 According to your docker image udacity/nd064-udaconnect-app , we can see that it's AMD64 arch and your box opensuse/Leap-15.2.x86_64 is ARM64 arch .根据您的 docker 图像udacity/nd064-udaconnect-app ,我们可以看到它是AMD64 拱门,而您的盒子opensuse/Leap-15.2.x86_64ARM64 拱门

Hence, you have to change either your docker image, or the box in order to resolve this issue.因此,您必须更改您的 docker 图像或框才能解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 CrashLoopBackOff - 后退重启失败的容器 - CrashLoopBackOff - Back-off restarting failed container CrashLoopBackOff : 后退重新启动烧瓶应用程序失败的容器 - CrashLoopBackOff : Back-off restarting failed container for flask application Elasticsearch Kubernetes Pod失败并崩溃-重启重启失败的容器 - Elasticsearch kubernetes pods failing with crashloopbackoff - Back-off restarting failed container 回退重启失败的容器 kubernetes - Back-off restarting failed container kubernetes kubernetes pod failed with Back-off restarting failed container - kubernetes pod failed with Back-off restarting failed container 如何知道Elasticsearch的Back-off重启失败容器的原因 - how to know the reason of Back-off restarting failed container of elasticsearch 在事件或日志中没有信息的情况下回退重新启动失败的容器 - Back-off restarting failed container with no information in events or logs 回退重启失败的容器openshift kubernetes - Back-off restarting failed container openshift kubernetes 回退重启失败的容器在 Azure AKS - Back-off restarting failed container In Azure AKS 错误-创建服务时退后重新启动失败的容器 - Error - Back-off restarting failed container while creating a service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM