kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.22k stars 4.87k forks source link

minikube start --driver=none fails #14937

Closed Debajyoti1 closed 2 years ago

Debajyoti1 commented 2 years ago

What Happened?

I used to use minikube with driver=none and it was working fine until kubernetes stopped shipping docckershim. Now I build and installed cri-dockered and placed properly in order to run minikube. But getting this error.

OS-> Ubuntu 22.04 Docker -> apt install docker.io Kubectl -> Downloaded and installed

Attach the log file

*

stderr: I0910 19:20:26.131398 1964 exec_runner.go:51] Run: sudo systemctl is-active --quiet service kubelet I0910 19:20:26.141651 1964 fix.go:103] recreateIfNeeded on minikube: state=Stopped err= W0910 19:20:26.141667 1964 fix.go:129] unexpected machine state, will restart: I0910 19:20:26.144134 1964 out.go:177] ๐Ÿ”„ Restarting existing none bare metal machine for "minikube" ... I0910 19:20:26.147007 1964 profile.go:148] Saving config to /root/.minikube/profiles/minikube/config.json ... I0910 19:20:26.147432 1964 start.go:307] post-start starting for "minikube" (driver="none") I0910 19:20:26.147464 1964 start.go:335] creating required directories: [/etc/kubernetes/addons /etc/kubernetes/manifests /var/tmp/minikube /var/lib/minikube /var/lib/minikube/certs /var/lib/minikube/images /var/lib/minikube/binaries /tmp/gvisor /usr/share/ca-certificates /etc/ssl/certs] I0910 19:20:26.147499 1964 exec_runner.go:51] Run: sudo mkdir -p /etc/kubernetes/addons /etc/kubernetes/manifests /var/tmp/minikube /var/lib/minikube /var/lib/minikube/certs /var/lib/minikube/images /var/lib/minikube/binaries /tmp/gvisor /usr/share/ca-certificates /etc/ssl/certs I0910 19:20:26.155297 1964 main.go:134] libmachine: Couldn't set key VERSION_CODENAME, no corresponding struct field found I0910 19:20:26.155321 1964 main.go:134] libmachine: Couldn't set key PRIVACY_POLICY_URL, no corresponding struct field found I0910 19:20:26.155330 1964 main.go:134] libmachine: Couldn't set key UBUNTU_CODENAME, no corresponding struct field found I0910 19:20:26.157801 1964 out.go:177] โ„น๏ธ OS release is Ubuntu 22.04.1 LTS I0910 19:20:26.159498 1964 filesync.go:126] Scanning /root/.minikube/addons for local assets ... I0910 19:20:26.159555 1964 filesync.go:126] Scanning /root/.minikube/files for local assets ... I0910 19:20:26.159570 1964 start.go:310] post-start completed in 12.131202ms I0910 19:20:26.159662 1964 fix.go:57] fixHost completed within 45.600647ms I0910 19:20:26.159667 1964 start.go:82] releasing machines lock for "minikube", held for 45.716207ms I0910 19:20:26.160032 1964 exec_runner.go:51] Run: /bin/bash -c "sudo mkdir -p /etc && printf %!s(MISSING) "runtime-endpoint: unix:///var/run/cri-dockerd.sock image-endpoint: unix:///var/run/cri-dockerd.sock " | sudo tee /etc/crictl.yaml" I0910 19:20:26.160083 1964 exec_runner.go:51] Run: curl -sS -m 2 https://k8s.gcr.io/ I0910 19:20:26.178101 1964 exec_runner.go:51] Run: sudo systemctl unmask docker.service I0910 19:20:26.423924 1964 exec_runner.go:51] Run: sudo systemctl enable docker.socket I0910 19:20:26.668504 1964 exec_runner.go:51] Run: sudo systemctl daemon-reload I0910 19:20:26.876089 1964 exec_runner.go:51] Run: sudo systemctl restart docker I0910 19:20:27.165503 1964 exec_runner.go:51] Run: sudo systemctl enable cri-docker.socket I0910 19:20:27.408106 1964 exec_runner.go:51] Run: sudo systemctl daemon-reload I0910 19:20:27.632612 1964 exec_runner.go:51] Run: sudo systemctl start cri-docker.socket I0910 19:20:27.643691 1964 start.go:450] Will wait 60s for socket path /var/run/cri-dockerd.sock I0910 19:20:27.643735 1964 exec_runner.go:51] Run: stat /var/run/cri-dockerd.sock I0910 19:20:27.644933 1964 start.go:471] Will wait 60s for crictl version I0910 19:20:27.644963 1964 exec_runner.go:51] Run: sudo crictl version I0910 19:20:27.693814 1964 retry.go:31] will retry after 11.04660288s: Temporary Error: sudo crictl version: exit status 1 stdout:

stderr: Usage: cri-dockerd [flags]

Flags: --buildinfo Prints the build information about cri-dockerd --cni-bin-dir string A comma-separated list of full paths of directories in which to search for CNI plugin binaries. (default "/opt/cni/bin") --cni-cache-dir string The full path of the directory in which CNI should store cache files. (default "/var/lib/cni/cache") --cni-conf-dir string The full path of the directory in which to search for CNI config files (default "/etc/cni/net.d") --container-runtime-endpoint string The endpoint of backend runtime service. Currently unix socket and tcp endpoints are supported on Linux, while npipe and tcp endpoints are supported on windows. Examples:'unix:///var/run/cri-dockerd.sock', 'npipe:////./pipe/cri-dockerd' (default "unix:///var/run/cri-dockerd.sock") --cri-dockerd-root-directory string Path to the cri-dockerd root directory. (default "/var/lib/cri-dockerd") --docker-endpoint string Use this for the docker endpoint to communicate with. (default "unix:///var/run/docker.sock") --hairpin-mode HairpinMode The mode of hairpin to use. (default none) -h, --help Help for cri-dockerd --image-pull-progress-deadline duration If no pulling progress is made before this deadline, the image pulling will be cancelled. (default 1m0s) --ipv6-dual-stack Enable IPv6 dual stack support --log-level string The log level for cri-docker (default "info") --network-plugin string The name of the network plugin to be invoked for various events in kubelet/pod lifecycle. (default "cni") --network-plugin-mtu int32 The MTU to be passed to the network plugin, to override the default. Set to 0 to use the default 1460 MTU. --pod-cidr string The CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the master. For IPv6, the maximum number of IP's allocated is 65536 --pod-infra-container-image string The image whose network/ipc namespaces containers in each pod will use (default "k8s.gcr.io/pause:3.6") --runtime-cgroups string Optional absolute name of cgroups to create and run the runtime in. --runtime-request-timeout duration If no runtime progress is made before this deadline, the operation will be cancelled. --streaming-bind-addr string The address to bind the CRI streaming server to. If not specified, it will bind to all addresses. --version Prints the version of cri-dockerd time="2022-09-10T19:20:27Z" level=fatal msg="Unknown command: version" I0910 19:20:38.742315 1964 exec_runner.go:51] Run: sudo crictl version I0910 19:20:38.791828 1964 retry.go:31] will retry after 21.607636321s: Temporary Error: sudo crictl version: exit status 1 stdout:

stderr: Usage: cri-dockerd [flags]

Flags: --buildinfo Prints the build information about cri-dockerd --cni-bin-dir string A comma-separated list of full paths of directories in which to search for CNI plugin binaries. (default "/opt/cni/bin") --cni-cache-dir string The full path of the directory in which CNI should store cache files. (default "/var/lib/cni/cache") --cni-conf-dir string The full path of the directory in which to search for CNI config files (default "/etc/cni/net.d") --container-runtime-endpoint string The endpoint of backend runtime service. Currently unix socket and tcp endpoints are supported on Linux, while npipe and tcp endpoints are supported on windows. Examples:'unix:///var/run/cri-dockerd.sock', 'npipe:////./pipe/cri-dockerd' (default "unix:///var/run/cri-dockerd.sock") --cri-dockerd-root-directory string Path to the cri-dockerd root directory. (default "/var/lib/cri-dockerd") --docker-endpoint string Use this for the docker endpoint to communicate with. (default "unix:///var/run/docker.sock") --hairpin-mode HairpinMode The mode of hairpin to use. (default none) -h, --help Help for cri-dockerd --image-pull-progress-deadline duration If no pulling progress is made before this deadline, the image pulling will be cancelled. (default 1m0s) --ipv6-dual-stack Enable IPv6 dual stack support --log-level string The log level for cri-docker (default "info") --network-plugin string The name of the network plugin to be invoked for various events in kubelet/pod lifecycle. (default "cni") --network-plugin-mtu int32 The MTU to be passed to the network plugin, to override the default. Set to 0 to use the default 1460 MTU. --pod-cidr string The CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the master. For IPv6, the maximum number of IP's allocated is 65536 --pod-infra-container-image string The image whose network/ipc namespaces containers in each pod will use (default "k8s.gcr.io/pause:3.6") --runtime-cgroups string Optional absolute name of cgroups to create and run the runtime in. --runtime-request-timeout duration If no runtime progress is made before this deadline, the operation will be cancelled. --streaming-bind-addr string The address to bind the CRI streaming server to. If not specified, it will bind to all addresses. --version Prints the version of cri-dockerd time="2022-09-10T19:20:38Z" level=fatal msg="Unknown command: version" I0910 19:21:00.403113 1964 exec_runner.go:51] Run: sudo crictl version I0910 19:21:00.451994 1964 retry.go:31] will retry after 26.202601198s: Temporary Error: sudo crictl version: exit status 1 stdout:

stderr: Usage: cri-dockerd [flags]

