rancher-sandbox / rancher-desktop

Container Management and Kubernetes on the Desktop
https://rancherdesktop.io
Apache License 2.0
6.01k stars 283 forks source link

Cannot Start Kubernetes - Client network socket disconnected before secure TLS connection was established #3428

Open NicolaAtorino opened 1 year ago

NicolaAtorino commented 1 year ago

Actual Behavior

I am starting Rancher Desktop, but during startup it fails to initialize k8s due to issues (probably) with k3s.

Steps to Reproduce

install and start rancher

Result

error while initializing kubernetes.

2022-11-21T18:11:07.690Z: Waiting for K3s server to be ready on port 6443... 2022-11-21T18:11:29.857Z: Error: Client network socket disconnected before secure TLS connection was established

logs attached.

Expected Behavior

kubernetes to start correctly.

Additional Information

kubernetes port is 6443

logs.zip

Rancher Desktop Version

1.6.2

Rancher Desktop K8s Version

1.25.3

Which container engine are you using?

moby (docker cli)

What operating system are you using?

Windows

Operating System / Build Version

windows 10 pro

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

No response

Windows User Only

ZScaler VPN

NicolaAtorino commented 1 year ago

Diagnostics on Rancher Desktop says 'no problems detected' - 0 failed plus 0 muted

Nino-K commented 1 year ago

@NicolaAtorino unfortunately the logs you have attached are emtpy.

NicolaAtorino commented 1 year ago

logs.zip

sorry, logs reattached.

Moreover, when i reopened rancher this morning the first thing it showed was this message :

image

rumstead commented 1 year ago

I have some folks on windows experiencing this issue as well. We are using zscaler as a transparent proxy and I wonder if it is intercepting any of the traffic. I see a strange x509 error in the logs for what looks like the IP of the API Server.

The Kubernetes control plane containers start up fine. k3s.log

I0113 13:34:00.327001     907 secure_serving.go:210] Serving securely on 127.0.0.1:6444
time="2023-01-13T13:34:01Z" level=info msg="Kube API server is now running"
time="2023-01-13T13:34:01Z" level=info msg="ETCD server is now running"
time="2023-01-13T13:34:01Z" level=info msg="k3s is up and running"

time="2023-01-13T13:34:01Z" level=info msg="Proxy done" err="context canceled" url="wss://127.0.0.1:6443/v1-k3s/connect"
time="2023-01-13T13:34:01Z" level=info msg="error in remotedialer server [400]: websocket: close 1006 (abnormal closure): unexpected EOF"
time="2023-01-13T13:34:01Z" level=info msg="certificate CN=k3s,O=k3s signed by CN=k3s-server-ca@1673592565: notBefore=2023-01-13 06:49:25 +0000 UTC notAfter=2024-01-13 13:34:01 +0000 UTC"
time="2023-01-13T13:34:01Z" level=error msg="Failed to connect to proxy. Empty dialer response" error="x509: certificate is valid for 10.43.0.1, 127.0.0.1, 172.28.93.150, 172.28.94.92, ::1, not 172.28.91.117"
time="2023-01-13T13:34:01Z" level=error msg="Remotedialer proxy error" error="x509: certificate is valid for 10.43.0.1, 127.0.0.1, 172.28.93.150, 172.28.94.92, ::1, not 172.28.91.117"

k8s.log

