labring / sealos

Sealos is a production-ready Kubernetes distribution. You can run any Docker image on sealos, start high availability databases like mysql/pgsql/redis/mongo, develop applications using any Programming language.
https://cloud.sealos.io
Apache License 2.0
14.14k stars 2.08k forks source link

问题: arm架构 sealos arm 版本执行部署集群失败 #809

Closed BlankPoetry closed 2 years ago

BlankPoetry commented 2 years ago

版本 :CentOS Linux release 7.9.2009 (AltArch) aarch64 执行 :sealos init --passwd '' --master ... --master ... --master ... --node ... --node ... --pkg-url /data/kube/kube1.19.16.tar.gz --version v1.19.16

Unfortunately, an error has occurred: timed out waiting for the condition

This error is likely caused by:
    - The kubelet is not running
    - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)

If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
    - 'systemctl status kubelet'
    - 'journalctl -xeu kubelet'

Additionally, a control plane component may have crashed or exited when started by the container runtime.
To troubleshoot, list all containers using your preferred container runtimes CLI.

Here is one example how you may list all Kubernetes containers running in docker:
    - 'docker ps -a | grep kube | grep -v pause'
    Once you have found the failing container, you can inspect its logs with:
    - 'docker logs CONTAINERID'

error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster To see the stack trace of this error execute with --v=5 or higher

cuisongliu commented 2 years ago

把整体日志贴上来

BlankPoetry commented 2 years ago

sealos.log

oldthreefeng commented 2 years ago

这个sealos版本不对, 下载最新版本。 @cuisongliu @BlankPoetry

后面这个日志最好以文件的形式, 你这影响阅读。

BlankPoetry commented 2 years ago

@oldthreefeng 是最新版本的sealos, 只是之前用了是其他版本, 这个日志是用的最新版本

oldthreefeng commented 2 years ago

@cuisongliu 这个有点像你改的那个问题。 怎么说, 没发到最新的版本么?

oldthreefeng commented 2 years ago

看一下sealos版本 @BlankPoetry

cuisongliu commented 2 years ago

@oldthreefeng 是最新版本的sealos, 只是之前用了是其他版本, 这个日志是用的最新版本

最新是哪个版本?version命令看一下

cuisongliu commented 2 years ago

这个问题rc.9已经修复了。可以看一下版本

BlankPoetry commented 2 years ago

@cuisongliu image

cuisongliu commented 2 years ago
image

重新执行一下。在看一下日志还有这个错误么

BlankPoetry commented 2 years ago

@cuisongliu 换成rc10版本,没有报上面的错误,报超时 1641259821(1) 1641259716(1) sealos.log

oldthreefeng commented 2 years ago

这个安装过程没有看出啥问题, 得看 kubelet 和 docker的容器日志了。

cuisongliu commented 2 years ago
image

打开离线包 看一下脚本

BlankPoetry commented 2 years ago

@oldthreefeng @cuisongliu 需要看哪个脚本?

messages.txt

cuisongliu commented 2 years ago

/etc/systemd/system/kubelet.service.d/containerd.conf 你看一下这个配置。

BlankPoetry commented 2 years ago

@cuisongliu 没有containerd.conf 配置文件, 只有/etc/systemd/system/kubelet.service.d/10-kubeadm.conf

Note: This dropin only works with kubeadm and kubelet v1.11+

[Service] Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf" Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml"

This is a file that "kubeadm init" and "kubeadm join" generates at runtime, populating the KUBELET_KUBEADM_ARGS variable dynamically

EnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env

This is a file that the user can use for overrides of the kubelet args as a last resort. Preferably, the user should use

the .NodeRegistration.KubeletExtraArgs object in the configuration files instead. KUBELET_EXTRA_ARGS should be sourced from this file.

EnvironmentFile=-/etc/sysconfig/kubelet ExecStart= ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS

cuisongliu commented 2 years ago

你看一下cgroupfs是啥 估计被置空了

BlankPoetry commented 2 years ago

怎么看?docker ? 1641271210(1)

cuisongliu commented 2 years ago

看一下kubelet配置吧,/var/lib/kubelet目录看一下cgroup估计被置空了

BlankPoetry commented 2 years ago

@cuisongliu /var/lib/kubelet/config.yaml 1641274979(1)

cuisongliu commented 2 years ago
image

你下载的包是arm的么????

BlankPoetry commented 2 years ago

这个报错是什么原因?是不是它造成docker启动容器失败了 dockerd: time="2022-01-04T10:23:03.722233493+08:00" level=warning msg="failed to retrieve runc version: fork/exec /usr/local/sbin/runc: exec format error"

BlankPoetry commented 2 years ago

第一次使用的$ wget -c https://sealyun.oss-cn-beijing.aliyuncs.com/latest/sealos && \ chmod +x sealos && mv sealos /usr/bin 现在使用的就是arm版本 1641276483(1)

cuisongliu commented 2 years ago

第一次使用的$ wget -c https://sealyun.oss-cn-beijing.aliyuncs.com/latest/sealos && chmod +x sealos && mv sealos /usr/bin 现在使用的就是arm版本 1641276483(1)

你下的是amd64的sealos....可能你的机器是amd64。。。

BlankPoetry commented 2 years ago

下载是arm 版本的sealos , 机器是arm的吧 1641279660(1) 1641279885(1) 1641279868(1)

cuisongliu commented 2 years ago

sealos arm 地址是 https://sealyun.oss-cn-beijing.aliyuncs.com/latest/sealos-arm64

cuisongliu commented 2 years ago

这个报错是什么原因?是不是它造成docker启动容器失败了 dockerd: time="2022-01-04T10:23:03.722233493+08:00" level=warning msg="failed to retrieve runc version: fork/exec /usr/local/sbin/runc: exec format error"

image

有残留docker????runc的目录应该是/usr/bin/runc

BlankPoetry commented 2 years ago

@cuisongliu 还是报一样的错误。

BlankPoetry commented 2 years ago

1641283322(1)

BlankPoetry commented 2 years ago

这个报错是什么原因?是不是它造成docker启动容器失败了 dockerd: time="2022-01-04T10:23:03.722233493+08:00" level=warning msg="failed to retrieve runc version: fork/exec /usr/local/sbin/runc: exec format error"

image

有残留docker????runc的目录应该是/usr/bin/runc

残留docker , 要如何清除?

oldthreefeng commented 2 years ago

1.19.16 版本使用的是 docker。 应该只需要删除 /usr/bin/docker*

但是你 /usr/local/bin/ /usr/local/sbin/ 都有二进制, 说明你安装的不止1.19. 可能安装了 1.20+ , 并且安装错了amd版本。

如果我猜测的对。

只需要执行

rm -f  /usr/local/bin/docker*
rm -f  /usr/local/bin/container*
rm -f  /usr/local/sbin/runc
BlankPoetry commented 2 years ago

显示成功了, 是存在多版本的问题 那要安装 Kuboard 管理界面有安装的脚本嘛? 1641286232(1)

cuisongliu commented 2 years ago

显示成功了, 是存在多版本的问题 那要安装 Kuboard 管理界面有安装的脚本嘛? 1641286232(1)

安装kuboard得去kubeard看了。问题解决了,这个issue就关了。