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

sealer run cluster failed #953

Closed
lusains opened this issue Dec 21, 2021 · 5 comments
Closed

sealer run cluster failed #953

lusains opened this issue Dec 21, 2021 · 5 comments
Labels
kind/bug Something isn't working

Comments

@lusains
Copy link

lusains commented Dec 21, 2021

What happened:

sealer run cluster, 1 master,join failed

Here is the install log
2021-12-22 02:52:03 [DEBG] [runtime.go:107] join masters: [10.255.237.200]
2021-12-22 02:52:06 [EROR] [masters.go:319] exec remote cmd failed, kubeadm init phase upload-certs --upload-certs -v 6 [ssh][10.255.237.200]run command failed [kubeadm init phase upload-certs --upload-certs -v 6]
2021-12-22 02:52:06 [DEBG] [masters.go:489] [globals]decodeCertCmd: I1222 02:48:04.537272 41222 initconfiguration.go:103] detected and using CRI socket: /var/run/dockershim.sock
I1222 02:48:04.537577 41222 interface.go:400] Looking for default routes with IPv4 addresses
I1222 02:48:04.537591 41222 interface.go:405] Default route transits interface "ens192"
I1222 02:48:04.538203 41222 interface.go:208] Interface ens192 is up
I1222 02:48:04.538302 41222 interface.go:256] Interface "ens192" has 2 addresses :[10.255.237.200/27 fe80::250:56ff:fe80:4d9d/64].
I1222 02:48:04.538333 41222 interface.go:223] Checking addr 10.255.237.200/27.
I1222 02:48:04.538344 41222 interface.go:230] IP found 10.255.237.200
I1222 02:48:04.538351 41222 interface.go:262] Found valid IPv4 address 10.255.237.200 for interface "ens192".
I1222 02:48:04.538362 41222 interface.go:411] Found active IP 10.255.237.200

2021-12-22 02:53:46 [WARN] [filesystem.go:70] failed to unmount dir /var/lib/sealer/data/my-cluster/mount,err: retry action timeout: device or resource busy
Error: get certifacate key failed [I1222 02:48:04.537272 41222 initconfiguration.go:103] detected and using CRI socket: /var/run/dockershim.sock
I1222 02:48:04.537577 41222 interface.go:400] Looking for default routes with IPv4 addresses
I1222 02:48:04.537591 41222 interface.go:405] Default route transits interface "ens192"
I1222 02:48:04.538203 41222 interface.go:208] Interface ens192 is up
I1222 02:48:04.538302 41222 interface.go:256] Interface "ens192" has 2 addresses :[10.255.237.200/27 fe80::250:56ff:fe80:4d9d/64].
I1222 02:48:04.538333 41222 interface.go:223] Checking addr 10.255.237.200/27.
I1222 02:48:04.538344 41222 interface.go:230] IP found 10.255.237.200
I1222 02:48:04.538351 41222 interface.go:262] Found valid IPv4 address 10.255.237.200 for interface "ens192".
I1222 02:48:04.538362 41222 interface.go:411] Found active IP 10.255.237.200
I1222 02:48:04.613854 41222 version.go:186] fetching Kubernetes version from URL: https://dl.k8s.io/release/stable-1.txt
I1222 02:48:05.698318 41222 version.go:255] remote version is much newer: v1.23.1; falling back to: stable-1.19
I1222 02:48:05.698488 41222 version.go:186] fetching Kubernetes version from URL: https://dl.k8s.io/release/stable-1.19.txt
W1222 02:48:06.735152 41222 configset.go:348] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
open /etc/kubernetes/admin.conf: no such file or directory
failed to load admin kubeconfig

Environment:

  • sealer version : {"gitVersion":"v0.5.2","gitCommit":"858ece9","buildDate":"2021-12-13 03:22:26","goVersion":"go1.14.15","compiler":"gc","platform":"linux/amd64"}
  • sealer md5: 433c15d20b63aee22b5a50660e04efe0 sealer-latest.tar.gz
  • kubernetes images: registry.cn-qingdao.aliyuncs.com/sealer-io/kubernetes:v1.19.8 774.05MB
  • linux info : Linux loaclhost 4.18.0-240.el8.x86_64 fix: ci lint for mod registry and image #1 SMP Fri Sep 25 19:48:47 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux | CentOS Linux release 8.3.2011
  • vmware : vmware vSphere Client 6.7.0.47000
@lusains lusains added the kind/bug Something isn't working label Dec 21, 2021
@lusains
Copy link
Author

lusains commented Dec 21, 2021

-- install without -d
2021-12-22 04:39:09 [INFO] [sshcmd.go:52] [ssh][10.255.237.200] : echo 10.255.237.200 apiserver.cluster.local >> /etc/hosts
2021-12-22 04:39:09 [INFO] [sshcmd.go:52] [ssh][10.255.237.200] : echo 10.255.237.200 sea.hub >> /etc/hosts
2021-12-22 04:39:09 [INFO] [init.go:193] start to init master0...
2021-12-22 04:39:54 [INFO] [init.go:198] W1222 04:35:09.587655 54981 configset.go:348] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
[init] Using Kubernetes version: v1.19.8
[preflight] Running pre-flight checks
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
[WARNING FileExisting-socat]: socat not found in system path
[WARNING FileExisting-tc]: tc not found in system path
[WARNING Hostname]: hostname "loaclhost" could not be reached
[WARNING Hostname]: hostname "loaclhost": lookup loaclhost on 223.5.5.5:53: no such host
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
[certs] Using certificateDir folder "/etc/kubernetes/pki"
error execution phase certs/ca: failure loading ca certificate: failed to load certificate: the certificate is not valid yet
To see the stack trace of this error execute with --v=5 or higher

Error: failed to init master0 init master0 failed, error: [ssh][10.255.237.200]run command failed [kubeadm init --config=/var/lib/sealer/data/my-cluster/rootfs/kubeadm-config.yaml --upload-certs -v 0 --ignore-preflight-errors=SystemVerification]. Please clean and reinstall

@fanux
Copy link
Collaborator

fanux commented Dec 22, 2021

@bxy4543 test apply if the network interface name is ens192 (not config the name in Clustefile). Seems network interface discover has some bug.

@bxy4543
Copy link
Member

bxy4543 commented Dec 22, 2021

It looks like kubeadm init failed, show this file /var/lib/sealer/data/my-cluster/rootfs/kubeadm-config.yaml. @lusains

@fanux fanux closed this as completed Jan 24, 2022
@summer908
Copy link

@fanux [ERROR] [root.go:75] sealer-v0.9.2: failed to init master0: failed to execute command(kubeadm init --config=/etc/kubernetes/kubeadm.yaml --upload-certs -v 0 --ignore-preflight-errors=SystemVerification,Port-10250,DirAvailable--etc-kubernetes-manifests) on host(10.10.5.12): error(W1103 16:04:31.222037 298667 strict.go:54] error unmarshaling configuration schema.GroupVersionKind{Group:"kubelet.config.k8s.io", Version:"v1beta1", Kind:"KubeletConfiguration"}: error unmarshaling JSON: while decoding JSON: json: unknown field "flushFrequency"
W1103 16:04:31.227733 298667 utils.go:69] The recommended value for "clusterDNS" in "KubeletConfiguration" is: [10.96.0.10]; the provided value is: [169.254.20.10 10.96.0.10]
W1103 16:04:31.227766 298667 utils.go:69] The recommended value for "readOnlyPort" in "KubeletConfiguration" is: 0; the provided value is: 10255
[WARNING Hostname]: hostname "master01" could not be reached
[WARNING Hostname]: hostname "master01": lookup master01 on [::1]:53: read udp [::1]:48904->[::1]:53: read: connection refused
W1103 16:04:54.229578 298667 kubeconfig.go:246] a kubeconfig file "/etc/kubernetes/controller-manager.conf" exists already but has an unexpected API Server URL: expected: https://10.10.5.12:6443/, got: https://apiserver.cluster.local:6443/
W1103 16:04:54.361969 298667 kubeconfig.go:246] a kubeconfig file "/etc/kubernetes/scheduler.conf" exists already but has an unexpected API Server URL: expected: https://10.10.5.12:6443/, got: https://apiserver.cluster.local:6443/
error execution phase upload-config/kubelet: Error writing Crisocket information for the control-plane node: timed out waiting for the condition
To see the stack trace of this error execute with --v=5 or higher
). Please clean and reinstall

@summer908
Copy link

#2315 can you help me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants