microk8s: edge version gives error: Failed to start microk8s services

Please run microk8s inspect and attach the generated tarball to this issue.

We appreciate your feedback. Thank you for using microk8s. inspection-report-20210303_194517.tar.gz

Installed a fresh latest/edge version, enablel helm3, rbac, dns, metrics-server and storage. After enabling storage microk8s can not start and says it has problem enabling containerd.

I installed it because i want a newer version of helm3 and this version gives helm3 version 3.5, but it seems it still has problems

After i run the inspect command, dns, rbac and metrics-server wasnt installed but i was able to start microk8s. Now i enabled it again and now it runs without errors

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 20 (9 by maintainers)

Most upvoted comments

I found an even better way to start it. Just clean up the /var/snap/microk8s/common/run/containerd/*. When you stop microk8s, you cannot delete the directories, but you can mv them to some other place. Here are the steps:

  • microk8s stop
  • Move the directories somewhere like this sudo mv /var/snap/microk8s/common/run/containerd/* /tmp
  • Reboot the node
  • microk8s start

I am getting this too on master branch. After stopping MicroK8s gracefully (with several pods), shutting down the system and booting it backup.

Containerd failed to start with this error.

Mar 07 09:12:26 norse microk8s.daemon-containerd[10295]: time="2021-03-07T09:12:26.316469310+08:00" level=info msg="loading plugin \"io.containerd.service.v1.containers-service\"..." type=io.containerd.service.v1
Mar 07 09:12:26 norse microk8s.daemon-containerd[10295]: time="2021-03-07T09:12:26.316491269+08:00" level=info msg="loading plugin \"io.containerd.service.v1.content-service\"..." type=io.containerd.service.v1
Mar 07 09:12:26 norse microk8s.daemon-containerd[10295]: time="2021-03-07T09:12:26.316509704+08:00" level=info msg="loading plugin \"io.containerd.service.v1.diff-service\"..." type=io.containerd.service.v1
Mar 07 09:12:26 norse microk8s.daemon-containerd[10295]: time="2021-03-07T09:12:26.316538975+08:00" level=info msg="loading plugin \"io.containerd.service.v1.images-service\"..." type=io.containerd.service.v1
Mar 07 09:12:26 norse microk8s.daemon-containerd[10295]: time="2021-03-07T09:12:26.316565952+08:00" level=info msg="loading plugin \"io.containerd.service.v1.leases-service\"..." type=io.containerd.service.v1
Mar 07 09:12:26 norse microk8s.daemon-containerd[10295]: time="2021-03-07T09:12:26.316586653+08:00" level=info msg="loading plugin \"io.containerd.service.v1.namespaces-service\"..." type=io.containerd.service.v1
Mar 07 09:12:26 norse microk8s.daemon-containerd[10295]: time="2021-03-07T09:12:26.316607044+08:00" level=info msg="loading plugin \"io.containerd.service.v1.snapshots-service\"..." type=io.containerd.service.v1
Mar 07 09:12:26 norse microk8s.daemon-containerd[10295]: time="2021-03-07T09:12:26.316625931+08:00" level=info msg="loading plugin \"io.containerd.runtime.v1.linux\"..." type=io.containerd.runtime.v1
Mar 07 09:12:26 norse microk8s.daemon-containerd[10295]: time="2021-03-07T09:12:26.316694925+08:00" level=info msg="loading plugin \"io.containerd.runtime.v2.task\"..." type=io.containerd.runtime.v2
Mar 07 09:12:58 norse systemd[1]: snap.microk8s.daemon-containerd.service: State 'stop-sigterm' timed out. Killing.
Mar 07 09:12:58 norse systemd[1]: snap.microk8s.daemon-containerd.service: Killing process 10295 (containerd) with signal SIGKILL.
Mar 07 09:12:58 norse systemd[1]: snap.microk8s.daemon-containerd.service: Main process exited, code=killed, status=9/KILL
Mar 07 09:12:58 norse systemd[1]: snap.microk8s.daemon-containerd.service: Failed with result 'timeout'.
Mar 07 09:12:58 norse systemd[1]: Stopped Service for snap application microk8s.daemon-containerd.

Tried manually starting containerd several times with sudo systemctl start snap.microk8s.daemon-containerd.service

End up getting the same error. Eventually i set the TimeoutSec=0 in the systemd configuration and it eventually came up. The weird thing is, the next time I stop and start (without rebooting), it doesn’t take long enough to start containerd.