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

kubeadm join fails #83

Closed
hnanni opened this issue Apr 1, 2019 · 3 comments
Closed

kubeadm join fails #83

hnanni opened this issue Apr 1, 2019 · 3 comments

Comments

@hnanni
Copy link

hnanni commented Apr 1, 2019

Changes in 1.14 (https://github.com/kubernetes/kubernetes/pull/69366/files) are meant to change the usage of --cri-socket argument. After seting up the k8s master with the PR #80, in client I'm getting the following errors:

kubeadm join 10.219.128.45:6443 --token ctcivd.d2dwdsi660hkjmrd     --discovery-token-ca-cert-hash sha256:3bf9103c4558c31314846e691ff7136a1b337b6242f338476adca1286f746db2
**Found multiple CRI sockets, please use --cri-socket to select one: /var/run/dockershim.sock, /var/run/crio/crio.sock**
root@kube1 ~ # kubeadm join 10.219.128.45:6443 --token ctcivd.d2dwdsi660hkjmrd     --discovery-token-ca-cert-hash sha256:3bf9103c4558c31314846e691ff7136a1b337b6242f338476adca1286f746db2 -**-cri-socket /var/run/crio/crio.sock**
[preflight] Running pre-flight checks
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
**error execution phase preflight: unable to fetch the kubeadm-config ConfigMap: Found multiple CRI sockets, please use --cri-socket to select one: /var/run/dockershim.sock, /var/run/crio/crio.sock**

root@kube1 ~ # file /var/run/crio/crio.sock /var/run/dockershim.sock
/var/run/crio/crio.sock:  socket
/var/run/dockershim.sock: cannot open `/var/run/dockershim.sock' (No such file or directory)


@hnanni
Copy link
Author

hnanni commented Apr 1, 2019

closed. Docker was confusing kubeadm join

@hnanni hnanni closed this as completed Apr 1, 2019
@grahamwhaley
Copy link

OOI @hnanni - do you remember what the confusion/solution was? I appear to be seeing something similar (multiple CRI sockets) with an upto date system (v31370). It was complaining about having crio and containerd. I nuked containerd, and now it complains about having crio and dockershim

$ ./reset_stack.sh
Found multiple CRI sockets, please use --cri-socket to select one: /var/run/dockershim.sock, /var/run/crio/crio.sock

... [other stuff]

Found multiple CRI sockets, please use --cri-socket to select one: /var/run/dockershim.sock, /var/run/crio/crio.sock
To see the stack trace of this error execute with --v=5 or higher

I'll try dropping docker from my clear installation (if it is present), and see if that fixes it - but, this feels like a niggling annoyance. A side note, it is also quite confusing when the error says please use --cri-socket to select one: /var/run/dockershim.sock, /var/run/crio/crio.sock, it looks like it is saying add that to the reset_stack.sh command line etc., which I know it is not, but that is what I originally tried to do ;-) That is significantly harder to fix - the scripts would probably have to capture stderr/out of the sub-commands and try to annotate the issues more clearly. ho hum.

@CraigSterrett
Copy link
Contributor

Docker comes from containers-basic bundle which is not installed by the cloud-native-setup scripts, so currently reset_stack is only looking for containerd or crio running since those are two options supported by cloud-native-setup. You must have at some point installed containers-basic and then done a systemctl enable docker command. You can just stop docker and disable it
systemctl stop docker
systemctl disable docker
The error message is actually coming from kubadm when Kubelet tries to start it doesn't know which CRI to talk to, and it's just randomly listing docker and crio.

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

3 participants