Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

always keeping activating (start) status when install #6208

Closed
zhaoyshine opened this issue Oct 2, 2022 · 4 comments
Closed

always keeping activating (start) status when install #6208

zhaoyshine opened this issue Oct 2, 2022 · 4 comments

Comments

@zhaoyshine
Copy link

zhaoyshine commented Oct 2, 2022

Environmental Info:
K3s Version: v1.24.6+k3s1 (a8e0c66)

Node(s) CPU architecture, OS, and Version: Linux iZ8vb2p0lglgax8bc1dsxxZ 5.4.0-125-generic #141-Ubuntu SMP Wed Aug 10 13:42:03 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Cluster Configuration: 1 server

Describe the bug:

always keeping activating (start) status when install

curl -sfL https://rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn sh -s - --docker

got:

[INFO]  Finding release for channel stable
[INFO]  Using v1.24.6+k3s1 as release
[INFO]  Downloading hash rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/v1.24.6-k3s1/sha256sum-amd64.txt
[INFO]  Downloading binary rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/v1.24.6-k3s1/k3s
[INFO]  Verifying binary download
[INFO]  Installing k3s to /usr/local/bin/k3s
[INFO]  Skipping installation of SELinux RPM
[INFO]  Creating /usr/local/bin/kubectl symlink to k3s
[INFO]  Creating /usr/local/bin/crictl symlink to k3s
[INFO]  Skipping /usr/local/bin/ctr symlink to k3s, command exists in PATH at /usr/bin/ctr
[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 
------------^ block here

systemctl status k3s.service:

● k3s.service - Lightweight Kubernetes
     Loaded: loaded (/etc/systemd/system/k3s.service; enabled; vendor preset: enabled)
     Active: activating (start) since Mon 2022-10-03 03:17:46 CST; 9min ago
       Docs: https://k3s.io
    Process: 16747 ExecStartPre=/bin/sh -xc ! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service (code=exited, status=0/SUCCESS)
    Process: 16749 ExecStartPre=/sbin/modprobe br_netfilter (code=exited, status=0/SUCCESS)
    Process: 16754 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS)
   Main PID: 16761 (k3s-server)
      Tasks: 8
     Memory: 354.3M
     CGroup: /system.slice/k3s.service
             └─16761 /usr/local/bin/k3s server

sudo journalctl -u k3s.service:
QQ20221003-033234

Steps To Reproduce:

Expected behavior:

start success

Actual behavior:

QQ20221003-033435
tried installing many times, all block here, total more than 30 min

Additional context / logs:

@brandond
Copy link
Contributor

brandond commented Oct 3, 2022

I can't copy-paste the specific log entry because you uploaded a screenshot instead of text, but it appears that etcd is hanging with a db file is flocked by another process, or taking too long error. What kind of storage are you running on?

It also appears that you're running the install script on a node that was already running K3s using embedded etcd. Are you sure that the previous installation of K3s was cleaned up properly? Did you still want to use etcd?

@zhaoyshine
Copy link
Author

Hi @brandond, thank you for your reply, doesn't k3s use Sqlite as storage by default? I am a Single server. I have no requirements on what storage to use. I just want to run normally first, please give me any suggestions, thanks!!

@brandond
Copy link
Contributor

brandond commented Oct 4, 2022

Kine/sqlite is the default, but your logs show that there are configuration and database files left over from a previous installation of k3s that used embedded etcd. Please run the uninstall script before installing again if you want a clean start.

@zhaoyshine
Copy link
Author

zhaoyshine commented Oct 4, 2022

@brandond thank you very much!
it is caused by the database, I can run successfully after specifying K3S_DATASTORE_ENDPOINT when installing

curl -sfL https://rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn K3S_DATASTORE_ENDPOINT="postgres://xxx:xxx@localhost:5432/k3s" sh -s - server --docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants