Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT
Minikube version (use minikube version
):
minikube v0.18.0
Environment:
macOS 10.12.4
cat ~/.minikube/machines/minikube/config.json | grep DriverName
):"DriverName": "virtualbox"
cat ~/.minikube/machines/minikube/config.json | grep -i ISO
or minikube ssh cat /etc/VERSION
):"Boot2DockerURL": "file:///Users/conradwt/.minikube/cache/iso/minikube-0.7.iso"
What happened:
When I execute
$ minikube start --vm-driver=xhyve
Starting local Kubernetes cluster...
Starting VM...
SSH-ing files into VM...
Setting up certs...
Starting cluster components...
Connecting to cluster...
Setting up kubeconfig...
Kubectl is now configured to use the cluster.
$ kubectl config use-context minikube
Switched to context "minikube".
$ kubectl cluster-info
I get the following message
The connection to the server 192.168.99.100:8443 was refused - did you specify the right host or port?
What you expected to happen:
I expected see the information about my Kubernetes cluster.
How to reproduce it (as minimally and precisely as possible):
$ minikube start --vm-driver=xhyve
$ kubectl config use-context minikube
$ kubectl cluster-info
Anything else do we need to know:
Yes, I was following steps at the following link:
https://kubernetes.io/docs/tutorials/stateless-application/hello-minikube/
Can you share the output of minikube logs
?
@r2d4 @conradwt I am getting the same issue with minikube v0.18 and kubernetes v1.6.2. When I execute the command minikube logs I get:
2017/04/26 11:46:04 Error getting machine logs: Something went wrong running an SSH command!
command : sudo journalctl -u localkube
err : exit status 1
output : sudo: journalctl: command not found
E0426 11:46:04.121529 3363 util.go:142] Error formatting error message: Error msg with no stack trace cannot be reported
@conradwt I downgraded minikube to v0.17.1 and it is working again.
BTW I am using macOS.
@leandrob13 what version of docker-machine-driver-xhyve are you using? I had this same problem until I ran brew upgrade docker-machine-driver-xhyve
and now it all works on minikube 0.18.0
Hello guys, today I upgraded to minikube 0.18 and kubernetes 1.6.0 on Ubuntu 16.04 and had this exact problem.
For me the culprit was a bad yaml file for kubernetes configuration.
An example:
apiVersion: v1
data:
.dockercfg: "whatever"
kind: Secret
metadata:
name: "docker-registry"
namespace: default
type: kubernetes.io/dockercfg
The problem is .dockercfg
which should be written as:
'.dockercfg': "whatever"
Same issue here on Mac OSX and downgrading to minikube to v0.17.1 also solved my problem.
Also had the same error as @leandrob13 for the logs.
Same issue here on Mac OSX and intend to downgrade minikube to 0.17.x
Experiencing 0.18.0 and 0.19.0 happens that issue to me all the time...
Likewise, minikube
v0.18.0 and v0.19.0 don't work (exact same error behavior during startup). v0.17.1 however, works.
Did you try running minikube delete
after installing v0.19.0 to delete your local Kubernetes cluster from your previous version of minikube? I was able to get v0.19.0 working by doing that. Then I just ran minikube start
again, and it worked.
More info from my end
$ minikube status
minikubeVM: Running
localkube: Stopped
$ minikube log
---
May 16 16:03:33 minikube localkube[9484]: apiserver is ready!
May 16 16:03:33 minikube localkube[9484]: Starting controller-manager...
May 16 16:03:33 minikube localkube[9484]: Waiting for controller-manager to be healthy...
May 16 16:03:33 minikube localkube[9484]: I0516 16:03:33.020303 9484 leaderelection.go:179] attempting to acquire leader lease...
May 16 16:03:33 minikube localkube[9484]: I0516 16:03:33.024179 9484 leaderelection.go:189] successfully acquired lease kube-system/kube-controller-manager
May 16 16:03:33 minikube localkube[9484]: I0516 16:03:33.024440 9484 event.go:217] Event(v1.ObjectReference{Kind:"Endpoints", Namespace:"kube-system", Name:"kube-controller-manager", UID:"3c24b641-3a2a-11e7-97b8-0800275a9045", APIVersion:"v1", ResourceVersion:"2986", FieldPath:""}): type: 'Normal' reason: 'LeaderElection' minikube became leader
May 16 16:03:33 minikube localkube[9484]: I0516 16:03:33.081839 9484 controllermanager.go:437] Started "horizontalpodautoscaling"
May 16 16:03:33 minikube localkube[9484]: I0516 16:03:33.082490 9484 controllermanager.go:437] Started "statefuleset"
May 16 16:03:33 minikube localkube[9484]: I0516 16:03:33.082841 9484 controllermanager.go:437] Started "cronjob"
May 16 16:03:33 minikube localkube[9484]: I0516 16:03:33.083094 9484 controllermanager.go:437] Started "podgc"
May 16 16:03:33 minikube localkube[9484]: I0516 16:03:33.084900 9484 controllermanager.go:437] Started "resourcequota"
May 16 16:03:33 minikube localkube[9484]: I0516 16:03:33.086607 9484 controllermanager.go:437] Started "daemonset"
May 16 16:03:33 minikube localkube[9484]: E0516 16:03:33.086934 9484 certificates.go:38] Failed to start certificate controller: open /etc/kubernetes/ca/ca.pem: no such file or directory
May 16 16:03:33 minikube localkube[9484]: W0516 16:03:33.086958 9484 controllermanager.go:434] Skipping "certificatesigningrequests"
May 16 16:03:33 minikube localkube[9484]: W0516 16:03:33.086976 9484 controllermanager.go:421] "bootstrapsigner" is disabled
May 16 16:03:33 minikube localkube[9484]: W0516 16:03:33.087004 9484 registered.go:288] Could not find groupMeta for k8s.io
May 16 16:03:33 minikube localkube[9484]: panic: runtime error: invalid memory address or nil pointer dereference
May 16 16:03:33 minikube localkube[9484]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x179e3b2]
May 16 16:03:33 minikube localkube[9484]: goroutine 1905 [running]:
May 16 16:03:33 minikube localkube[9484]: panic(0x37d74c0, 0xc420016030)
May 16 16:03:33 minikube localkube[9484]: /usr/local/go/src/runtime/panic.go:500 +0x1a1
May 16 16:03:33 minikube localkube[9484]: k8s.io/minikube/vendor/k8s.io/apimachinery/pkg/apimachinery/registered.(*APIRegistrationManager).RESTMapper(0xc42014c0a0, 0x0, 0x0, 0x0, 0xffffffff, 0xc422f9d208)
May 16 16:03:33 minikube localkube[9484]: /go/src/k8s.io/minikube/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go:290 +0x2a2
May 16 16:03:33 minikube localkube[9484]: k8s.io/minikube/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app.startGarbageCollectorController(0x68dfca0, 0xc422336700, 0x68eacc0, 0xc4227753e0, 0x0, 0x0, 0x0, 0x0, 0xc4201866f0, 0x1, ...)
May 16 16:03:33 minikube localkube[9484]: /go/src/k8s.io/minikube/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/core.go:166 +0x6d
May 16 16:03:33 minikube localkube[9484]: k8s.io/minikube/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app.StartControllers(0xc4227746f0, 0xc420b482c0, 0x68dfca0, 0xc422336700, 0x68dfca0, 0xc422336700, 0xc4222cfc20, 0x0, 0x0)
May 16 16:03:33 minikube localkube[9484]: /go/src/k8s.io/minikube/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/controllermanager.go:428 +0x5b3
May 16 16:03:33 minikube localkube[9484]: k8s.io/minikube/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app.Run.func2(0xc4222cfc20)
May 16 16:03:33 minikube localkube[9484]: /go/src/k8s.io/minikube/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/controllermanager.go:180 +0xc6
May 16 16:03:33 minikube localkube[9484]: created by k8s.io/minikube/vendor/k8s.io/kubernetes/pkg/client/leaderelection.(*LeaderElector).Run
May 16 16:03:33 minikube localkube[9484]: /go/src/k8s.io/minikube/vendor/k8s.io/kubernetes/pkg/client/leaderelection/leaderelection.go:150 +0x97
May 16 16:03:33 minikube systemd[1]: localkube.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
May 16 16:03:33 minikube systemd[1]: localkube.service: Unit entered failed state.
May 16 16:03:33 minikube systemd[1]: localkube.service: Failed with result 'exit-code'.
May 16 16:03:36 minikube systemd[1]: localkube.service: Service hold-off time over, scheduling restart.
May 16 16:03:36 minikube systemd[1]: Stopped Localkube.
May 16 16:03:36 minikube systemd[1]: Starting Localkube...
May 16 16:03:36 minikube localkube[9526]: name = kubeetcd
May 16 16:03:36 minikube localkube[9526]: data dir = /var/lib/localkube/etcd
May 16 16:03:36 minikube localkube[9526]: member dir = /var/lib/localkube/etcd/member
May 16 16:03:36 minikube localkube[9526]: heartbeat = 100ms
May 16 16:03:36 minikube localkube[9526]: election = 1000ms
May 16 16:03:36 minikube localkube[9526]: snapshot count = 10000
May 16 16:03:36 minikube localkube[9526]: advertise client URLs = http://0.0.0.0:2379
May 16 16:03:36 minikube localkube[9526]: restarting member fcf2ad36debdd5bb in cluster 7f055ae3b0912328 at commit index 7310
May 16 16:03:36 minikube localkube[9526]: fcf2ad36debdd5bb became follower at term 155
May 16 16:03:36 minikube localkube[9526]: newRaft fcf2ad36debdd5bb [peers: [], term: 155, commit: 7310, applied: 0, lastindex: 7310, lastterm: 155]
May 16 16:03:36 minikube localkube[9526]: starting server... [version: 3.0.17, cluster version: to_be_decided]
May 16 16:03:36 minikube localkube[9526]: localkube host ip address: 10.0.2.15
May 16 16:03:36 minikube localkube[9526]: added member fcf2ad36debdd5bb [http://0.0.0.0:2380] to cluster 7f055ae3b0912328
May 16 16:03:36 minikube localkube[9526]: set the initial cluster version to 3.0
May 16 16:03:36 minikube localkube[9526]: enabled capabilities for version 3.0
May 16 16:03:36 minikube localkube[9526]: Starting apiserver...
May 16 16:03:36 minikube localkube[9526]: Waiting for apiserver to be healthy...
May 16 16:03:36 minikube localkube[9526]: W0516 16:03:36.776309 9526 authentication.go:362] AnonymousAuth is not allowed with the AllowAll authorizer. Resetting AnonymousAuth to false. You should use a different authorizer
Any idea how we tackle this issue ? It's taking too much time to get the k8s environment running again by minikube stop && minikube delete && minikube start
OK I found a work around solution: delete all thirdpartyresource before stop the machine.
@ngtuna can you explain what you mean please?
@amitsaha I found that tpr causes the problem. If I delete them before minikube stop then I can start it again safely. Otherwise it keeps saying as title. I recall some guys also talking about the problem of minikube with tpr somewhere but just can't refer to that discussion now.
@ngtuna thanks. Sorry, I am just getting familiar with kubernetes and minikube. Where is the "tpr" that I should delete?
I ran into this as well, with minikube 0.19, but with identical logs (e.g. the journalctl
thing). @sjking suggestion solved it for me; after the delete
of the old machine, the newer minikube downloaded the ISO -- something it didn't too earlier on -- and spun up a happy k8s.
@amitsaha Just my case. I don't know how it works with everyone. But I figured out if I delete all thirdpartyresource I have, then it works. You can check if you have it: kubectl get thirdpartyresource
This should be fixed in 0.19.1
Sorry, still getting it in 0.19. (#1546)
@ngtuna thanks. I get the same error:
$ kubectl get thirdpartyresource
The connection to the server 192.168.99.118:8443 was refused - did you specify the right host or port?
Hello,
I have tried several installation in all different machine but after reboot i get same error. i dont know what to do and it is pretty disappointing. please suggest.
The connection to the server 192.168.48.141:6443 was refused - did you specify the right host or port?
Same issue with minikube v.0.20.0
And minikube version: v0.24.1
Hi guys, I have the same issue, have you found a solution?
Thanks,
Same issue on Mac with minikube v0.26.1, any solution?
Similar issue on Ubuntu with v0.26.1
Downgrading fixed the problem.
Hi Guys
I am facing the similar issue, minikube version: v0.28.0
I can access minikube dashboard however, I am getting _refused to connect error_ for all exposed services.
Hi Guys
I am facing the similar issue, minikube version: v0.28.0
I can access minikube dashboard however, I am getting refused to connect error for all exposed services.
same here, The connection to the server 192.168.99.100:8443 was refused - did you specify the right host or port?
Many Users are facing similar Issue, why no traction on this.
Same here. Clean install, Linux, --vm-driver=none
root@xxxxxx:~# kubectl cluster-info
Kubernetes master is running at https://10.xx.xx.xx:8443
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
The connection to the server 10.xx.xx.xx:8443 was refused - did you specify the right host or port?
root@xxxxxx:~# minikube status
minikube: Running
cluster: Running
kubectl: Correctly Configured: pointing to minikube-vm at 10.xx.xx.xx
root@xxxxxx:~# minikube version
minikube version: v0.28.1
I can also confirm to have this issue, Linux Mint 18.3 Host operating system with minikube.
Tail of log:
Jul 26 06:38:31 minikube kubelet[13564]: I0726 06:38:31.761505 13564 kuberuntime_manager.go:513] Container {Name:postgres Image:dev_postgres:local Command:[] Args:[] WorkingDir: Ports:[{Name: HostPort:0 ContainerPort:5432 Protocol:TCP HostIP:}] EnvFrom:[] Env:[] Resources:{Limits:map[] Requests:map[]} VolumeMounts:[{Name:default-token-c6knw ReadOnly:true MountPath:/var/run/secrets/kubernetes.io/serviceaccount SubPath: MountPropagation:<nil>}] VolumeDevices:[] LivenessProbe:nil ReadinessProbe:nil Lifecycle:nil TerminationMessagePath:/dev/termination-log TerminationMessagePolicy:File ImagePullPolicy:Never SecurityContext:nil Stdin:false StdinOnce:false TTY:false} is dead, but RestartPolicy says that we should restart it.
Jul 26 06:38:32 minikube kubelet[13564]: E0726 06:38:32.274566 13564 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:460: Failed to list *v1.Node: Get https://192.168.99.102:8443/api/v1/nodes?fieldSelector=metadata.name%3Dminikube&limit=500&resourceVersion=0: dial tcp 192.168.99.102:8443: getsockopt: connection refused
Jul 26 06:38:32 minikube kubelet[13564]: E0726 06:38:32.404531 13564 kubelet_node_status.go:374] Error updating node status, will retry: error getting node "minikube": Get https://192.168.99.102:8443/api/v1/nodes/minikube?resourceVersion=0&timeout=10s: dial tcp 192.168.99.102:8443: getsockopt: connection refused
Seeing something like this on Ubuntu 18.04 and minikube 0.28.2, it renders minikube practically unusable.
Tail of log:
Aug 22 13:04:23 minikube kubelet[2816]: E0822 13:04:23.676999 2816 kubelet_node_status.go:374] Error updating node status, will retry: error getting node "minikube": Get https://localhost:8443/api/v1/nodes/minikube?timeout=10s: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
Seeing it in 0.28.2 on MacOS also with Kubectl 1.10.
It's intermittent
Same issue, minikube version: v0.28.0, macOS 10.13.3
Confirmed! minikube delete
and minikube start
will resolve the issue on MacOS.
Any fixes here?
What worked for me was to list the contexts
kubectl config get-contexts
and then use the minikube
context
kubectl config use-context minikube
Ubuntu 18 and minikube 0.28 is working, but on Mac 0.28 connection is refused, the ports opened are 30000, 22, 111, 2049
What worked for me was to list the contexts
kubectl config get-contexts
and then use the
minikube
contextkubectl config use-context minikube
It does not worked on Mac.
Was having this issue on macos 0.30 and performing a minikube delete
followed by minikube start
resolved the problem.
I am having the same issue here. I have done minikube delete and minikube start several times but the same issue persists. Minikube version is 0.30 on Ubuntu 18.04.
Confirmed!
minikube delete
andminikube start
will resolve the issue on MacOS.
I'll check that.
same issue persist several times minikube delete and Error from server (NotAcceptable): unknown (get pods) start will not resolve the issue getting the
Most helpful comment
And minikube version: v0.24.1