Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

'Bad certificate' after stopping and starting vmwarefusion machine #430

Closed
brianatirise opened this issue Jan 28, 2015 · 11 comments
Closed

Comments

@brianatirise
Copy link

VMWare Fusion machines seem not to be functional after stopping and re-starting them.

As of commit 7d6fd1f (midday January 28, 2015) with Docker 1.4.1 and a fresh boot2docker.iso, if I do the following:

docker-machine create -d vmwarefusion foo
docker $(docker-machine config foo) ps # SUCCESS
docker-machine stop
docker-machine start
docker $(docker-machine config foo) ps # FAILURE

the second attempt to do 'docker ps' fails with FATA[0000] An error occurred trying to connect: Get https://172.16.65.190:2376/v1.16/containers/json: remote error: bad certificate. Same is true if I replace the stop/start with restart. 'docker-machine ssh' also fails in that I end up being prompted to authenticate via password.

This does not happen for VirtualBox machines. I haven't had trouble stopping/starting them.

If I 'docker-machine rm foo' and start over, I get the same behavior (works fine until I stop the machine).
This isn't too terrible, but it is a hassle in that any of the cached Docker image files must be re-fetched.

@ehazlett
Copy link
Contributor

This is a known issue. Support for detecting the virtual disk in order to store the b2d configs needs to be added.

@frapposelli
Copy link
Contributor

I'm putting together a workaround for this short term as the long term solution will take some time to develop.

@ehazlett
Copy link
Contributor

ehazlett commented Feb 4, 2015

@frapposelli awesome!! thanks!

@ryanwalls
Copy link

I have the same/similar problem with virtualbox. Start/stop an engine ends up with this error when I try to connect to it again:

FATA[0000] An error occurred trying to connect: Get https://192.168.99.100:2376/v1.16/containers/json: x509: certificate is valid for 192.168.99.105, not 192.168.99.100

Is my only option to remove the machine and start over?

@ehazlett
Copy link
Contributor

ehazlett commented Feb 4, 2015

Yes we are working on this. There should be a workaround soon.

On Wed, Feb 4, 2015 at 3:30 PM, ryanwalls notifications@github.com wrote:

I have the same/similar problem with virtualbox. Start/stop an engine ends
up with this error when I try to connect to it again:

FATA[0000] An error occurred trying to connect: Get https://192.168.99.100:2376/v1.16/containers/json: x509: certificate is valid for 192.168.99.105, not 192.168.99.100


Reply to this email directly or view it on GitHub
#430 (comment).

@ryanwalls
Copy link

@ehazlett Thanks!

@ehazlett
Copy link
Contributor

ehazlett commented Feb 4, 2015

yw -- i will post here once it's available.

On Wed, Feb 4, 2015 at 4:34 PM, ryanwalls notifications@github.com wrote:

@ehazlett https://github.com/ehazlett Thanks!


Reply to this email directly or view it on GitHub
#430 (comment).

@ryanwalls
Copy link

@ehazlett What's weird is if I start a new terminal and run docker $(docker-machine config dev) ps I can connect.

Output of docker-machine config dev

--tls --tlscacert=/Users/rwalls/.docker/machines/.client/ca.pem --tlscert=/Users/rwalls/.docker/machines/.client/cert.pem --tlskey=/Users/rwalls/.docker/machines/.client/key.pem -H="tcp://192.168.99.100:2376"

If I run $(docker-machine env dev), then docker ps it fails with the cert error.

Output of docker-machine env dev:

export DOCKER_TLS_VERIFY=yes
export DOCKER_CERT_PATH=/Users/rwalls/.docker/machines/.client
export DOCKER_HOST=tcp://192.168.99.100:2376

Why does it work in the first case and not the 2nd?

@frapposelli
Copy link
Contributor

As a reference, this issue depends on boot2docker/boot2docker#747

@kpettijohn
Copy link

@frapposelli Were you able to come up with a short term solution or does the short term solution also depend on boot2docker/boot2docker#747?

@frapposelli
Copy link
Contributor

This PR adds shared folders support for Fusion and should fix this issue #1034

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants