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

Kubernetes fails to start (hangs in starting phase) #1962

Closed
3 tasks done
unjello opened this issue Apr 17, 2018 · 65 comments
Closed
3 tasks done

Kubernetes fails to start (hangs in starting phase) #1962

unjello opened this issue Apr 17, 2018 · 65 comments

Comments

@unjello
Copy link

unjello commented Apr 17, 2018

Please, check https://docs.docker.com/docker-for-win/troubleshoot/.
Issues without logs and details cannot be debugged, and will be closed.

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have submitted Diagnostics
  • I have included the Diagnostics ID in this Issue
  • Windows Version: Windows 10; version 1803; OS build: 17133.73; Hyper-V enabled.
  • Docker for Windows Version: Docker Edge 18.04.0-ce-win62 (17151) - but it happened before too.

Expected behavior

Kubernetes cluster should start, Settings panel should have green dot saying Kubernetes is running.
kubectl get pods should return empty set.

Actual behavior

Kubernetes is stuck in Kubernetes is starting phase. kubetctl get pods hangs.

Information

Diagnostic ID: 943836AC-0B99-4BEE-BC82-900781400047/2018-04-17_23-06-41

Steps to reproduce the behavior

This issue looks a lot like #1845, which I am not sure why OP closed.

  1. Enter Settings
  2. Go to Kubernetes menu
  3. Select Enable Kubernetes
  4. Hit Apply

Tried Reset to factory settings and different combinations of resetting. The port 6445 seems to be correctly tunneled, as I see vpnkit.exe listening on it. K8s images are downloaded, no k8s dockers are visible in docker ps and docker logs include following entries:

[23:04:53.517][ApiProxy       ][Info   ] time="2018-04-17T23:04:53+02:00" msg="Node status error: Get https://localhost:6445/api/v1/nodes: EOF"
[23:04:54.513][ApiProxy       ][Info   ] time="2018-04-17T23:04:54+02:00" msg="Node status error: Get https://localhost:6445/api/v1/nodes: EOF"
...
[23:05:59.014][ApiProxy       ][Info   ] time="2018-04-17T23:05:59+02:00" msg="Node status error: the server was unable to return a response in the time allotted, but may still be processing the request (get nodes)"
...
[23:06:52.721][ApiProxy       ][Info   ] time="2018-04-17T23:06:52+02:00" msg="Node status error: Get https://localhost:6445/api/v1/nodes: http2: server sent GOAWAY and closed the connection; LastStreamID=3, ErrCode=NO_ERROR, debug=\"\""
@unjello unjello changed the title Kubernetes failes to start (hangs in starting phase) Kubernetes fails to start (hangs in starting phase) Apr 18, 2018
@cuiping1004
Copy link

have the same issue

@cuiping1004
Copy link

cuiping1004 commented May 23, 2018

I resolve this issue by delete ./kube/config , then enable Kurnetes again

@vmilitello
Copy link

Same issue. Things that I tried:

  1. deleting %userprofile%/.kube/config as suggested by @cuiping1004
  2. Reset Docker to Factory
  3. Reinstall Docker Edge
  4. Remove IPV6 from all the Switch created by HyperV
  5. Pray every God (included SpongeBob and Jimy Hendrix)

The error reported in the log file is always the same

[13:57:05.303][ApiProxy ][Info ] time="2018-06-06T13:57:05-07:00" msg="Node status error: Get https://localhost:6445/api/v1/nodes: EOF"
[13:57:06.305][ApiProxy ][Info ] time="2018-06-06T13:57:06-07:00" msg="Node status error: Get https://localhost:6445/api/v1/nodes: EOF"
[13:57:07.305][ApiProxy ][Info ] time="2018-06-06T13:57:07-07:00" msg="Node status error: Get https://localhost:6445/api/v1/nodes: EOF"
[13:57:08.305][VpnKit ][Error ] vpnkit.exe: Hvsock.read: An established connection was aborted by the software in your host machine.

Funny fact: Docker itself works great. I tried

docker run hello-world

as well as

docker run -it ubuntu bash

With both container I had no problem whatsoever.

Inside the ubuntu container, I was able to call apt-get update and apt-get install, so external connection works fine.

@bacongobbler
Copy link

bacongobbler commented Jul 6, 2018

surprisingly, @cuiping1004's solution worked for me. My steps:

  1. disable Kubernetes from the Settings window
  2. Open a Powershell terminal and rm -r .\.kube from within my home directory
  3. Re-enable Kubernetes from the Settings window

After that kubectl cluster-info connects and returns cluster information, whereas before it'd hang and fail with a connection error.