2023-01-13T13:33:11.006Z: Updating release version cache with 122 items in cache
2023-01-13T13:33:14.264Z: Found old version v1.26.0+k3s2, stopping.
2023-01-13T13:33:14.266Z: Got 122 versions.
2023-01-13T13:33:17.086Z: Ensuring images available for K3s 1.25.3
2023-01-13T13:33:23.097Z: Cache at C:\Users\foo\AppData\Local\rancher-desktop\cache\k3s is valid.
2023-01-13T13:33:57.966Z: Waiting for K3s server to be ready on port 6443...
2023-01-13T13:34:21.536Z: Error: Client network socket disconnected before secure TLS connection was established
2023-01-13T13:34:22.479Z: Updating kubeconfig C:\Users\foo\.kube\config...
2023-01-13T13:39:36.540Z: Waited more than 300 secs for kubernetes to fully start up. Giving up.
2023-01-13T13:40:39.754Z: Error priming kuberlr: Error: C:\Users\foo\AppData\Local\Programs\Rancher Desktop\resources\resources\win32\bin\kubectl.exe exited with code 1
2023-01-13T13:40:39.754Z: Output from kuberlr:
ex.stdout: [
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
],
ex.stderr: [I0113 14:39:41.919631   31820 versioner.go:56] Remote kubernetes server unreachable
Unable to connect to the server: EOF
]
2023-01-13T13:40:39.754Z: Failed to match a kuberlr network access issue.

background.log

2023-01-13T13:33:10.924Z: Stopping background process Win32 socket proxy.
2023-01-13T13:33:10.927Z: mainEvents settings-update: {"version":4,"kubernetes":{"version":"1.25.3","memoryInGB":2,"numberCPUs":2,"port":6443,"containerEngine":"moby","checkForExistingKimBuilder":false,"enabled":true,"WSLIntegrations":{},"options":{"traefik":true,"flannel":true},"suppressSudo":false,"hostResolver":true,"experimental":{"socketVMNet":false}},"portForwarding":{"includeKubernetesServices":false},"images":{"showAll":true,"namespace":"k8s.io"},"telemetry":true,"updater":true,"debug":false,"pathManagementStrategy":"notset","diagnostics":{"showMuted":false,"mutedChecks":{}},"containerEngine":{"imageAllowList":{"enabled":false,"locked":false,"patterns":[]}}}
2023-01-13T13:33:11.024Z: Stopping background process Win32 socket proxy.
2023-01-13T13:33:17.025Z: Launching background process Win32 socket proxy.
2023-01-13T13:33:17.293Z: Launching background process Vtunnel Host Process.
2023-01-13T13:33:23.098Z: Stopping background process host-resolver vsock host.
2023-01-13T13:33:29.376Z: Background process Vtunnel Host Process exited with status 1 signal null
2023-01-13T13:33:30.385Z: Launching background process Vtunnel Host Process.
2023-01-13T13:33:40.694Z: Background process Vtunnel Host Process exited with status 1 signal null
2023-01-13T13:33:41.696Z: Launching background process Vtunnel Host Process.
2023-01-13T13:33:42.563Z: Launching background process host-resolver vsock host.
2023-01-13T13:33:47.557Z: Background process Win32 socket proxy exited with status 1 signal null
2023-01-13T13:33:48.564Z: Launching background process Win32 socket proxy.
2023-01-13T13:33:51.942Z: Background process Vtunnel Host Process exited with status 1 signal null
2023-01-13T13:33:52.952Z: Launching background process Vtunnel Host Process.
2023-01-13T13:33:52.983Z: Background process host-resolver vsock host exited with status 1 signal null
2023-01-13T13:33:53.986Z: Launching background process host-resolver vsock host.
2023-01-13T13:34:18.814Z: Background process Win32 socket proxy exited with status 1 signal null
2023-01-13T13:34:19.821Z: Launching background process Win32 socket proxy.
2023-01-13T13:40:39.776Z: Stopping background process Win32 socket proxy.
2023-01-13T13:40:39.854Z: Kubernetes was unable to start: Error: Client network socket disconnected before secure TLS connection was established
    at connResetException (node:internal/errors:691:14)
    at TLSSocket.onConnectEnd (node:_tls_wrap:1585:19)
    at TLSSocket.emit (node:events:402:35)
    at endReadableNT (node:internal/streams/readable:1343:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'ECONNRESET',
  path: null,
  host: '172.28.91.117',
  port: '6443',
  localAddress: undefined
}
2023-01-13T13:40:39.855Z: Background process Win32 socket proxy exited gracefully.