Minikube: The connection to the server 192.168.99.100:8443 was refused - did you specify the right host or port?

Created on 16 May 2017  路  14Comments  路  Source: kubernetes/minikube

This is a BUG REPORT

Minikube version (use minikube version):
minikube version: v0.19.0

Environment:

  • OS
    MacOS
  • VM Driver
    Virtualbox
  • ISO version
    "Boot2DockerURL": "file:///Users/tuna/.minikube/cache/iso/minikube-v0.18.0.iso"

What happened:
The connection to apiserver is unstable after starting k8s

Tunas-MacBook-Pro:kubeless tuna$ kubectl get po --all-namespaces
The connection to the server 192.168.99.100:8443 was refused - did you specify the right host or port?
Tunas-MacBook-Pro:kubeless tuna$ kubectl get po --all-namespaces
NAMESPACE     NAME                                    READY     STATUS    RESTARTS   AGE
kube-system   kube-addon-manager-minikube             1/1       Running   0          7h
kube-system   kube-dns-268032401-xcw9q                3/3       Running   0          7h
kube-system   kubernetes-dashboard-68l5t              1/1       Running   0          7h
Tunas-MacBook-Pro:kubeless tuna$ kubectl get po --all-namespaces
The connection to the server 192.168.99.100:8443 was refused - did you specify the right host or port?
Tunas-MacBook-Pro:kubeless tuna$ kubectl get po --all-namespaces
NAMESPACE     NAME                                    READY     STATUS    RESTARTS   AGE
kube-system   kube-addon-manager-minikube             1/1       Running   0          7h
kube-system   kube-dns-268032401-xcw9q                3/3       Running   0          7h
kube-system   kubernetes-dashboard-68l5t              1/1       Running   0          7h
Tunas-MacBook-Pro:kubeless tuna$ kubectl get po --all-namespaces 
The connection to the server 192.168.99.100:8443 was refused - did you specify the right host or port?
Tunas-MacBook-Pro:kubeless tuna$ kubectl get po --all-namespaces 
The connection to the server 192.168.99.100:8443 was refused - did you specify the right host or port?
Tunas-MacBook-Pro:kubeless tuna$ kubectl get po --all-namespaces 
NAMESPACE     NAME                                    READY     STATUS    RESTARTS   AGE
kube-system   kube-addon-manager-minikube             1/1       Running   0          7h
kube-system   kube-dns-268032401-xcw9q                3/3       Running   0          7h
kube-system   kubernetes-dashboard-68l5t              1/1       Running   0          7h
Tunas-MacBook-Pro:kubeless tuna$ kubectl get po --all-namespaces 
The connection to the server 192.168.99.100:8443 was refused - did you specify the right host or port?

SSH-ing into minikube and see no container running, I think it ends up with on-off

$ minikube ssh
$ docker ps    
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

What you expected to happen:
Stability

How to reproduce it (as minimally and precisely as possible):

$ minikube start
$ kubectl get po --all-namespaces

Anything else do we need to know:
It's not happening all the time. Sometime it works and sometime it doesn't. But I've never seen this issue with the minikube v0.17.x or older

Most helpful comment

Had the same problem.
Apparently issue was with minikube.
Solved by :
minikube delete
minikube start

All 14 comments

I'm pretty sure this is #1496. Can you share minikube logs? It's related to TPRs and should have been fixed with 0.19, but wasn't. https://github.com/kubernetes/minikube/issues/1496#issuecomment-301592582

Yeah. But sorry I was just removing minikube so the log is gone. Will post it once it happens again. I just found it's duplicated with https://github.com/kubernetes/minikube/issues/1381 so I am gonna close this issue and keep my eyes on #1496 and #1381

I'm getting the same error when I stop/start minikube. The only workaround for me is to delete the VM and create it again but that's not a good thing.

Is there any workaround until this PR is released?

thanks

@jmiddleton Yes workaround is deleting all thirdpartyresource before stop the machine.

I have effectively the same issue - connection refused (but not instability - it just never works)

kubectl get po --all-namespaces
The connection to the server 192.168.99.100:8443 was refused - did you specify the right host or port?

I ran into the same issue when upgrading minikube binary from v0.17.0 to v0.19.0. After upgraded to minikube v0.19.1 and deleted VirtualBox VM manually, restart minikube works now.

for me this is random function sometimes it will refuse sometimes it will show details.

kubectl get po --all-namespaces

i installed kubectl and others using kubeam.

is there anything to do with following lines for this issue. i am getting this error after followin glines are added to api-server start.

- --anonymous-auth=false
- --basic-auth-file=/etc/kubernetes/manifests/pausr.csv

further i found out that - --basic-auth-file=/etc/kubernetes/manifests/pausr.csv
line course the problem. and inside that file i have added
nalin,nalin,nalin

is this wrong file is in correct location.

The connection to the server 192.168.1.50:6443 was refused - did you specify the right host or port?
The same problem

In your case, you might want to try port 8443 rather than 6443

just restart your vm, then [minikube start]

Another source of issues is the minikube disk size, if you don't specify any, the default is 20g, with large docker images, you can quickly run out of space and minikube stops responding, I had to run docker system prune to get it to work again.

the same problem:
macos os 10.14.3
minikube: v0.35.0
kubernetes: v1.13.4

Return to normal after deleting '--extra-config=apiserver.authorization-mode=RBAC' AND '--extra-config=kubelet.PodsPerCore=5'

Had the same problem.
Apparently issue was with minikube.
Solved by :
minikube delete
minikube start

Was this page helpful?
0 / 5 - 0 ratings