redhatdemocentral / ocp-install-demo

OpenShift Container Platform installed in fully automated and repeatable fashion on your laptop. Get started with your containerized development with a private PaaS installed in just minutes.
82 stars 60 forks source link

openshift environment is getting connected after restart with docker-machine start openshift #17

Closed gjayaram closed 7 years ago

gjayaram commented 7 years ago

Tried to restart the openshift environment to rework on the same project.

$ docker-machine stop openshift ---> working

MacBook-Pro:ocp-install-demo gjayaram$ docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS default - virtualbox Stopped Unknown
openshift - virtualbox Stopped Unknown

MacBook-Pro:ocp-install-demo gjayaram$ docker-machine start openshift Starting "openshift"... (openshift) Check network to re-create if needed... (openshift) Waiting for an IP... Machine "openshift" was started. Waiting for SSH to be available... Detecting the provisioner... Started machines may have new IP addresses. You may need to re-run the docker-machine env command.

MacBook-Pro:ocp-install-demo gjayaram$ docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS default - virtualbox Stopped Unknown
openshift - virtualbox Running tcp://192.168.99.100:2376 v1.13.1

MacBook-Pro:ocp-install-demo gjayaram$ oc login error: dial tcp 192.168.99.100:8443: getsockopt: connection refused

MacBook-Pro:ocp-install-demo gjayaram$ docker-machine env Error checking TLS connection: Host is not running

MacBook-Pro:ocp-install-demo gjayaram$ docker-machine env openshift export DOCKER_TLS_VERIFY="1" export DOCKER_HOST="tcp://192.168.99.100:2376" export DOCKER_CERT_PATH="/Users/gjayaram/.docker/machine/machines/openshift" export DOCKER_MACHINE_NAME="openshift"

Run this command to configure your shell:

eval $(docker-machine env openshift)

MacBook-Pro:ocp-install-demo gjayaram$ eval $(docker-machine env openshift)

MacBook-Pro:ocp-install-demo gjayaram$ oc login error: dial tcp 192.168.99.100:8443: getsockopt: connection refused

MacBook-Pro:ocp-install-demo gjayaram$ docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS default - virtualbox Stopped Unknown
openshift * virtualbox Running tcp://192.168.99.100:2376 v1.13.1

MacBook-Pro:ocp-install-demo gjayaram$ oc login error: dial tcp 192.168.99.100:8443: getsockopt: connection refused

eschabell commented 7 years ago

Docker does not manage the connections very well... I am not sure what to do when it fails on the mac like that. I solve this by stopping other applications on my machine, stopping the 'openshift' machine and restarting it.

Does that help you?

eschabell commented 7 years ago

Bringing in @sabre1041 to have a look... make sure I am not missing anything.

Andrew, see any issue that we can fix?

eschabell commented 7 years ago

As not able to support this reliably, will remove from the demo instructions.

gjayaram commented 7 years ago

Thanks @eschabell .

eschabell commented 7 years ago

Update here, fixed with https://github.com/redhatdemocentral/ocp-install-demo/commit/0240fad162003b021e31dbffd9795f0d54e7e2ca. See the NOTES section in Readme.md. :-)