Flags: --buildinfo Prints the build information about cri-dockerd --cni-bin-dir string A comma-separated list of full paths of directories in which to search for CNI plugin binaries. (default "/opt/cni/bin") --cni-cache-dir string The full path of the directory in which CNI should store cache files. (default "/var/lib/cni/cache") --cni-conf-dir string The full path of the directory in which to search for CNI config files (default "/etc/cni/net.d") --container-runtime-endpoint string The endpoint of backend runtime service. Currently unix socket and tcp endpoints are supported on Linux, while npipe and tcp endpoints are supported on windows. Examples:'unix:///var/run/cri-dockerd.sock', 'npipe:////./pipe/cri-dockerd' (default "unix:///var/run/cri-dockerd.sock") --cri-dockerd-root-directory string Path to the cri-dockerd root directory. (default "/var/lib/cri-dockerd") --docker-endpoint string Use this for the docker endpoint to communicate with. (default "unix:///var/run/docker.sock") --hairpin-mode HairpinMode The mode of hairpin to use. (default none) -h, --help Help for cri-dockerd --image-pull-progress-deadline duration If no pulling progress is made before this deadline, the image pulling will be cancelled. (default 1m0s) --ipv6-dual-stack Enable IPv6 dual stack support --log-level string The log level for cri-docker (default "info") --network-plugin string The name of the network plugin to be invoked for various events in kubelet/pod lifecycle. (default "cni") --network-plugin-mtu int32 The MTU to be passed to the network plugin, to override the default. Set to 0 to use the default 1460 MTU. --pod-cidr string The CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the master. For IPv6, the maximum number of IP's allocated is 65536 --pod-infra-container-image string The image whose network/ipc namespaces containers in each pod will use (default "k8s.gcr.io/pause:3.6") --runtime-cgroups string Optional absolute name of cgroups to create and run the runtime in. --runtime-request-timeout duration If no runtime progress is made before this deadline, the operation will be cancelled. --streaming-bind-addr string The address to bind the CRI streaming server to. If not specified, it will bind to all addresses. --version Prints the version of cri-dockerd time="2022-09-10T19:21:00Z" level=fatal msg="Unknown command: version" I0910 19:21:26.655552 1964 exec_runner.go:51] Run: sudo crictl version I0910 19:21:26.707201 1964 out.go:177] W0910 19:21:26.709258 1964 out.go:239] โŒ Exiting due to RUNTIME_ENABLE: Temporary Error: sudo crictl version: exit status 1 stdout:

stderr: Usage: cri-dockerd [flags]

Flags: --buildinfo Prints the build information about cri-dockerd --cni-bin-dir string A comma-separated list of full paths of directories in which to search for CNI plugin binaries. (default "/opt/cni/bin") --cni-cache-dir string The full path of the directory in which CNI should store cache files. (default "/var/lib/cni/cache") --cni-conf-dir string The full path of the directory in which to search for CNI config files (default "/etc/cni/net.d") --container-runtime-endpoint string The endpoint of backend runtime service. Currently unix socket and tcp endpoints are supported on Linux, while npipe and tcp endpoints are supported on windows. Examples:'unix:///var/run/cri-dockerd.sock', 'npipe:////./pipe/cri-dockerd' (default "unix:///var/run/cri-dockerd.sock") --cri-dockerd-root-directory string Path to the cri-dockerd root directory. (default "/var/lib/cri-dockerd") --docker-endpoint string Use this for the docker endpoint to communicate with. (default "unix:///var/run/docker.sock") --hairpin-mode HairpinMode The mode of hairpin to use. (default none) -h, --help Help for cri-dockerd --image-pull-progress-deadline duration If no pulling progress is made before this deadline, the image pulling will be cancelled. (default 1m0s) --ipv6-dual-stack Enable IPv6 dual stack support --log-level string The log level for cri-docker (default "info") --network-plugin string The name of the network plugin to be invoked for various events in kubelet/pod lifecycle. (default "cni") --network-plugin-mtu int32 The MTU to be passed to the network plugin, to override the default. Set to 0 to use the default 1460 MTU. --pod-cidr string The CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the master. For IPv6, the maximum number of IP's allocated is 65536 --pod-infra-container-image string The image whose network/ipc namespaces containers in each pod will use (default "k8s.gcr.io/pause:3.6") --runtime-cgroups string Optional absolute name of cgroups to create and run the runtime in. --runtime-request-timeout duration If no runtime progress is made before this deadline, the operation will be cancelled. --streaming-bind-addr string The address to bind the CRI streaming server to. If not specified, it will bind to all addresses. --version Prints the version of cri-dockerd time="2022-09-10T19:21:26Z" level=fatal msg="Unknown command: version"

W0910 19:21:26.709325 1964 out.go:239] W0910 19:21:26.711112 1964 out.go:239] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ ๐Ÿ˜ฟ If the above advice does not help, please let us know: โ”‚ โ”‚ ๐Ÿ‘‰ https://github.com/kubernetes/minikube/issues/new/choose โ”‚ โ”‚ โ”‚ โ”‚ Please run minikube logs --file=logs.txt and attach logs.txt to the GitHub issue. โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ I0910 19:21:26.713067 1964 out.go:177]

*

Operating System

Ubuntu

Driver

None (Baremetal)

Debajyoti1 commented 2 years ago

Installing crictl solved the problem