Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when executing minishift start: connect: connection refused

Tags:

  • Windows 10
  • CDK v3.9 / Minishift 1.34
  • VirtualBox v5.2.32 (also tried v6.0.10)

I'm trying to start minishift/cdk but keep getting an error. After reading many other reports with a similar error it's not clear what the solution might be.

  • I'm not on a slow computer or slow network connection
  • I've tried disabling the firewall. Doesn't help but I don't think that's the problem since the server partially starts and I can do a minishift ssh into the server
  • I've tried using a command prompt with admin rights I'm new to Minishift so am unsure where to look next.
C:\cdk>minishift start
-- Starting profile 'minishift'
<snip>
-- Copying oc binary from the OpenShift container image to VM ... OK
-- Starting OpenShift cluster .................................................................Error during 'cluster up' execution: Error starting the cluster. ssh command error:
command : /var/lib/minishift/bin/oc cluster up --image 'registry.access.redhat.com/openshift3/ose-${component}:v3.11.104' --public-hostname 192.168.99.100 --routing-suffix 192.168.99.100.nip.io --base-dir /var/lib/minishift/base
err     : exit status 1
output  : Getting a Docker client ...
Checking if image registry.access.redhat.com/openshift3/ose-control-plane:v3.11.104 is available ...
Checking type of volume mount ...
Determining server IP ...
Using public hostname IP 192.168.99.100 as the host IP
Checking if OpenShift is already running ...
Checking for supported Docker version (=>1.22) ...
Checking if insecured registry is configured properly in Docker ...
Checking if required ports are available ...
Checking if OpenShift client is configured properly ...
Checking if image registry.access.redhat.com/openshift3/ose-control-plane:v3.11.104 is available ...
Starting OpenShift using registry.access.redhat.com/openshift3/ose-control-plane:v3.11.104 ...
I0809 19:32:23.621656    2964 flags.go:30] Running "create-kubelet-flags"
I0809 19:32:24.474547    2964 run_kubelet.go:49] Running "start-kubelet"
I0809 19:32:24.921489    2964 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready ...
E0809 19:37:24.935726    2964 run_self_hosted.go:571] API server error: Get https://192.168.99.100:8443/healthz?timeout=32s: dial tcp 192.168.99.100:8443: connect: connection refused ()
Error: timed out waiting for the condition
like image 243
Bill Avatar asked Aug 09 '19 20:08

Bill


2 Answers

You can probably report this issue also here or you can add a comment under already existing issue.

Besides that, you can try to start over with:

  1. minishift delete
  2. delete ~/.minishift folder
  3. delete ~/.kube folder
  4. Verify that you have no leftover VMs up in virtual box manager, just in case
  5. and finally minishift start

But be aware that this will purge any actual configuration and apps you were using on minishift/local openshift, see more reference. Unfortunately there is no better workaround than trying to start again AFAIK.

like image 163
Ondrej Dockal Avatar answered Sep 26 '22 02:09

Ondrej Dockal


I just face this issue too and its seems to be with credentials. what i did was, as user Ondrej Dockal says,

  1. stop vm's minishift stop
  2. delete vm's with minishift delete
  3. using a priviledged cmd run minishift with valid credentials: minishift --username {RH-USERNAME} --password {RH-PASSWORD} start.

For me that was enough. Let me know if this was usefull to you.

like image 33
Marcelo Hualoto Avatar answered Sep 24 '22 02:09

Marcelo Hualoto