kubernetes / minikube

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

unable to start minikube #15758

Closed EndGaurav closed 1 year ago

EndGaurav commented 1 year ago

What Happened?

after installing every essential for minikube driver none. but it still giving below error X Exiting due to RUNTIME_ENABLE: Temporary Error: sudo /usr/local/bin/crictl version: exit status 1 stdout:

stderr: time="2023-01-31T10:54:53Z" level=fatal msg="unable to determine runtime API version: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial unix /var/run/cri-dockerd.sock: connect: connection refused\""

Attach the log file

*

stderr: I0131 10:54:17.553841 6855 exec_runner.go:51] Run: sudo systemctl is-active --quiet service kubelet I0131 10:54:17.564696 6855 fix.go:103] recreateIfNeeded on minikube: state=Stopped err= W0131 10:54:17.564717 6855 fix.go:129] unexpected machine state, will restart: I0131 10:54:17.567483 6855 out.go:177] Restarting existing none bare metal machine for "minikube" ... I0131 10:54:17.570433 6855 profile.go:148] Saving config to /root/.minikube/profiles/minikube/config.json ... I0131 10:54:17.570578 6855 start.go:300] post-start starting for "minikube" (driver="none") I0131 10:54:17.570617 6855 start.go:328] 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] I0131 10:54:17.570655 6855 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 I0131 10:54:17.577742 6855 main.go:141] libmachine: Couldn't set key PRIVACY_POLICY_URL, no corresponding struct field found I0131 10:54:17.577767 6855 main.go:141] libmachine: Couldn't set key VERSION_CODENAME, no corresponding struct field found I0131 10:54:17.577783 6855 main.go:141] libmachine: Couldn't set key UBUNTU_CODENAME, no corresponding struct field found I0131 10:54:17.580331 6855 out.go:177] OS release is Ubuntu 18.04.6 LTS I0131 10:54:17.582342 6855 filesync.go:126] Scanning /root/.minikube/addons for local assets ... I0131 10:54:17.582403 6855 filesync.go:126] Scanning /root/.minikube/files for local assets ... I0131 10:54:17.582435 6855 start.go:303] post-start completed in 11.845916ms I0131 10:54:17.582445 6855 fix.go:57] fixHost completed within 42.328082ms I0131 10:54:17.582452 6855 start.go:83] releasing machines lock for "minikube", held for 42.34736ms I0131 10:54:17.582791 6855 exec_runner.go:51] Run: cat /version.json I0131 10:54:17.582917 6855 exec_runner.go:51] Run: curl -sS -m 2 https://registry.k8s.io/ W0131 10:54:17.584125 6855 start.go:396] Unable to open version.json: cat /version.json: exit status 1 stdout:

stderr: cat: /version.json: No such file or directory I0131 10:54:17.584176 6855 exec_runner.go:51] Run: sh -c "stat /etc/cni/net.d/loopback.conf" W0131 10:54:17.587534 6855 cni.go:208] loopback cni configuration skipped: "/etc/cni/net.d/loopback.conf" not found I0131 10:54:17.587654 6855 exec_runner.go:51] Run: sudo mkdir -p /etc/systemd/system/cri-docker.service.d I0131 10:54:17.602540 6855 exec_runner.go:144] found /etc/systemd/system/cri-docker.service.d/10-cni.conf, removing ... I0131 10:54:17.602555 6855 exec_runner.go:207] rm: /etc/systemd/system/cri-docker.service.d/10-cni.conf I0131 10:54:17.602638 6855 exec_runner.go:151] cp: memory --> /etc/systemd/system/cri-docker.service.d/10-cni.conf (135 bytes) I0131 10:54:17.602768 6855 exec_runner.go:51] Run: sudo cp -a /tmp/minikube4034673972 /etc/systemd/system/cri-docker.service.d/10-cni.conf I0131 10:54:17.622239 6855 exec_runner.go:51] Run: sudo find /etc/cni/net.d -maxdepth 1 -type f ( ( -name bridge -or -name podman ) -and -not -name .mk_disabled ) -printf "%!p(MISSING), " -exec sh -c "sudo mv {} {}.mk_disabled" ; I0131 10:54:17.632353 6855 cni.go:258] no active bridge cni configs found in "/etc/cni/net.d" - nothing to disable I0131 10:54:17.632377 6855 start.go:483] detecting cgroup driver to use... I0131 10:54:17.632402 6855 detect.go:196] detected "cgroupfs" cgroup driver on host os I0131 10:54:17.632550 6855 exec_runner.go:51] Run: /bin/bash -c "sudo mkdir -p /etc && printf %!s(MISSING) "runtime-endpoint: unix:///run/containerd/containerd.sock image-endpoint: unix:///run/containerd/containerd.sock " | sudo tee /etc/crictl.yaml" I0131 10:54:17.648719 6855 exec_runner.go:51] Run: sh -c "sudo sed -i -r 's|^( )sandbox_image = .$|\1sandbox_image = "registry.k8s.io/pause:3.9"|' /etc/containerd/config.toml" W0131 10:54:17.656743 6855 start.go:450] cannot ensure containerd is configured properly and reloaded for docker - cluster might be unstable: update sandbox_image: sh -c "sudo sed -i -r 's|^( )sandbox_image = .*$|\1sandbox_image = "registry.k8s.io/pause:3.9"|' /etc/containerd/config.toml": exit status 2 stdout:

