使用rancher2.7.9通过代理访问外网安装k8s集群报错

Rancher Server 设置

  • Rancher 版本:2.7.9
  • 安装选项 (Docker install/Helm Chart):
    • 如果是 Helm Chart 安装,需要提供 Local 集群的类型(RKE1, RKE2, k3s, EKS, 等)和版本:RKE2
  • 在线或离线部署:在线(通过另一台机器代理访问互联网)

**主机操作系统:Centos7.9 (内核版本 5.4.260-1.el7.elrepo.x86_64)

问题描述:

configuring bootstrap node(s) custom-49ffd3eab7df: error applying plan – check rancher-system-agent.service logs on node for more information, waiting for agent to check in and apply initial plan

截图:

[/details]

可以到目标主机使用 journalctl -xef -u rancher-system-agent.service 查看下错误日志

使用 journalctl -xef -u rancher-system-agent.service 查看下错误日志如下,但不知道怎么解决:

-- Logs begin at 三 2023-11-22 16:20:26 CST. --
11月 24 08:25:44 dev01 systemd[1]: rancher-system-agent.service holdoff time over, scheduling restart.
11月 24 08:25:44 dev01 systemd[1]: Stopped Rancher System Agent.
-- Subject: Unit rancher-system-agent.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rancher-system-agent.service has finished shutting down.
11月 24 08:25:44 dev01 systemd[1]: Started Rancher System Agent.
-- Subject: Unit rancher-system-agent.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rancher-system-agent.service has finished starting up.
-- 
-- The start-up result is done.
11月 24 08:25:44 dev01 rancher-system-agent[605878]: time="2023-11-24T08:25:44+08:00" level=info msg="Rancher System Agent version v0.3.3 (9e827a5) is starting"
11月 24 08:25:44 dev01 rancher-system-agent[605878]: time="2023-11-24T08:25:44+08:00" level=info msg="Using directory /var/lib/rancher/agent/work for work"
11月 24 08:25:44 dev01 rancher-system-agent[605878]: time="2023-11-24T08:25:44+08:00" level=info msg="Starting remote watch of plans"
11月 24 08:25:44 dev01 rancher-system-agent[605878]: time="2023-11-24T08:25:44+08:00" level=fatal msg="Fatal error running: unable to parse connection info file: error gathering file information for file /var/lib/rancher/agent/rancher2_connection_info.json: stat /var/lib/rancher/agent/rancher2_connection_info.json: no such file or directory"
11月 24 08:25:44 dev01 systemd[1]: rancher-system-agent.service: main process exited, code=exited, status=1/FAILURE
11月 24 08:25:44 dev01 systemd[1]: Unit rancher-system-agent.service entered failed state.
11月 24 08:25:44 dev01 systemd[1]: rancher-system-agent.service failed.
11月 24 08:25:49 dev01 systemd[1]: rancher-system-agent.service holdoff time over, scheduling restart.
11月 24 08:25:49 dev01 systemd[1]: Stopped Rancher System Agent.
-- Subject: Unit rancher-system-agent.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rancher-system-agent.service has finished shutting down.
11月 24 08:25:49 dev01 systemd[1]: Started Rancher System Agent.
-- Subject: Unit rancher-system-agent.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rancher-system-agent.service has finished starting up.
-- 
-- The start-up result is done.
11月 24 08:25:49 dev01 rancher-system-agent[605895]: time="2023-11-24T08:25:49+08:00" level=info msg="Rancher System Agent version v0.3.3 (9e827a5) is starting"
11月 24 08:25:49 dev01 rancher-system-agent[605895]: time="2023-11-24T08:25:49+08:00" level=info msg="Using directory /var/lib/rancher/agent/work for work"
11月 24 08:25:49 dev01 rancher-system-agent[605895]: time="2023-11-24T08:25:49+08:00" level=info msg="Starting remote watch of plans"
11月 24 08:25:49 dev01 rancher-system-agent[605895]: time="2023-11-24T08:25:49+08:00" level=fatal msg="Fatal error running: unable to parse connection info file: error gathering file information for file /var/lib/rancher/agent/rancher2_connection_info.json: stat /var/lib/rancher/agent/rancher2_connection_info.json: no such file or directory"
11月 24 08:25:49 dev01 systemd[1]: rancher-system-agent.service: main process exited, code=exited, status=1/FAILURE
11月 24 08:25:49 dev01 systemd[1]: Unit rancher-system-agent.service entered failed state.
11月 24 08:25:49 dev01 systemd[1]: rancher-system-agent.service failed.
11月 24 08:25:54 dev01 systemd[1]: rancher-system-agent.service holdoff time over, scheduling restart.
11月 24 08:25:54 dev01 systemd[1]: Stopped Rancher System Agent.
-- Subject: Unit rancher-system-agent.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rancher-system-agent.service has finished shutting down.
11月 24 08:25:54 dev01 systemd[1]: Started Rancher System Agent.
-- Subject: Unit rancher-system-agent.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rancher-system-agent.service has finished starting up.
-- 
-- The start-up result is done.
11月 24 08:25:54 dev01 rancher-system-agent[605908]: time="2023-11-24T08:25:54+08:00" level=info msg="Rancher System Agent version v0.3.3 (9e827a5) is starting"
11月 24 08:25:54 dev01 rancher-system-agent[605908]: time="2023-11-24T08:25:54+08:00" level=info msg="Using directory /var/lib/rancher/agent/work for work"
11月 24 08:25:54 dev01 rancher-system-agent[605908]: time="2023-11-24T08:25:54+08:00" level=info msg="Starting remote watch of plans"
11月 24 08:25:54 dev01 rancher-system-agent[605908]: time="2023-11-24T08:25:54+08:00" level=fatal msg="Fatal error running: unable to parse connection info file: error gathering file information for file /var/lib/rancher/agent/rancher2_connection_info.json: stat /var/lib/rancher/agent/rancher2_connection_info.json: no such file or directory"
11月 24 08:25:54 dev01 systemd[1]: rancher-system-agent.service: main process exited, code=exited, status=1/FAILURE
11月 24 08:25:54 dev01 systemd[1]: Unit rancher-system-agent.service entered failed state.
11月 24 08:25:54 dev01 systemd[1]: rancher-system-agent.service failed.
11月 24 08:25:59 dev01 systemd[1]: rancher-system-agent.service holdoff time over, scheduling restart.
11月 24 08:25:59 dev01 systemd[1]: Stopped Rancher System Agent.
-- Subject: Unit rancher-system-agent.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rancher-system-agent.service has finished shutting down.
11月 24 08:25:59 dev01 systemd[1]: Started Rancher System Agent.
-- Subject: Unit rancher-system-agent.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rancher-system-agent.service has finished starting up.
-- 
-- The start-up result is done.
11月 24 08:25:59 dev01 rancher-system-agent[605927]: time="2023-11-24T08:25:59+08:00" level=info msg="Rancher System Agent version v0.3.3 (9e827a5) is starting"
11月 24 08:25:59 dev01 rancher-system-agent[605927]: time="2023-11-24T08:25:59+08:00" level=info msg="Using directory /var/lib/rancher/agent/work for work"
11月 24 08:25:59 dev01 rancher-system-agent[605927]: time="2023-11-24T08:25:59+08:00" level=info msg="Starting remote watch of plans"
11月 24 08:25:59 dev01 rancher-system-agent[605927]: time="2023-11-24T08:25:59+08:00" level=fatal msg="Fatal error running: unable to parse connection info file: error gathering file information for file /var/lib/rancher/agent/rancher2_connection_info.json: stat /var/lib/rancher/agent/rancher2_connection_info.json: no such file or directory"
11月 24 08:25:59 dev01 systemd[1]: rancher-system-agent.service: main process exited, code=exited, status=1/FAILURE
11月 24 08:25:59 dev01 systemd[1]: Unit rancher-system-agent.service entered failed state.
11月 24 08:25:59 dev01 systemd[1]: rancher-system-agent.service failed.
11月 24 08:26:04 dev01 systemd[1]: rancher-system-agent.service holdoff time over, scheduling restart.
11月 24 08:26:04 dev01 systemd[1]: Stopped Rancher System Agent.
-- Subject: Unit rancher-system-agent.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rancher-system-agent.service has finished shutting down.
11月 24 08:26:04 dev01 systemd[1]: Started Rancher System Agent.
-- Subject: Unit rancher-system-agent.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rancher-system-agent.service has finished starting up.
-- 
-- The start-up result is done.
11月 24 08:26:04 dev01 rancher-system-agent[605935]: time="2023-11-24T08:26:04+08:00" level=info msg="Rancher System Agent version v0.3.3 (9e827a5) is starting"
11月 24 08:26:04 dev01 rancher-system-agent[605935]: time="2023-11-24T08:26:04+08:00" level=info msg="Using directory /var/lib/rancher/agent/work for work"
11月 24 08:26:04 dev01 rancher-system-agent[605935]: time="2023-11-24T08:26:04+08:00" level=info msg="Starting remote watch of plans"
11月 24 08:26:04 dev01 rancher-system-agent[605935]: time="2023-11-24T08:26:04+08:00" level=fatal msg="Fatal error running: unable to parse connection info file: error gathering file information for file /var/lib/rancher/agent/rancher2_connection_info.json: stat /var/lib/rancher/agent/rancher2_connection_info.json: no such file or directory"
11月 24 08:26:04 dev01 systemd[1]: rancher-system-agent.service: main process exited, code=exited, status=1/FAILURE
11月 24 08:26:04 dev01 systemd[1]: Unit rancher-system-agent.service entered failed state.
11月 24 08:26:04 dev01 systemd[1]: rancher-system-agent.service failed.
11月 24 08:26:09 dev01 systemd[1]: rancher-system-agent.service holdoff time over, scheduling restart.
11月 24 08:26:09 dev01 systemd[1]: Stopped Rancher System Agent.
-- Subject: Unit rancher-system-agent.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rancher-system-agent.service has finished shutting down.
11月 24 08:26:09 dev01 systemd[1]: Started Rancher System Agent.
-- Subject: Unit rancher-system-agent.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rancher-system-agent.service has finished starting up.
-- 
-- The start-up result is done.

2.7.9 custom RKE2 不支持 CentOS 7.9,可以查看官方的支持矩阵