K3s cannot start after reboot

After install k3s and Rancher, It worked fine. But when I reboot server, k3s.service cannot started.
I’m not sure, is it something wrong that’s seem k3s linked to kubectl command? My k3s version is v1.24.10+k3s1.

Below is session log for investigate:

systemctl start k3s

Job for k3s.service failed because the control process exited with error code.
See “systemctl status k3s.service” and “journalctl -xeu k3s.service” for details.

journalctl -xeu k3s.service

░░ Automatic restarting of the unit k3s.service has been scheduled, as the result for
░░ the configured Restart= setting for the unit.
Aug 13 13:50:50 ubuntu22-rancher1 systemd[1]: Stopped Lightweight Kubernetes.
░░ Subject: A stop job for unit k3s.service has finished
░░ Defined-By: systemd
░░ Support: Enterprise open source support | Ubuntu
░░
░░ A stop job for unit k3s.service has finished.
░░
░░ The job identifier is 60314 and the job result is done.
Aug 13 13:50:50 ubuntu22-rancher1 systemd[1]: Starting Lightweight Kubernetes…
░░ Subject: A start job for unit k3s.service has begun execution
░░ Defined-By: systemd
░░ Support: Enterprise open source support | Ubuntu
░░
░░ A start job for unit k3s.service has begun execution.
░░
░░ The job identifier is 60314.
Aug 13 13:50:51 ubuntu22-rancher1 k3s[6971]: error: unknown command “server” for “kubectl”
Aug 13 13:50:51 ubuntu22-rancher1 systemd[1]: k3s.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: Enterprise open source support | Ubuntu
░░
░░ An ExecStart= process belonging to unit k3s.service has exited.
░░
░░ The process’ exit code is ‘exited’ and its exit status is 1.
Aug 13 13:50:51 ubuntu22-rancher1 systemd[1]: k3s.service: Failed with result ‘exit-code’.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: Enterprise open source support | Ubuntu
░░
░░ The unit k3s.service has entered the ‘failed’ state with result ‘exit-code’.
Aug 13 13:50:51 ubuntu22-rancher1 systemd[1]: Failed to start Lightweight Kubernetes.
░░ Subject: A start job for unit k3s.service has failed
░░ Defined-By: systemd
░░ Support: Enterprise open source support | Ubuntu
░░
░░ A start job for unit k3s.service has finished with a failure.
░░
░░ The job identifier is 60314 and the job result is failed.

kubectl version

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:“27”, GitVersion:“v1.27.4”, GitCommit:“fa3d7990104d7c1f16943a67f11b154b71f6a132”, GitTreeState:“clean”, BuildDate:“2023-07-19T12:20:54Z”, GoVersion:“go1.20.6”, Compiler:“gc”, Platform:“linux/amd64”}
Kustomize Version: v5.0.1
The connection to the server 127.0.0.1:6443 was refused - did you specify the right host or port?

@TWatt Hi, not an Ubuntu user, but did you check the logs (journalctl?) for the reason the k3s service is not starting, it’s usually pretty good at reporting there what the issue is?

It seems problem has been solved.

As mentioned about kubectl vs k3s command issue:
Aug 13 13:50:51 ubuntu22-rancher1 k3s[6971]: error: unknown command “server” for “kubectl”

As I inspected kubectl and k3s are same size (They are same file!?) I don’t knows root cause

But resolved by re-run curl to get k3s binary file again (curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.24.10+k3s1 sh -s - server)
I removed out of --cluster-init option because I need to used existing cluster, run systemctl start k3s again, and then it back to normal.

Still have issue with this? Lee me know so i can check this. Thanks