stderr: sed: can't read /etc/containerd/config.toml: No such file or directory I0131 10:54:17.656763 6855 start.go:483] detecting cgroup driver to use... I0131 10:54:17.656796 6855 detect.go:196] detected "cgroupfs" cgroup driver on host os I0131 10:54:17.656973 6855 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" I0131 10:54:17.672141 6855 exec_runner.go:51] Run: sudo systemctl unmask docker.service I0131 10:54:17.820497 6855 exec_runner.go:51] Run: sudo systemctl enable docker.socket I0131 10:54:17.957428 6855 docker.go:529] configuring docker to use "cgroupfs" as cgroup driver... I0131 10:54:17.957462 6855 exec_runner.go:144] found /etc/docker/daemon.json, removing ... I0131 10:54:17.957470 6855 exec_runner.go:207] rm: /etc/docker/daemon.json I0131 10:54:17.957554 6855 exec_runner.go:151] cp: memory --> /etc/docker/daemon.json (144 bytes) I0131 10:54:17.957701 6855 exec_runner.go:51] Run: sudo cp -a /tmp/minikube1251745070 /etc/docker/daemon.json I0131 10:54:17.967390 6855 exec_runner.go:51] Run: sudo systemctl daemon-reload I0131 10:54:18.120286 6855 exec_runner.go:51] Run: sudo systemctl restart docker I0131 10:54:18.402200 6855 exec_runner.go:51] Run: sudo systemctl enable cri-docker.socket I0131 10:54:18.559831 6855 exec_runner.go:51] Run: sudo systemctl unmask cri-docker.socket I0131 10:54:18.705188 6855 exec_runner.go:51] Run: sudo systemctl enable cri-docker.socket I0131 10:54:18.855149 6855 exec_runner.go:51] Run: sudo systemctl daemon-reload I0131 10:54:18.991538 6855 exec_runner.go:51] Run: sudo systemctl restart cri-docker.socket I0131 10:54:19.011892 6855 start.go:530] Will wait 60s for socket path /var/run/cri-dockerd.sock I0131 10:54:19.011963 6855 exec_runner.go:51] Run: stat /var/run/cri-dockerd.sock I0131 10:54:19.013741 6855 start.go:551] Will wait 60s for crictl version I0131 10:54:19.013784 6855 exec_runner.go:51] Run: which crictl I0131 10:54:19.014980 6855 exec_runner.go:51] Run: sudo /usr/local/bin/crictl version I0131 10:54:21.055267 6855 exec_runner.go:84] Completed: sudo /usr/local/bin/crictl version: (2.040251777s) I0131 10:54:21.055310 6855 retry.go:31] will retry after 11.04660288s: Temporary Error: sudo /usr/local/bin/crictl version: exit status 1 stdout:

stderr: time="2023-01-31T10:54:21Z" level=fatal msg="unable to determine runtime API version: rpc error: code = DeadlineExceeded desc = context deadline exceeded" I0131 10:54:32.102234 6855 exec_runner.go:51] Run: sudo /usr/local/bin/crictl version I0131 10:54:32.132074 6855 retry.go:31] will retry after 21.607636321s: Temporary Error: sudo /usr/local/bin/crictl version: exit status 1 stdout:

