本文档采用自动化机器翻译技术翻译。 尽管我们力求提供准确的译文,但不对翻译内容的完整性、准确性或可靠性作出任何保证。 若出现任何内容不一致情况,请以原始 英文 版本为准,且原始英文版本为权威文本。

恢复故障排除

在执行恢复时,请勿在元素节点上重启`rancher-system-agent`,否则可能会导致其失效并出现以下错误:

panic: error while connecting to Kubernetes cluster: the server has asked for the client to provide credentials

如果您遇到此问题,请按照以下程序操作。

在您启动恢复之前,您需要将`/var/lib/rancher/agent/rancher2_connection_info.json`从元素节点复制到您可以通过Rancher UI访问的地方。

文件复制完成后,从https://github.com/rancher/elemental[SUSE® Rancher Prime: OS Manager储存库]下载`rancher-agent-token-update.sh`脚本:

wget -q https://raw.githubusercontent.com/rancher/elemental/main/scripts/rancher-agent-token-update && chmod +x rancher-agent-token-update

执行脚本时无需任何额外选项:

./rancher-agent-token-update

恢复成功完成后,将`rancher2_connection_info.json`复制回元素节点的路径`/var/lib/rancher/agent/rancher2_connection_info.json`。最后,重启`rancher-system-agent`服务:

systemctl restart rancher-system-agent