k3s: Job for k3s.service failed because the control process exited with error code.

Hello World!

I’m trying to follow Single Master Install, yet running into following issue:

Version:

$ k3s -v
k3s version v0.10.2 (8833bfd9)
$ 
$ curl -sfL https://get.k3s.io | sh -
[INFO]  Finding latest release
[INFO]  Using v0.10.2 as release
[INFO]  Downloading hash https://github.com/rancher/k3s/releases/download/v0.10.2/sha256sum-amd64.txt
[INFO]  Downloading binary https://github.com/rancher/k3s/releases/download/v0.10.2/k3s
[INFO]  Verifying binary download
[INFO]  Installing k3s to /usr/local/bin/k3s
[INFO]  SELinux is enabled, setting permissions
which: no kubectl in (/home/toor/.local/bin:/home/toor/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/var/lib/snapd/snap/bin)
[INFO]  Creating /usr/local/bin/kubectl symlink to k3s
which: no crictl in (/home/toor/.local/bin:/home/toor/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/var/lib/snapd/snap/bin)
[INFO]  Creating /usr/local/bin/crictl symlink to k3s
which: no ctr in (/home/toor/.local/bin:/home/toor/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/var/lib/snapd/snap/bin)
[INFO]  Creating /usr/local/bin/ctr symlink to k3s
[INFO]  Creating killall script /usr/local/bin/k3s-killall.sh
[INFO]  Creating uninstall script /usr/local/bin/k3s-uninstall.sh
[INFO]  env: Creating environment file /etc/systemd/system/k3s.service.env
[INFO]  systemd: Creating service file /etc/systemd/system/k3s.service
[INFO]  systemd: Enabling k3s unit
Created symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service.
[INFO]  systemd: Starting k3s
Job for k3s.service failed because the control process exited with error code.
See "systemctl status k3s.service" and "journalctl -xe" for details.
$ systemctl status k3s.service
● k3s.service - Lightweight Kubernetes
   Loaded: loaded (/etc/systemd/system/k3s.service; enabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2019-11-04 15:03:53 EST; 1s ago
     Docs: https://k3s.io
  Process: 6988 ExecStart=/usr/local/bin/k3s server (code=exited, status=1/FAILURE)
  Process: 6986 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS)
  Process: 6984 ExecStartPre=/sbin/modprobe br_netfilter (code=exited, status=0/SUCCESS)
 Main PID: 6988 (code=exited, status=1/FAILURE)
$ 

tried as root

$ sudo su -
# curl -sfL https://get.k3s.io | sh -
[INFO]  Finding latest release
[INFO]  Using v0.10.2 as release
[INFO]  Downloading hash https://github.com/rancher/k3s/releases/download/v0.10.2/sha256sum-amd64.txt
[INFO]  Skipping binary downloaded, installed k3s matches hash
[INFO]  Skipping /usr/local/bin/kubectl symlink to k3s, already exists
[INFO]  Skipping /usr/local/bin/crictl symlink to k3s, already exists
[INFO]  Skipping /usr/local/bin/ctr symlink to k3s, already exists
[INFO]  Creating killall script /usr/local/bin/k3s-killall.sh
[INFO]  Creating uninstall script /usr/local/bin/k3s-uninstall.sh
[INFO]  env: Creating environment file /etc/systemd/system/k3s.service.env
[INFO]  systemd: Creating service file /etc/systemd/system/k3s.service
[INFO]  systemd: Enabling k3s unit
Created symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service.
[INFO]  No change detected so skipping service start
# systemctl status k3s.service 
● k3s.service - Lightweight Kubernetes
   Loaded: loaded (/etc/systemd/system/k3s.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2019-11-04 15:08:39 EST; 6s ago
     Docs: https://k3s.io
 Main PID: 14686 (code=exited, status=1/FAILURE)

Nov 04 15:08:39 noc.uftwf.local systemd[1]: k3s.service: Service RestartSec=100ms expired, scheduling restart.
Nov 04 15:08:39 noc.uftwf.local systemd[1]: k3s.service: Failed to schedule restart job: Unit k3s.service not found.
Nov 04 15:08:39 noc.uftwf.local systemd[1]: k3s.service: Failed with result 'exit-code'.
# 

My OS:

# cat /etc/redhat-release 
CentOS Linux release 8.0.1905 (Core) 
# uname -a
Linux X.X.X 4.18.0-80.11.2.el8_0.x86_64 rancher/k3s#1 SMP Tue Sep 24 11:32:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
# 

Please advice.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (6 by maintainers)

Most upvoted comments

@shivdeepnv it appears to be hanging connecting to your datastore endpoint. Are you sure that the mysql server is accessible from your k3s node?

going to reopen based on @sonttran’s latest comment so that we can investigate a little more

It looks like there is already another k3s process running… did you start it manually from another session?

actually, it was microk8s, as I mentioned in https://github.com/rancher/k3s/issues/1011#issuecomment-549918957, after running microk8s.stop, k3s.service started without me)