fwiw I still see the error vpnkit.exe: Hvsock.read: An established connection was aborted by the software in your host machine. in my logs, but everything seems to be just fine.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\mafishe> kubectl get nodes
NAME                 STATUS    ROLES     AGE       VERSION
docker-for-desktop   Ready     master    25m       v1.10.3
PS C:\Users\mafishe> kubectl -n kube-system get pods
NAME                                         READY     STATUS    RESTARTS   AGE
etcd-docker-for-desktop                      1/1       Running   1          24m
kube-apiserver-docker-for-desktop            1/1       Running   2          24m
kube-controller-manager-docker-for-desktop   1/1       Running   1          24m
kube-dns-86f4d74b45-7cs57                    3/3       Running   3          25m
kube-proxy-zgbqf                             1/1       Running   1          25m
kube-scheduler-docker-for-desktop            1/1       Running   1          24m

Maybe it's more of a "did you turn it off and on again?" kinda situation, but I've restarted Docker for Win many times prior to trying @cuiping1004's solution before it worked. Could be related, or could just have been lucky this time.

@bacongobbler
Copy link

As far as diagnostic information goes:

Version 18.05.0-ce-win67 (18263)
Channel: edge
0c7f1aa

And indeed, docker itself was working fine the entire time, just not kubectl.

@vilinski
Copy link

Same issue.

  • after activating kubernetes, the dialog "installing kubernetes cluster" appears, but nothing happens.
  • after some time I close the dialog. Complete Kubernetes window is still disabled.
  • can't disable Kubernetes from settings window.
  • set "KubernetesEnabled": false, in the %appdata%/Docker/settings.json. Didn't help.
  • Tried to remove %appdata%/{Docker,Kubernetes} and reinstall docker. Didn't help.

@dfme
Copy link

dfme commented Aug 16, 2018

I have the same issue which I already have reported here: #2065

@kasvith
Copy link

kasvith commented Aug 27, 2018

having the same issue here, I got it solved by @cuiping1004 's method

@giftkugel
Copy link

giftkugel commented Sep 3, 2018

I've got the same Issue on my Windows machine.
Was stuck in the "Kubernetes is starting" procedure and couldn't disable Kubernetes from the settings window.

I have chosen the "Reset to factory defaults" from the settings window to get rid of the hanging Kubernetes instance. This will delete your MobyLinuxVM Hyper-V VM and get rid of everything!

For a second try I fully disabled my Windows firewalls and tried again.

Now Kubernetes is installed and up and running. 😄

Maybe the Docker configuration should setup the Windows firewall rules for Docker+Kubernetes!

image

After that I added an outgoing firewall rule to my windows firewall settings for C:\Program Files\Docker\Docker\resources\vpnkit.exe allowing every outgoing connection. With that settings I am able to enable Kubernetes for Windows without issues. 👍

@anwalkers
Copy link

anwalkers commented Sep 5, 2018

Diagnostic ID: 51BE916F-11C1-4855-9037-9EE0541E1A40/20180905161830

I have tried every firewall rule with IT. They have added vpnkit.exe to the rule set to BitDefender to allow every outgoing connection. Still no luck.

[16:05:08.952][ApiProxy       ][Info   ] time="2018-09-05T16:05:08-07:00" msg="Starting kubernetes cluster"
[16:05:08.952][ApiProxy       ][Debug  ] time="2018-09-05T16:05:08-07:00" msg="socket.DialUnix: \\\\.\\pipe\\dockerBackendToGui"
[16:05:08.967][KubernetesState][Info   ] received kubernetesstate command - SetState : starting
[16:05:09.296][ApiProxy       ][Info   ] Init returned
[16:05:09.296][ApiProxy       ][Info   ] time="2018-09-05T16:05:09-07:00" msg="Cluster config received"
[16:05:09.336][ApiProxy       ][Info   ] get_ip returned {192.168.65.3}
[16:05:09.337][VpnKit         ][Info   ] vpnkit.exe: Using protocol TwoThousand msize 16384

[16:05:09.338][ApiProxy       ][Info   ] Expose tcp:0.0.0.0:6445:tcp:192.168.65.3:6443
[16:05:09.338][ApiProxy       ][Info   ] Failed to walk to [tcp:0.0.0.0:6445:tcp:192.168.65.3:6443] 9p: file not found
[16:05:09.342][ApiProxy       ][Info   ] Expose tcp:0.0.0.0:6445:tcp:192.168.65.3:6443: succeeded with tcp:0.0.0.0:6445:tcp:192.168.65.3:6443
[16:05:10.138][VpnKit         ][Info   ] vpnkit.exe: Connected Ethernet interface f6:16:36:bc:f9:c6

[16:05:10.138][VpnKit         ][Info   ] vpnkit.exe: UDP interface connected on 192.168.65.1

[16:05:10.347][VpnKit         ][Error  ] vpnkit.exe: Hvsock.read: An established connection was aborted by the software in your host machine.


[16:05:10.348][ApiProxy       ][Info   ] time="2018-09-05T16:05:10-07:00" msg="Cannot list nodes: Get https://localhost:6445/api/v1/nodes: EOF"
[16:05:11.348][ApiProxy       ][Info   ] time="2018-09-05T16:05:11-07:00" msg="Cannot list nodes: Get https://localhost:6445/api/v1/nodes: EOF"
[16:05:12.347][VpnKit         ][Error  ] vpnkit.exe: Hvsock.read: An established connection was aborted by the software in your host machine.


[16:05:12.347][ApiProxy       ][Info   ] time="2018-09-05T16:05:12-07:00" msg="Cannot list nodes: Get https://localhost:6445/api/v1/nodes: EOF"
[16:05:13.346][VpnKit         ][Error  ] vpnkit.exe: Hvsock.read: An established connection was aborted by the software in your host machine.


[16:05:13.347][ApiProxy       ][Info   ] time="2018-09-05T16:05:13-07:00" msg="Cannot list nodes: Get https://localhost:6445/api/v1/nodes: EOF"
[16:05:14.347][VpnKit         ][Error  ] vpnkit.exe: Hvsock.read: An established connection was aborted by the software in your host machine.


[16:05:14.348][ApiProxy       ][Info   ] time="2018-09-05T16:05:14-07:00" msg="Cannot list nodes: Get https://localhost:6445/api/v1/nodes: EOF"
[16:05:15.345][VpnKit         ][Error  ] vpnkit.exe: Hvsock.read: An established connection was aborted by the software in your host machine.


[16:05:15.346][ApiProxy       ][Info   ] time="2018-09-05T16:05:15-07:00" msg="Cannot list nodes: Get https://localhost:6445/api/v1/nodes: EOF"
[16:05:15.779][VpnKit         ][Info   ] vpnkit.exe: Connected Ethernet interface f6:16:36:bc:f9:c6

[16:05:15.779][VpnKit         ][Info   ] vpnkit.exe: UDP interface connected on 172.23.110.15

[16:05:16.347][VpnKit         ][Error  ] vpnkit.exe: Hvsock.read: An established connection was aborted by the software in your host machine.


[16:05:16.348][ApiProxy       ][Info   ] time="2018-09-05T16:05:16-07:00" msg="Cannot list nodes: Get https://localhost:6445/api/v1/nodes: EOF"
[16:05:17.350][VpnKit         ][Error  ] vpnkit.exe: Hvsock.read: An established connection was aborted by the software in your host machine.


[16:05:17.353][ApiProxy       ][Info   ] time="2018-09-05T16:05:17-07:00" msg="Cannot list nodes: Get https://localhost:6445/api/v1/nodes: EOF"
[16:05:18.172][VpnKit         ][Info   ] vpnkit.exe: Connected Ethernet interface f6:16:36:bc:f9:c6

[16:05:18.172][VpnKit         ][Info   ] vpnkit.exe: UDP interface connected on 74.125.195.82

[16:05:18.346][VpnKit         ][Error  ] vpnkit.exe: Hvsock.read: An established connection was aborted by the software in your host machine.


[16:05:18.346][ApiProxy       ][Info   ] time="2018-09-05T16:05:18-07:00" msg="Cannot list nodes: Get https://localhost:6445/api/v1/nodes: EOF"
[16:05:18.805][VpnKit         ][Info   ] vpnkit.exe: Connected Ethernet interface f6:16:36:bc:f9:c6

[16:05:18.805][VpnKit         ][Info   ] vpnkit.exe: UDP interface connected on 172.217.3.176

[16:05:19.347][ApiProxy       ][Info   ] time="2018-09-05T16:05:19-07:00" msg="Cannot list nodes: Get https://localhost:6445/api/v1/nodes: EOF"
[16:05:20.345][VpnKit         ][Error  ] vpnkit.exe: Hvsock.read: An established connection was aborted by the software in your host machine.


[16:05:20.346][ApiProxy       ][Info   ] time="2018-09-05T16:05:20-07:00" msg="Cannot list nodes: Get https://localhost:6445/api/v1/nodes: EOF"
[16:05:21.346][ApiProxy       ][Info   ] time="2018-09-05T16:05:21-07:00" msg="Cannot list nodes: Get https://localhost:6445/api/v1/nodes: EOF"
[16:05:21.668][ApiProxy       ][Info   ] time="2018-09-05T16:05:21-07:00" msg="proxy >> GET /_ping\n"
[16:05:21.669][ApiProxy       ][Info   ] time="2018-09-05T16:05:21-07:00" msg="proxy << GET /_ping\n"
[16:05:21.670][ApiProxy       ][Info   ] time="2018-09-05T16:05:21-07:00" msg="proxy >> GET /v1.38/containers/json?all=1\n"
[16:05:21.673][ApiProxy       ][Info   ] time="2018-09-05T16:05:21-07:00" msg="proxy << GET /v1.38/containers/json?all=1\n"
[16:05:22.353][VpnKit         ][Error  ] vpnkit.exe: Hvsock.read: An established connection was aborted by the software in your host machine.


[16:05:22.355][ApiProxy       ][Info   ] time="2018-09-05T16:05:22-07:00" msg="Cannot list nodes: Get https://localhost:6445/api/v1/nodes: EOF"
[16:05:23.346][VpnKit         ][Error  ] vpnkit.exe: Hvsock.read: An established connection was aborted by the software in your host machine.


[16:05:23.347][ApiProxy       ][Info   ] time="2018-09-05T16:05:23-07:00" msg="Cannot list nodes: Get https://localhost:6445/api/v1/nodes: EOF"
[16:05:24.347][VpnKit         ][Error  ] vpnkit.exe: Hvsock.read: An established connection was aborted by the software in your host machine.


[16:05:24.348][ApiProxy       ][Info   ] time="2018-09-05T16:05:24-07:00" msg="Cannot list nodes: Get https://localhost:6445/api/v1/nodes: EOF"

image

image

PS C:\WINDOWS\system32> docker ps
CONTAINER ID        IMAGE                                      COMMAND                  CREATED              STATUS              PORTS               NAMES
393e6f5084f7        e03746fe22c3                               "kube-apiserver --ad…"   About a minute ago   Up About a minute                       k8s_kube-apiserver_kube-apiserver-docker-for-desktop_kube-system_5e53624a1c11ef40a15ea0deec317233_10
8a847a1635ac        k8s.gcr.io/kube-scheduler-amd64            "kube-scheduler --ad…"   32 minutes ago       Up 32 minutes                           k8s_kube-scheduler_kube-scheduler-docker-for-desktop_kube-system_ea66a171667ec4aaf1b274428a42a7cf_0
388ea3f58bc9        k8s.gcr.io/kube-controller-manager-amd64   "kube-controller-man…"   32 minutes ago       Up 32 minutes                           k8s_kube-controller-manager_kube-controller-manager-docker-for-desktop_kube-system_188b205943f978b0549333a9e89e0565_0
7ceec082975c        k8s.gcr.io/pause-amd64:3.1                 "/pause"                 32 minutes ago       Up 32 minutes                           k8s_POD_kube-scheduler-docker-for-desktop_kube-system_ea66a171667ec4aaf1b274428a42a7cf_0
e986ca39a5ad        k8s.gcr.io/pause-amd64:3.1                 "/pause"                 32 minutes ago       Up 32 minutes                           k8s_POD_kube-apiserver-docker-for-desktop_kube-system_5e53624a1c11ef40a15ea0deec317233_0
ba799c04183b        k8s.gcr.io/pause-amd64:3.1                 "/pause"                 32 minutes ago       Up 32 minutes                           k8s_POD_etcd-docker-for-desktop_kube-system_9da6a62f7267ecf1a05f7fcef4decd7a_0
17870b460ba1        k8s.gcr.io/pause-amd64:3.1                 "/pause"                 32 minutes ago       Up 32 minutes                           k8s_POD_kube-controller-manager-docker-for-desktop_kube-system_188b205943f978b0549333a9e89e0565_0
PS C:\WINDOWS\system32> docker ps
CONTAINER ID        IMAGE                                      COMMAND                  CREATED              STATUS              PORTS               NAMES
cb651169b1be        e03746fe22c3                               "kube-apiserver --ad…"   About a minute ago   Up About a minute                       k8s_kube-apiserver_kube-apiserver-docker-for-desktop_kube-system_5e53624a1c11ef40a15ea0deec317233_236
8a847a1635ac        k8s.gcr.io/kube-scheduler-amd64            "kube-scheduler --ad…"   17 hours ago         Up 17 hours                             k8s_kube-scheduler_kube-scheduler-docker-for-desktop_kube-system_ea66a171667ec4aaf1b274428a42a7cf_0
388ea3f58bc9        k8s.gcr.io/kube-controller-manager-amd64   "kube-controller-man…"   17 hours ago         Up 17 hours                             k8s_kube-controller-manager_kube-controller-manager-docker-for-desktop_kube-system_188b205943f978b0549333a9e89e0565_0
7ceec082975c        k8s.gcr.io/pause-amd64:3.1                 "/pause"                 17 hours ago         Up 17 hours                             k8s_POD_kube-scheduler-docker-for-desktop_kube-system_ea66a171667ec4aaf1b274428a42a7cf_0
e986ca39a5ad        k8s.gcr.io/pause-amd64:3.1                 "/pause"                 17 hours ago         Up 17 hours                             k8s_POD_kube-apiserver-docker-for-desktop_kube-system_5e53624a1c11ef40a15ea0deec317233_0
ba799c04183b        k8s.gcr.io/pause-amd64:3.1                 "/pause"                 17 hours ago         Up 17 hours                             k8s_POD_etcd-docker-for-desktop_kube-system_9da6a62f7267ecf1a05f7fcef4decd7a_0
17870b460ba1        k8s.gcr.io/pause-amd64:3.1                 "/pause"                 17 hours ago         Up 17 hours                             k8s_POD_kube-controller-manager-docker-for-desktop_kube-system_188b205943f978b0549333a9e89e0565_0
PS C:\WINDOWS\system32> docker ps
CONTAINER ID        IMAGE                                      COMMAND                  CREATED             STATUS              PORTS               NAMES
8a847a1635ac        k8s.gcr.io/kube-scheduler-amd64            "kube-scheduler --ad…"   19 hours ago        Up 19 hours                             k8s_kube-scheduler_kube-scheduler-docker-for-desktop_kube-system_ea66a171667ec4aaf1b274428a42a7cf_0
388ea3f58bc9        k8s.gcr.io/kube-controller-manager-amd64   "kube-controller-man…"   19 hours ago        Up 19 hours                             k8s_kube-controller-manager_kube-controller-manager-docker-for-desktop_kube-system_188b205943f978b0549333a9e89e0565_0
7ceec082975c        k8s.gcr.io/pause-amd64:3.1                 "/pause"                 19 hours ago        Up 19 hours                             k8s_POD_kube-scheduler-docker-for-desktop_kube-system_ea66a171667ec4aaf1b274428a42a7cf_0
e986ca39a5ad        k8s.gcr.io/pause-amd64:3.1                 "/pause"                 19 hours ago        Up 19 hours                             k8s_POD_kube-apiserver-docker-for-desktop_kube-system_5e53624a1c11ef40a15ea0deec317233_0
ba799c04183b        k8s.gcr.io/pause-amd64:3.1                 "/pause"                 19 hours ago        Up 19 hours                             k8s_POD_etcd-docker-for-desktop_kube-system_9da6a62f7267ecf1a05f7fcef4decd7a_0
17870b460ba1        k8s.gcr.io/pause-amd64:3.1                 "/pause"                 19 hours ago        Up 19 hours                             k8s_POD_kube-controller-manager-docker-for-desktop_kube-system_188b205943f978b0549333a9e89e0565_0

@HaleLu
Copy link

HaleLu commented Sep 7, 2018

@anwalkers +1

@patrickbadley
Copy link

@anwalkers Have you had any luck with this? I'm running into the same issue.

@anwalkers
Copy link

@patrickbadley No luck...

@anwalkers
Copy link

@patrickbadley I did try it at home and succeeded to get it running on my surface, not on the corporate network.

Diagnostic ID for the successful startup: 4CE55FC1-174C-4F00-AD3D-75E954F136D2/20180918213135

@JohanSellberg
Copy link

I had the same problem.
Similar to @anwalkers I had problem when connected to the corporate network. But when I instead used 4G connection on the same computer it worked fine. So probably blocked somehow in corporate firewall for me.

Docker hello-world worked fine for me too with corporate network so downloading images and such was not a problem but something else was blocked when trying kubernetes.

@anwalkers
Copy link

@JohanSellberg @patrickbadley I have it running. I had to change my DNS services from our corporate servers to a public server. I am using the Verisign DNS servers and changed both the IPv4 and IPv6 protocols. I still have the vpnkit firewall rule in place as well. Hope this helps...

image

@jherman
Copy link

jherman commented Sep 28, 2018

@anwalkers Where did you change the DNS? On the DockerNAT adapter? I changed it there, but still no luck for me.

@anwalkers
Copy link

@jherman on my host machine. Not in Hyper-V or Docker.

@JohanVanHoye
Copy link

Same experience: could only get K8s up when Windows Firewall fully OFF AND connected to a home network. Booting Docker & K8s while connected to the corporate network causes it to hang again at "Kubernetes is starting..."

What blocked external resource is it trying to access? It doesn't seem to be documented anywhere. Adding an outbound rule in the Windows firewall for the vpnkit.exe as suggested above doesn't seem to make a difference (on the corporate network it may still be getting blocked by the network firewall).

@jherman
Copy link

jherman commented Oct 3, 2018

I initially installed Docker on my desktop that's my devbox. Couldn't get K8s working and ran through the gamut of the suggestions here and other threads, but none of them worked.

Got tired of fussing around on that so I installed on a clean windows 10 environment on my laptop where HyperV had not been installed yet. K8s worked right away. However 3 hours later when I rebooted the machine, I started seeing that K8s wouldn't come back up and once again seeing the same exact issue on my laptop:

[11:09:33.606][ApiProxy       ][Info   ] time="2018-10-03T11:09:33-07:00" msg="Cannot list nodes: Get https://localhost:6445/api/v1/nodes: EOF"
[11:09:34.604][VpnKit         ][Error  ] vpnkit.exe: Hvsock.read: An established connection was aborted by the software in your host machine.

A day later, I tried running it again on my desktop that morning. Still failing. Try again in the afternoon, and all of sudden it starts working. WTF?

There has to be something fundamentally wrong... maybe there is a timing issue within the containers...

@emarques
Copy link

emarques commented Oct 10, 2018

I also have my laptop sitting behind a corporate network doing the steps that @anwalkers mentioned:
Creating a rule for the VPNkit and changing my DNS server names to public ones did it for me

@anwalkers
Copy link

I tried another experiment and it seems to have solved the corporate DNS server and firewall issue. I changed the DNS setting on the network tab of the docker settings to be "fixed" to goggle's DNS server (8.8.8.8). With this small change kubernetes has not problem spinning up after a reset.

image

@jherman
Copy link

jherman commented Oct 10, 2018

I've tried doing that as well, but I only get the following results:

 time="2018-10-10T13:53:47-07:00" msg="2/3 system pods running, waiting..."
[13:53:48.766][ApiProxy       ][Info   ] time="2018-10-10T13:53:48-07:00" msg="2/3 system pods running, waiting..."
[13:53:48.995][DnsUpdater     ][Info   ] Network configuration change detected
[13:53:48.995][DnsUpdater     ][Error  ] Unable to update dns settings: Value cannot be null.
Parameter name: first
[13:53:49.098][DnsUpdater     ][Info   ] Network configuration change detected
[13:53:49.103][DnsUpdater     ][Error  ] Unable to update dns settings: Value cannot be null.
Parameter name: first
[13:53:49.768][ApiProxy       ][Info   ] time="2018-10-10T13:53:49-07:00" msg="2/3 system pods running, waiting..."
[13:53:50.033][DnsUpdater     ][Info   ] Network configuration change detected
[13:53:50.034][DnsUpdater     ][Error  ] Unable to update dns settings: Value cannot be null.
Parameter name: first
[13:53:50.186][DnsUpdater     ][Info   ] Network configuration change detected
[13:53:50.187][DnsUpdater     ][Error  ] Unable to update dns settings: Value cannot be null.
Parameter name: first
[13:53:50.766][ApiProxy       ][Info   ] time="2018-10-10T13:53:50-07:00" msg="2/3 system pods running, waiting..."
[13:53:51.767][ApiProxy       ][Info   ] time="2018-10-10T13:53:51-07:00" msg="2/3 system pods running, waiting..."
[13:53:52.766][ApiProxy       ][Info   ] time="2018-10-10T13:53:52-07:00" msg="2/3 system pods running, waiting..."
[13:53:53.164][DnsUpdater     ][Info   ] Network configuration change detected
[13:53:53.164][DnsUpdater     ][Error  ] Unable to update dns settings: Value cannot be null.
Parameter name: first
[13:53:53.765][ApiProxy       ][Info   ] time="2018-10-10T13:53:53-07:00" msg="2/3 system pods running, waiting..."
[13:53:54.766][ApiProxy       ][Info   ] time="2018-10-10T13:53:54-07:00" msg="2/3 system pods running, waiting..."
[13:53:55.793][ApiProxy       ][Info   ] time="2018-10-10T13:53:55-07:00" msg="2/3 system pods running, waiting..."
[13:53:56.766][ApiProxy       ][Info   ] time="2018-10-10T13:53:56-07:00" msg="2/3 system pods running, waiting..."
[13:53:57.768][ApiProxy       ][Info   ] time="2018-10-10T13:53:57-07:00" msg="2/3 system pods running, waiting..."
[13:53:58.767][ApiProxy       ][Info   ] time="2018-10-10T13:53:58-07:00" msg="2/3 system pods running, waiting..."
[13:53:59.767][ApiProxy       ][Info   ] time="2018-10-10T13:53:59-07:00" msg="2/3 system pods running, waiting..."
[13:54:00.776][ApiProxy       ][Info   ] time="2018-10-10T13:54:00-07:00" msg="2/3 system pods running, waiting..."
[13:54:01.788][ApiProxy       ][Info   ] time="2018-10-10T13:54:01-07:00" msg="2/3 system pods running, waiting..."
[13:54:02.781][ApiProxy       ][Info   ] time="2018-10-10T13:54:02-07:00" msg="2/3 system pods running, waiting..."
[13:54:02.912][VpnKit         ][Error  ] vpnkit.exe: Socket.UDPv4.read: udp -> 8.8.8.8:53 caught Lwt.Resolution_loop.Canceled returning Eof

[13:54:03.789][ApiProxy       ][Info   ] time="2018-10-10T13:54:03-07:00" msg="2/3 system pods running, waiting..."
[13:54:04.831][ApiProxy       ][Info   ] time="2018-10-10T13:54:04-07:00" msg="2/3 system pods running, waiting..."
[13:54:05.776][ApiProxy       ][Info   ] time="2018-10-10T13:54:05-07:00" msg="2/3 system pods running, waiting..."

@rustedwizard
Copy link

Change DNS to fixed this issue
Capture

@Lavaong
Copy link

Lavaong commented Oct 14, 2019

I suggest you reinstall the Docker Desktop and set Docker Desktop's Network to 8.8.8.8

@mdavid626
Copy link

This is still not solved. I am on 2.1.0.5 Docker.

  • Change DNS to fixed and use 8.8.8.8, this is within docker for window's settings
  • Remove the .kube config folder
  • Add the KUBECONFIG environment variable to System Variables and have the path be C:\Users[MYUSER].kube\config. Note that before I had it set as a User Variable.
  • Remove c:\ProgramData\DockerDesktop\pki
  • Disable Windows Firewall and Windows Defender
  • Reset to factory defaults

I always get the same "Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: EOF".

@mrbrazzi
Copy link

  • I have tried with the latest version of my channel (Stable)
  • I have uploaded Diagnostics
  • Diagnostics ID: E37D09A7-F695-4F6A-9380-A544CF140879/20200127005241

Expected behavior

Kubernetes start after is enabled

Actual behavior

Kubernetes failed to start
image

Information

  • Windows Version: Windows 10 Pro 1909 build 18363.592
  • Docker Desktop Version: 2.2.0.0 (42247)

Steps to reproduce the behavior

  1. Go to Settings > Kubernetes and click on [ ] Enable Kubernetes

@phonzia
Copy link

phonzia commented Jan 30, 2020

This is still not solved. I am on 2.1.0.5 Docker.

  • Change DNS to fixed and use 8.8.8.8, this is within docker for window's settings
  • Remove the .kube config folder
  • Add the KUBECONFIG environment variable to System Variables and have the path be C:\Users[MYUSER].kube\config. Note that before I had it set as a User Variable.
  • Remove c:\ProgramData\DockerDesktop\pki
  • Disable Windows Firewall and Windows Defender
  • Reset to factory defaults

I always get the same "Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: EOF".

I have the same problem here,

@gezhao2000
Copy link

This is still not solved. I am on 2.1.0.5 Docker.

  • Change DNS to fixed and use 8.8.8.8, this is within docker for window's settings
  • Remove the .kube config folder
  • Add the KUBECONFIG environment variable to System Variables and have the path be C:\Users[MYUSER].kube\config. Note that before I had it set as a User Variable.
  • Remove c:\ProgramData\DockerDesktop\pki
  • Disable Windows Firewall and Windows Defender
  • Reset to factory defaults

I always get the same "Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: EOF".

I have the same problem here,

add a line in your local hosts
127.0.0.1 kubernetes.docker.internal

@hantsy
Copy link

hantsy commented Mar 9, 2020

@phonzia Got the same issues.

@Hemaprasanthi
Copy link

I fixed this by restarting the docker-desktop

@anitconsultantllc
Copy link

If you didn't uninstall or disable your anti-virus program before installing Docker Desktop on Windows 10 (Enterprise) and it's Kubernetes will not start, this may help you. I've been troubleshooting this for over a week now and finally resolved it. No matter how many times I uninstalled, then reinstalled Docker in ANY instance I ran into the same problem with Kubernetes never finally starting. If I ONLY followed instructions well I could have avoided all these issues and I must say Docker does warn you (see image). Unfortunately, they weren't very clear in there message about which pieces would fail but nonetheless (see warning below).

image

In short, my anti-virus program put a lock on the host file so Docker could never update it and add this line, "127.0.0.1 kubernetes.docker.internal', in my local hosts file, "C:\Windows\System32\drivers\etc\hosts".

So either uninstall your anti-virus as warned or find the setting within your anti-virus program that prevents updates to your local host file and turn it off like I did with mine here.
image

Then add a line in your hosts file, "C:\Windows\System32\drivers\etc\hosts", save it, re-open and verify it saved correctly(important). This is important because on Windows 10 Enterprise you must open notepad in Administrator's mode by typing notepad in the run dialog box then when it's visible right-click on it and choose "Run As Administrator", in order to save the file.
image

 127.0.0.1 kubernetes.docker.internal

I tested the hosts file change by using a Powershell commandlet, "Resolve-DnsName", and could finally see that "kubernetes.docker.internal" was resolving.
image

However, simply restarting Docker Desktop didn't resolve my issue.
image

Instead, I had to follow a more thorough cleansing of Docker Desktop to get it working again. So, I then followed maddy10s, "Docker Reset Sequence", by following steps below. Yes, even though his issue was originally reported as a MAC issue, not Windows, it worked for me and I experienced the same issues below.

  1. kubectl config delete-context docker-for-desktop (optional)
  2. kubectl config delete-cluster docker-desktop (optional)
  3. Reset to Factory defaults
  4. Enable Kubernetes.
  5. Here I waited for quite long time it was still showing installing kubernetes cluster.
  6. Then I clicked on Run in background. Make sure cluster is installed by running kubectl config view
  7. Restarted Docker
  8. Now both Docker and Kubernetes are running

I hope this helps save you some time. I hope the Docker Developers start reporting error's a bit more stringently both in their documentation and as their installer runs into these types of issues. I mean really, couldn't a warning message not been thrown once you weren't able to update the hosts file locally? We've all written that code at some point as developers. Good day (END OF SOAPBOX).

systeminfo

OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.18363 N/A Build 18363
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Total Physical Memory: 16,307 MB
System Model: Alienware 18
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 60 Stepping 3 GenuineIntel ~2801 Mhz

@Diluka
Copy link

Diluka commented Apr 22, 2020

47A10DD9-CCC7-4F86-A58C-3E1C80017E2E/20200422144701

@abdullahanwar
Copy link

This is still not solved. I am on 2.1.0.5 Docker.

  • Change DNS to fixed and use 8.8.8.8, this is within docker for window's settings
  • Remove the .kube config folder
  • Add the KUBECONFIG environment variable to System Variables and have the path be C:\Users[MYUSER].kube\config. Note that before I had it set as a User Variable.
  • Remove c:\ProgramData\DockerDesktop\pki
  • Disable Windows Firewall and Windows Defender
  • Reset to factory defaults

I always get the same "Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: EOF".

I have the same problem here,

add a line in your local hosts
127.0.0.1 kubernetes.docker.internal

adding line in /etc/hosts didn't solve the issue, still showing, "can't list nodes

Had anyone able to solve the issue ??

@proxyserver2023
Copy link

proxyserver2023 commented May 8, 2020

My K8S installation Journey on Mac -

  • stable version was giving me this issue
  • then after reading through issues reinstalling to edge
  • tried to keep on eyes with this log
 pred='process matches ".*(ocker|vpnkit).*"
  || (process in {"taskgated-helper", "launchservicesd", "kernel"} && eventMessage contains[c] "docker")'
/usr/bin/log stream --style syslog --level=debug --color=always --predicate "$pred"
  • checking my /etc/hosts it was fine.
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost

# Added by Docker Desktop
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section
  • tried Reset to Kubernetes Cluster Did not work
  • tried deleting ~/.kube/ or ~/.kube/config did not work
  • I had two contexts, tried to delete one or the other did not work
docker-desktop
docker-for-desktop
  • when i was doing kubectl cluster-info
    i was getting nothing
  • then again after resetting to factory defaults i lost hope and left as it is
  • then after a day/two (38h) i was seeing kubernetes master is running in kubectl cluster-info, but not KubeDNS
  • the log changed now its trying to list 0/3 | 1/3 | 2/3 nodes.
  • then after a while the KubeDNS was running
KubeDNS is running at https://kubernetes.docker.internal:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
  • tried removing the .pki directory
  • did kubectl -n kube-system get pods
😡  ~ kubectl -n kube-system get pods
NAME                                     READY   STATUS             RESTARTS   AGE
coredns-5644d7b6d9-j826z                 0/1     ImagePullBackOff   0          10m
coredns-5644d7b6d9-mq6hm                 0/1     ImagePullBackOff   0          10m
etcd-docker-desktop                      1/1     Running            0          9m40s
kube-apiserver-docker-desktop            1/1     Running            0          9m36s
kube-controller-manager-docker-desktop   1/1     Running            0          9m33s
kube-proxy-lwbnf                         0/1     ImagePullBackOff   0          10m
kube-scheduler-docker-desktop            1/1     Running            0          9m33s
  • after a while k8s showing GREEN
    image

@Gsonovb
Copy link

Gsonovb commented May 12, 2020

have the same issue

  • Diagnostics ID:FB71B142-CA5F-48F8-BDC7-7AE4445E1394/20200512090644

The k8s of docker desktop does not work properly,

I tried to install minikube myself, no problem.

For some reasons, I can't directly access k8s.gcr.io, etc., so I can't confirm the installation,

Is there an alternative? thank you

@Karrrar
Copy link

Karrrar commented May 30, 2020

I did every thing, delete all config file, reinstall docker desktop nothing works
but
I fix it after i changed the host and port in WSL "P.S im new to kubernetes :)"
$ kubectl config set-cluster docker-desktop --server=https://kubernetes.docker.internal:6443
$ kubectl config set-context docker-desktop --cluster=docker-desktop
$ kubectl config use-context docker-desktop

Good luck

Docker-Desktop Version 2.3.0.3
Engine: 19.03.8
Kubernetes: 1.16.5

@kevinzhamg
Copy link

I don't know what to say. I nearly give up. I tried every method above, but no use.
I solved this issue by waiting for a very very long night (sleeping).

@Hemaprasanthi
Copy link

Hemaprasanthi commented Jul 16, 2020 via email

@kevinzhamg
Copy link

kevinzhamg commented Jul 17, 2020

nope, just let it hanging on background. I changed DNS, deleted ./kube/config and restart Docker and so on. But still no lucky. Then, it maybe fix the issue by itsefl. lmao

@hantsy
Copy link

hantsy commented Jul 17, 2020

Move to minikube and resolve my problem

@infolock
Copy link

infolock commented Oct 5, 2020

This happens to me every time a new update for docker comes out (on mac as well as windows). Today is one of those days (new update). Kubernetes is now stuck at "Starting...". This issue has been around since 2017 from what I can tell from searches.

I'm cool with it If the issue is too difficult to fix, too problamatic to fix, or poses too many other issues to fix. I'd just like to know that instead of finding myself searching fro this error from time to time =) haha.

The solutions for me have been removing the pki folder (as mentioned above) or just doing a complete Reset (and thus, re-install of the containers) of Kubernetes. Not sure what else one can do otherwise.

@docker-robott
Copy link
Collaborator

Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Mar 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests