Minikube: Unable to connect to the server: net/http: TLS handshake timeout

Created on 31 Aug 2018  路  9Comments  路  Source: kubernetes/minikube

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT

Please provide the following details:

Environment: Windows 10 Pro X64

Minikube version minikube version: v0.27.0

  • OS (e.g. from /etc/os-release): Windows 10 Pro X64
  • VM Driver : hyperv
  • ISO version : minikube-v0.26.0.iso

What happened:
Getting following issues
1) Getting TLS handshake timeout for all the commands running from Kubectl.
2) Getting error while launching minikube dashboard

I am behind a corporate proxy running minikube on Win 10 pro. i have seen similar errors for Azure and google cloud too.

Are there any ports on firewall to be opened?

Results of Command run on kubectl below

kubectl get nodes
Unable to connect to the server: net/http: TLS handshake timeout

minikube dashboard
Could not find finalized endpoint being pointed to by kubernetes-dashboard: Error validating service: Error getting service kubernetes-dashboard: Get https://10.246.34.222:8443/api/v1/namespaces/kube-system/services/kubernetes-dashboard: net/http: TLS handshake timeout

causfirewall-or-proxy cdashboard chyperv http-timeout kinbug lifecyclrotten owindows triagnot-reproducible

Most helpful comment

I had similar issue when I started back my minikube installation. kubectl get nodes was returning but all other commands were giving Unable to connect to the server: net/http: TLS handshake timeout

After a few minutes, kubectl started functioning. I checked what is available and there were pods running in the k8s cluster. Apparently, I woke up all deployments when I do minikube start which put some load on Master so this made minikube unavailable temporarily.

All 9 comments

It sounds like your proxy software is capturing traffic intended to go to a local HyperV container. I'd raise the issue with your IT staff on how to configure it so that traffic destined for 10.246.0.0 is not proxied.

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

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

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

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

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

I had similar issue when I started back my minikube installation. kubectl get nodes was returning but all other commands were giving Unable to connect to the server: net/http: TLS handshake timeout

After a few minutes, kubectl started functioning. I checked what is available and there were pods running in the k8s cluster. Apparently, I woke up all deployments when I do minikube start which put some load on Master so this made minikube unavailable temporarily.

Whenever this happens to me, the minikube VM's memory demand is exceeding its assigned memory. What works for me is shutting down the VM, going to settings > memory and increasing its RAM.

getting this issues most of the time...

Unable to connect to the server: net/http: TLS handshake timeout

@omeryounus - this bug is from 2018, where minikube had very different behaviors. Do you mind opening a new issue? Please include the output of minikube start and minikube logs. Thank you!

But it's still happening with latest version. I had to delete everything and reinstall. So if it start to hapened again I will create the issue.

ashwin@ashwin-Aspire-E5-573G:~/Desktop$ kubectl get all
NAME READY STATUS RESTARTS AGE
pod/api-gateway-85944f447b-dvx5k 1/1 Running 0 32m
pod/position-simulator-54c465565f-pkx47 1/1 Running 0 32m
pod/position-tracker-7964b5474f-7rtzj 1/1 Running 0 4m32s
pod/queue-68799ffccd-68spd 1/1 Running 0 32m
pod/webapp-6d4bd8866f-c474g 1/1 Running 3 32m

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/fleetman-api-gateway NodePort 10.103.181.24 <none> 8080:30020/TCP 30m
service/fleetman-position-tracker ClusterIP 10.101.124.215 <none> 8080/TCP 30m
service/fleetman-queue NodePort 10.101.166.186 <none> 8161:30010/TCP,61616:30356/TCP 30m
service/fleetman-webapp NodePort 10.100.151.96 <none> 80:30080/TCP 30m
service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 6d23h

NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/api-gateway 1/1 1 1 32m
deployment.apps/position-simulator 1/1 1 1 32m
deployment.apps/position-tracker 1/1 1 1 32m
deployment.apps/queue 1/1 1 1 32m
deployment.apps/webapp 1/1 1 1 32m

NAME DESIRED CURRENT READY AGE
replicaset.apps/api-gateway-85944f447b 1 1 1 32m
replicaset.apps/position-simulator-54c465565f 1 1 1 32m
replicaset.apps/position-tracker-7964b5474f 1 1 1 32m
replicaset.apps/queue-68799ffccd 1 1 1 32m
replicaset.apps/webapp-6d4bd8866f 1 1 1 32m
ashwin@ashwin-Aspire-E5-573G:~/Desktop$ kubectl get all
Unable to connect to the server: net/http: TLS handshake timeout

Everything was running properly and suddenly started experiencing when I did
kubectl get all
Workaround is: stop minikube, delete minikube and start with increasing the RAM used by minikube (this also depends on your laptops RAM) command
minikube start --memory=4096 --driver=docker
My driver is docker yours can be anything

Was this page helpful?
0 / 5 - 0 ratings