stderr: time="2023-01-31T10:54:32Z" level=fatal msg="unable to determine runtime API version: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial unix /var/run/cri-dockerd.sock: connect: connection refused\"" I0131 10:54:53.740055 6855 exec_runner.go:51] Run: sudo /usr/local/bin/crictl version I0131 10:54:53.773081 6855 out.go:177] W0131 10:54:53.775312 6855 out.go:239] X Exiting due to RUNTIME_ENABLE: Temporary Error: sudo /usr/local/bin/crictl version: exit status 1 stdout:

stderr: time="2023-01-31T10:54:53Z" level=fatal msg="unable to determine runtime API version: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial unix /var/run/cri-dockerd.sock: connect: connection refused\""

W0131 10:54:53.775343 6855 out.go:239] W0131 10:54:53.776482 6855 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. │ │ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ I0131 10:54:53.779073 6855 out.go:177]

Operating System

Ubuntu

Driver

None

spowelljr commented 1 year ago

Hi @EndGaurav, crictl is a requirement if using the none driver, try installing it and then try again.

EndGaurav commented 1 year ago

@spowelljr I have already installed crictl. but i am still get this error "X Exiting due to RUNTIME_ENABLE: Temporary Error: sudo /usr/local/bin/crictl version: exit status 1"

EndGaurav commented 1 year ago

Please help me

EndGaurav commented 1 year ago

This is what i am getting

X Exiting due to RUNTIME_ENABLE: Temporary Error: sudo /usr/local/bin/crictl version: exit status 1 stdout:

stderr: E0201 08:25:06.912781 3354 remote_runtime.go:145] "Version from runtime service failed" err="rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial unix /var/run/cri-dockerd.sock: connect: connection refused\"" time="2023-02-01T08:25:06Z" level=fatal msg="getting the runtime version: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial unix /var/run/cri-dockerd.sock: connect: connection refused\""

╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │ │ │ 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. │ │ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯

spowelljr commented 1 year ago

If you manually run sudo /usr/local/bin/crictl version what do you get?

Mdrehanalam2020 commented 1 year ago

getting below message

FATA[0000] unable to determine runtime API version: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix /var/run/cri-dockerd.sock: connect: connection refused"

IlyshaNil commented 1 year ago

I can't explain, but i found some kind of solution, that work for me.

Errors I had all the same errors, described above, so first i cheked cri-dockerd statuses: systelctl status cri-docker.service failed with cri-docker.service: Start request repeated too quickly systemctl status cri-docker.socked failed with service-start-limit-hit

Also journalctl -xe showed, that cri-docker.service: Failed at step EXEC spawning /usr/bin/cri-dockerd: No such file or directory

Solution I cd to cri-dockerd directory (with the source of cri-dockerd, which i git clone from mirantis/cri-dockerd) and try again install -o root -g root -m 0755 bin/cri-dockerd /usr/bin/cri-dockerd (from installation guide) with /usr/bin/cri-dockerd instead of /usr/local/bin/cri-dockerd Then restart cri-dockerd services and they up correctly.

Issue I guess sed -i -e 's,/usr/bin/cri-dockerd,/usr/local/bin/cri-dockerd,' /etc/systemd/system/cri-docker.service from installation guide must prevent this error, but actually it is not work for some reason.

UPD: also installing specific version of minikube instead of latest solved some related errors for me - v1.28.0 in my case (currently latest is v1.29.0), like: failed to disable all bridge cni configs in "/etc/cni/net.d" unable to disable preinstalled bridge CNI(s) Unable to copy tempfile /tmp/minikube2931501988 to dst /etc/docker/daemon.json - No such file or directory

RazaaAdnan commented 1 year ago

Thanks @IlyshaNil .. You are real champion. I was banging my head from last 5 days. This resolved my issue. Thanks alot.

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-ci-robot commented 1 year ago

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to [this](https://github.com/kubernetes/minikube/issues/15758#issuecomment-1623589051): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue with `/reopen` >- Mark this issue as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close not-planned > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.