Docker certs not valid with 1.7 upgrade #938

Closed
ndresselhaus opened this Issue Jun 19, 2015 · 126 comments

Comments

Projects
None yet
@ndresselhaus

Getting the following error when trying to connect to the Docker daemon. Was previously on 1.6.2 and working fine, upgraded to 1.7.0 this afternoon.

An error occurred trying to connect: Get https://192.168.59.103:2376/v1.19/containers/json: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103

The 192.168.59.103 IP isn't written to /var/lib/boot2docker/tls/hostnames after rebooting, so it doesn't appear to be picking up the IP during startup.

Running the restart script manually inside the VM does pick up the IP, but all the certs get clobbered and are incorrect after rebooting the whole VM anyways.

Mac OS X 10.10.3, B2D 1.7.0, Docker client 1.7.0, VBox 4.3.20

@efosao

This comment has been minimized.

Show comment
Hide comment
@efosao

efosao Jun 19, 2015

Deleting the boot2docker image with boot2docker delete and creating a new one with boot2docker init resolved the issue for me.

It doesn't change the fact that the upgrade from 1.6 -> 1.7 is broken, but at least you can get past it.

efosao commented Jun 19, 2015

Deleting the boot2docker image with boot2docker delete and creating a new one with boot2docker init resolved the issue for me.

It doesn't change the fact that the upgrade from 1.6 -> 1.7 is broken, but at least you can get past it.

@efosao

This comment has been minimized.

Show comment
Hide comment
@efosao

efosao Jun 19, 2015

You will also need to update your environment variable in .bash_profile too, because the DOCKER_HOST ip/port may have changed.

efosao commented Jun 19, 2015

You will also need to update your environment variable in .bash_profile too, because the DOCKER_HOST ip/port may have changed.

@leifhanack

This comment has been minimized.

Show comment
Hide comment
@leifhanack

leifhanack Jun 19, 2015

As mentioned by @rcsa-jr you can disable TLS as a workaround. Call each docker command with flag --tlsverify=false

As mentioned by @rcsa-jr you can disable TLS as a workaround. Call each docker command with flag --tlsverify=false

@GeertVL

This comment has been minimized.

Show comment
Hide comment
@GeertVL

GeertVL Jun 19, 2015

+1 for me. .bash_profile is not present when you freshly install boot2docker.

GeertVL commented Jun 19, 2015

+1 for me. .bash_profile is not present when you freshly install boot2docker.

@yonigoldberg

This comment has been minimized.

Show comment
Hide comment
@yonigoldberg

yonigoldberg Jun 19, 2015

+1 having the same problem

+1 having the same problem

@ndresselhaus

This comment has been minimized.

Show comment
Hide comment
@ndresselhaus

ndresselhaus Jun 19, 2015

Not sure if this is relevant, but I did do a delete/init, which allowed TLS to function again.

However, afterwards I went through the resizing steps here, which went fine (and I had done that before). Upon restarting b2d the TLS cert problem came back.

Disabling TLS does work though.

Not sure if this is relevant, but I did do a delete/init, which allowed TLS to function again.

However, afterwards I went through the resizing steps here, which went fine (and I had done that before). Upon restarting b2d the TLS cert problem came back.

Disabling TLS does work though.

@mingfang

This comment has been minimized.

Show comment
Hide comment
@mingfang

mingfang Jun 19, 2015

+1
It's seems everyone at my office is suffering from this.

+1
It's seems everyone at my office is suffering from this.

@jpirkey

This comment has been minimized.

Show comment
Hide comment
@jpirkey

jpirkey Jun 19, 2015

👍
For me it wasn't just with the upgrade from 1.6 -> 1.7 as I only installed 1.7. I got this on restart of the host machine. Yes, the delete-init fixes it, but I hate having to do that each time I restart my machine.

skye:~ jpirkey$ boot2docker version
Boot2Docker-cli version: v1.6.2
Git commit: cb2c3bc
skye:~ jpirkey$ boot2docker upgrade
docker is up to date (1.7.0), skipping upgrade...
Backing up existing boot2docker binary...
Downloading new boot2docker client binary...
Success: downloaded https://github.com/boot2docker/boot2docker-cli/releases/download/v1.7.0/boot2docker-v1.7.0-darwin-amd64
    to /usr/local/bin/boot2docker
    The old version is backed up to ~/.boot2docker.
Latest release for github.com/boot2docker/boot2docker is v1.7.0
Downloading boot2docker ISO image...
Success: downloaded https://github.com/boot2docker/boot2docker/releases/download/v1.7.0/boot2docker.iso
    to /Users/jpirkey/.boot2docker/boot2docker.iso
Waiting for VM and Docker daemon to start...
............o
Started.
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/key.pem
Your environment variables are already set correctly.
skye:~ jpirkey$ docker ps
An error occurred trying to connect: Get https://192.168.59.103:2376/v1.19/containers/json: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103

Run boot2docker delete && boot2docker init

Then start boot2docker again

skye:~ jpirkey$ boot2docker up
Waiting for VM and Docker daemon to start...
........................oooooooooooooooooooo
Started.
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/key.pem

To connect the Docker client to the Docker daemon, please set:
    export DOCKER_HOST=tcp://192.168.59.104:2376
    export DOCKER_CERT_PATH=/Users/jpirkey/.boot2docker/certs/boot2docker-vm
    export DOCKER_TLS_VERIFY=1

Works again

skye:~ jpirkey$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

jpirkey commented Jun 19, 2015

👍
For me it wasn't just with the upgrade from 1.6 -> 1.7 as I only installed 1.7. I got this on restart of the host machine. Yes, the delete-init fixes it, but I hate having to do that each time I restart my machine.

skye:~ jpirkey$ boot2docker version
Boot2Docker-cli version: v1.6.2
Git commit: cb2c3bc
skye:~ jpirkey$ boot2docker upgrade
docker is up to date (1.7.0), skipping upgrade...
Backing up existing boot2docker binary...
Downloading new boot2docker client binary...
Success: downloaded https://github.com/boot2docker/boot2docker-cli/releases/download/v1.7.0/boot2docker-v1.7.0-darwin-amd64
    to /usr/local/bin/boot2docker
    The old version is backed up to ~/.boot2docker.
Latest release for github.com/boot2docker/boot2docker is v1.7.0
Downloading boot2docker ISO image...
Success: downloaded https://github.com/boot2docker/boot2docker/releases/download/v1.7.0/boot2docker.iso
    to /Users/jpirkey/.boot2docker/boot2docker.iso
Waiting for VM and Docker daemon to start...
............o
Started.
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/key.pem
Your environment variables are already set correctly.
skye:~ jpirkey$ docker ps
An error occurred trying to connect: Get https://192.168.59.103:2376/v1.19/containers/json: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103

Run boot2docker delete && boot2docker init

Then start boot2docker again

skye:~ jpirkey$ boot2docker up
Waiting for VM and Docker daemon to start...
........................oooooooooooooooooooo
Started.
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/key.pem

To connect the Docker client to the Docker daemon, please set:
    export DOCKER_HOST=tcp://192.168.59.104:2376
    export DOCKER_CERT_PATH=/Users/jpirkey/.boot2docker/certs/boot2docker-vm
    export DOCKER_TLS_VERIFY=1

Works again

skye:~ jpirkey$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
@tianon

This comment has been minimized.

Show comment
Hide comment
@tianon

tianon Jun 19, 2015

Contributor
Contributor

tianon commented Jun 19, 2015

@jwilmoth

This comment has been minimized.

Show comment
Hide comment
@jwilmoth

jwilmoth Jun 19, 2015

boot2docker shellinit didn't fix it for me, but boot2docker delete and boot2docker init did work as others have mentioned.

boot2docker shellinit didn't fix it for me, but boot2docker delete and boot2docker init did work as others have mentioned.

@jpirkey

This comment has been minimized.

Show comment
Hide comment
@jpirkey

jpirkey Jun 19, 2015

Didn't fix it for me either ... i run shellinit in my .bash_profile

Last login: Fri Jun 19 18:21:48 on ttys001
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/key.pem
An error occurred trying to connect: Get https://192.168.59.103:2376/v1.19/images/json: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103
An error occurred trying to connect: Get https://192.168.59.103:2376/v1.19/containers/json: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103
An error occurred trying to connect: Post https://192.168.59.103:2376/v1.19/containers/create?name=tsm-cache: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103
An error occurred trying to connect: Post https://192.168.59.103:2376/v1.19/containers/create?name=tsm-db: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103

jpirkey commented Jun 19, 2015

Didn't fix it for me either ... i run shellinit in my .bash_profile

Last login: Fri Jun 19 18:21:48 on ttys001
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/jpirkey/.boot2docker/certs/boot2docker-vm/key.pem
An error occurred trying to connect: Get https://192.168.59.103:2376/v1.19/images/json: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103
An error occurred trying to connect: Get https://192.168.59.103:2376/v1.19/containers/json: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103
An error occurred trying to connect: Post https://192.168.59.103:2376/v1.19/containers/create?name=tsm-cache: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103
An error occurred trying to connect: Post https://192.168.59.103:2376/v1.19/containers/create?name=tsm-db: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103
@sylvinus

This comment has been minimized.

Show comment
Hide comment
@sylvinus

sylvinus Jun 20, 2015

Same here :/ Issue comes back at each reboot. Are upgrade tests being run before each release?

Same here :/ Issue comes back at each reboot. Are upgrade tests being run before each release?

@sylvinus

This comment has been minimized.

Show comment
Hide comment
@sylvinus

sylvinus Jun 20, 2015

The only proper fix I've found for now is to completely disable TLS this way: https://coderwall.com/p/siqnjg/disable-tls-on-boot2docker

The only proper fix I've found for now is to completely disable TLS this way: https://coderwall.com/p/siqnjg/disable-tls-on-boot2docker

@zhoutaoo

This comment has been minimized.

Show comment
Hide comment
@zhoutaoo

zhoutaoo Jun 20, 2015

  + 1

I have same problem

➜ ~ boot2docker version
Boot2Docker-cli version: v1.7.0
Git commit: 7d89508

➜ ~ docker version
Client version: 1.7.0
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 0baf609
OS/Arch (client): darwin/amd64
An error occurred trying to connect: Get https://192.168.59.103:2376/v1.19/version: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103

  + 1

I have same problem

➜ ~ boot2docker version
Boot2Docker-cli version: v1.7.0
Git commit: 7d89508

➜ ~ docker version
Client version: 1.7.0
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 0baf609
OS/Arch (client): darwin/amd64
An error occurred trying to connect: Get https://192.168.59.103:2376/v1.19/version: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103

@housebolt

This comment has been minimized.

Show comment
Hide comment
@housebolt

housebolt Jun 21, 2015

See #824, possible duplicate

See #824, possible duplicate

@gesellix

This comment has been minimized.

Show comment
Hide comment
@gesellix

gesellix Jun 21, 2015

Contributor

On my machine eth1 isn't UP during certs creation, so it doesn't have an ip. See #824 (comment)

Contributor

gesellix commented Jun 21, 2015

On my machine eth1 isn't UP during certs creation, so it doesn't have an ip. See #824 (comment)

@mrw

This comment has been minimized.

Show comment
Hide comment
@mrw

mrw Jun 21, 2015

I'm seeing this as well but it's on a from-scratch install of the latest version, not an upgrade.

mrw commented Jun 21, 2015

I'm seeing this as well but it's on a from-scratch install of the latest version, not an upgrade.

@eschizoid

This comment has been minimized.

Show comment
Hide comment
@eschizoid

eschizoid Jun 21, 2015

Thanks @sylvinus your post work for me!

Thanks @sylvinus your post work for me!

@gesellix

This comment has been minimized.

Show comment
Hide comment
@gesellix

gesellix Jun 21, 2015

Contributor

I made the docker init script wait for eth1 to come UP by using this code: #824 (comment)

works for me now.

Contributor

gesellix commented Jun 21, 2015

I made the docker init script wait for eth1 to come UP by using this code: #824 (comment)

works for me now.

@gesellix

This comment has been minimized.

Show comment
Hide comment
@gesellix

gesellix Jun 21, 2015

Contributor

the fix in #824 works for both boot2docker-OSX and boot2docker-Windows.

Contributor

gesellix commented Jun 21, 2015

the fix in #824 works for both boot2docker-OSX and boot2docker-Windows.

@allen-servedio

This comment has been minimized.

Show comment
Hide comment
@allen-servedio

allen-servedio Jun 22, 2015

Thanks gesellix - your fix works for me too. I have linked it in some other places I found this being asked about to help others.

Thanks gesellix - your fix works for me too. I have linked it in some other places I found this being asked about to help others.

@josephpage

This comment has been minimized.

Show comment
Hide comment
@josephpage

josephpage Jun 22, 2015

Same problem. Fix only by @gesellix workaround.

Same problem. Fix only by @gesellix workaround.

@walktall

This comment has been minimized.

Show comment
Hide comment
@walktall

walktall Jun 23, 2015

after setting env properly, try this.
boot2docker ssh 'sudo /etc/init.d/docker restart'

after setting env properly, try this.
boot2docker ssh 'sudo /etc/init.d/docker restart'

@sebflipper

This comment has been minimized.

Show comment
Hide comment
@sebflipper

sebflipper Jun 24, 2015

Same problem here, @zh-lab's fix works for me 👍

Same problem here, @zh-lab's fix works for me 👍

@buckett

This comment has been minimized.

Show comment
Hide comment
@buckett

buckett Jun 24, 2015

Snap @zh-lab did it for me, after upgrading:

$ $(boot2docker shellinit)
Writing /Users/buckett/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/buckett/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/buckett/.boot2docker/certs/boot2docker-vm/key.pem
$ boot2docker ssh 'sudo /etc/init.d/docker restart'
Need TLS certs for boot2docker,127.0.0.1,10.0.2.15,192.168.59.103
-------------------
Generate server cert
/usr/local/bin/generate_cert --host=boot2docker,127.0.0.1,10.0.2.15,192.168.59.103 --ca=/var/lib/boot2docker/tls/ca.pem --ca-key=/var/lib/boot2docker/tls/cakey.pem --cert=/var/lib/boot2docker/tls/server.pem --key=/var/lib/boot2docker/tls/serverkey.pem
2015/06/24 11:12:53 Generating a server cert

however if I then stop and start the VM:

boot2docker stop
boot2docker start

it's broken again.

buckett commented Jun 24, 2015

Snap @zh-lab did it for me, after upgrading:

$ $(boot2docker shellinit)
Writing /Users/buckett/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/buckett/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/buckett/.boot2docker/certs/boot2docker-vm/key.pem
$ boot2docker ssh 'sudo /etc/init.d/docker restart'
Need TLS certs for boot2docker,127.0.0.1,10.0.2.15,192.168.59.103
-------------------
Generate server cert
/usr/local/bin/generate_cert --host=boot2docker,127.0.0.1,10.0.2.15,192.168.59.103 --ca=/var/lib/boot2docker/tls/ca.pem --ca-key=/var/lib/boot2docker/tls/cakey.pem --cert=/var/lib/boot2docker/tls/server.pem --key=/var/lib/boot2docker/tls/serverkey.pem
2015/06/24 11:12:53 Generating a server cert

however if I then stop and start the VM:

boot2docker stop
boot2docker start

it's broken again.

@samkelleher

This comment has been minimized.

Show comment
Hide comment
@samkelleher

samkelleher Jun 24, 2015

The fix in #824 seems to be a partial fix since it hangs the VMbox and only works one time. In my case I'm using Google Cloud CLI gcloud commands to manage their hosted VMs and it ceases to function since it can't establish a connection to docker.

ERROR: Failed to connect to Docker Daemon due to: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
ERROR: (gcloud.preview.app.deploy) Couldn't connect to the docker daemon.
Please check if the environment variables DOCKER_HOST, DOCKER_CERT_PATH and DOCKER_TLS_VERIFY are set correctly. If you are using boot2docker, you can set them up by executing the commands that are shown by:
boot2docker shellinit

The fix in #824 seems to be a partial fix since it hangs the VMbox and only works one time. In my case I'm using Google Cloud CLI gcloud commands to manage their hosted VMs and it ceases to function since it can't establish a connection to docker.

ERROR: Failed to connect to Docker Daemon due to: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
ERROR: (gcloud.preview.app.deploy) Couldn't connect to the docker daemon.
Please check if the environment variables DOCKER_HOST, DOCKER_CERT_PATH and DOCKER_TLS_VERIFY are set correctly. If you are using boot2docker, you can set them up by executing the commands that are shown by:
boot2docker shellinit
@gesellix

This comment has been minimized.

Show comment
Hide comment
@gesellix

gesellix Jun 24, 2015

Contributor

@samkelleher the fix in #824 only works around a network interface issue inside a boot2docker vm and applies for the initial start of the docker daemon.
Your problem sounds like you used some boot2docker specific env variables (DOCKER_HOST, ...), but you might need to reconfigure them when using the Google Cloud CLI.

Contributor

gesellix commented Jun 24, 2015

@samkelleher the fix in #824 only works around a network interface issue inside a boot2docker vm and applies for the initial start of the docker daemon.
Your problem sounds like you used some boot2docker specific env variables (DOCKER_HOST, ...), but you might need to reconfigure them when using the Google Cloud CLI.

@gesellix

This comment has been minimized.

Show comment
Hide comment
@gesellix

gesellix Jun 24, 2015

Contributor

@buckett did you add the delay script mentioned in #824 (comment) ?

Contributor

gesellix commented Jun 24, 2015

@buckett did you add the delay script mentioned in #824 (comment) ?

@buckett

This comment has been minimized.

Show comment
Hide comment
@buckett

buckett Jun 24, 2015

On 24 June 2015 at 15:25, Tobias Gesellchen notifications@github.com
wrote:

@buckett https://github.com/buckett did you add the delay script
mentioned in #824 (comment)
#824 (comment)
?

No and now I've just deleted and re-created.

Matthew Buckett

buckett commented Jun 24, 2015

On 24 June 2015 at 15:25, Tobias Gesellchen notifications@github.com
wrote:

@buckett https://github.com/buckett did you add the delay script
mentioned in #824 (comment)
#824 (comment)
?

No and now I've just deleted and re-created.

Matthew Buckett

@samkelleher

This comment has been minimized.

Show comment
Hide comment
@samkelleher

samkelleher Jun 24, 2015

@gesellix After many boot2docker delete && boot2docker init && boot2docker start, then ssh'ing the patch, then running eval "$(boot2docker shellinit)" to set the env variables, gcloud still won't connect (although the VM seems accessible to boot2docker commands). The variables (like DOCKER_HOST) are the same ones that init outputs. Indeed, shellinit shows the message that the vars are already set.

@gesellix After many boot2docker delete && boot2docker init && boot2docker start, then ssh'ing the patch, then running eval "$(boot2docker shellinit)" to set the env variables, gcloud still won't connect (although the VM seems accessible to boot2docker commands). The variables (like DOCKER_HOST) are the same ones that init outputs. Indeed, shellinit shows the message that the vars are already set.

@gesellix

This comment has been minimized.

Show comment
Hide comment
@gesellix

gesellix Jun 24, 2015

Contributor

@samkelleher I'm not sure whether the boot2docker settings/configuration also apply to gcloud. I guess gcloud isn't aware of boot2docker. If so, I would suggest to focus on gcloud configuration and remove any boot2docker specific environment settings.

Contributor

gesellix commented Jun 24, 2015

@samkelleher I'm not sure whether the boot2docker settings/configuration also apply to gcloud. I guess gcloud isn't aware of boot2docker. If so, I would suggest to focus on gcloud configuration and remove any boot2docker specific environment settings.

@holmesjr

This comment has been minimized.

Show comment
Hide comment
@holmesjr

holmesjr Jun 25, 2015

On installing 1.7.0 I had the this issue on Yosemite. I've resorted to https://coderwall.com/p/siqnjg/disable-tls-on-boot2docker.

On installing 1.7.0 I had the this issue on Yosemite. I've resorted to https://coderwall.com/p/siqnjg/disable-tls-on-boot2docker.

@charford

This comment has been minimized.

Show comment
Hide comment
@charford

charford Jun 25, 2015

I'm seeing this issue as well. I also see patches suggested above, but that isn't a real solution it requires several manual steps to modify the boot2docker vm. This shouldn't be happening on a vanilla install of boot2docker. Is there an ETA of when this will be fixed? This is the type of bug I expect to see in the new 'experimental' docker releases, not stable.

I'm seeing this issue as well. I also see patches suggested above, but that isn't a real solution it requires several manual steps to modify the boot2docker vm. This shouldn't be happening on a vanilla install of boot2docker. Is there an ETA of when this will be fixed? This is the type of bug I expect to see in the new 'experimental' docker releases, not stable.

@warp-x

This comment has been minimized.

Show comment
Hide comment

warp-x commented Jun 25, 2015

Thank you @zh-lab!

@josephpage

This comment has been minimized.

Show comment
Hide comment
@josephpage

josephpage Jun 25, 2015

I'm wondering if boot2docker 1.7.0 on OS X is working out of the box for
someone !

In addition to a fix, we need this use case to be tested.

I'm wondering if boot2docker 1.7.0 on OS X is working out of the box for
someone !

In addition to a fix, we need this use case to be tested.

@brianbianco

This comment has been minimized.

Show comment
Hide comment
@brianbianco

brianbianco Jun 25, 2015

I too have run into this issue. @buckett solution worked for me, but I also have the follow up problem of it breaking on a restart.

I too have run into this issue. @buckett solution worked for me, but I also have the follow up problem of it breaking on a restart.

@amancevice

This comment has been minimized.

Show comment
Hide comment
@amancevice

amancevice Jun 25, 2015

@brianbianco and I were able to work around this, as he said above. But the restart problem will be fairly oppressive going forward.

@brianbianco and I were able to work around this, as he said above. But the restart problem will be fairly oppressive going forward.

@mboersma

This comment has been minimized.

Show comment
Hide comment
@mboersma

mboersma Jun 25, 2015

+1 for a fix to this. I haven't found a workaround that persists after boot2docker restart.

+1 for a fix to this. I haven't found a workaround that persists after boot2docker restart.

@BlueHotDog

This comment has been minimized.

Show comment
Hide comment
@BlueHotDog

BlueHotDog Jun 25, 2015

👍 same here!!
please help.

👍 same here!!
please help.

@scawa1952

This comment has been minimized.

Show comment
Hide comment
@scawa1952

scawa1952 Jul 10, 2015

This "bug" is 22 days old. It would seem that they would have fixed it by now. This is a MAJOR annoyance. Each time I reboot my work laptop, I have to docker delete and init and lose all the base images I have downloaded. Very aggravating.

This "bug" is 22 days old. It would seem that they would have fixed it by now. This is a MAJOR annoyance. Each time I reboot my work laptop, I have to docker delete and init and lose all the base images I have downloaded. Very aggravating.

@vielmetti

This comment has been minimized.

Show comment
Hide comment
@vielmetti

vielmetti Jul 10, 2015

@neilellis and @scawa1952 - if you follow the path of restarting docker inside the VM instead of delete and init, you can save a lot of time. #938 (comment) is the relevant comment.

@neilellis and @scawa1952 - if you follow the path of restarting docker inside the VM instead of delete and init, you can save a lot of time. #938 (comment) is the relevant comment.

@scawa1952

This comment has been minimized.

Show comment
Hide comment
@scawa1952

scawa1952 Jul 10, 2015

@vielmetti Thanks..... however, he still gets the error
update:
Ah did not see the following post where he did a

boot2docker ssh 'sudo /etc/init.d/docker restart'

this works and I'll put it as an alias in my bash_profile.

@vielmetti Thanks..... however, he still gets the error
update:
Ah did not see the following post where he did a

boot2docker ssh 'sudo /etc/init.d/docker restart'

this works and I'll put it as an alias in my bash_profile.

@neilellis

This comment has been minimized.

Show comment
Hide comment
@neilellis

neilellis Jul 10, 2015

@vielmetti thanks, I did that first time round :)

@vielmetti thanks, I did that first time round :)

@jlouazel

This comment has been minimized.

Show comment
Hide comment
@jlouazel

jlouazel Jul 12, 2015

@jpirkey's solution worked for me. Thank you!

@jpirkey's solution worked for me. Thank you!

@chevdor

This comment has been minimized.

Show comment
Hide comment
@chevdor

chevdor Jul 12, 2015

I got the same issue upgrading from an ancient version.
I deleted the VM and things worked again. However, today the issue occurs again!
The solution of doing a boot2docker stop && boot2docker delete && boot2docker init fixed the issue.

chevdor commented Jul 12, 2015

I got the same issue upgrading from an ancient version.
I deleted the VM and things worked again. However, today the issue occurs again!
The solution of doing a boot2docker stop && boot2docker delete && boot2docker init fixed the issue.

@virtuald

This comment has been minimized.

Show comment
Hide comment
@virtuald

virtuald Jul 12, 2015

@vielmetti restarting the docker daemon does not fix the issue for me.

@vielmetti restarting the docker daemon does not fix the issue for me.

@MichaelDrogalis

This comment has been minimized.

Show comment
Hide comment
@MichaelDrogalis

MichaelDrogalis Jul 12, 2015

This fix needs to go out ASAP, it's crushing my development cycles.

This fix needs to go out ASAP, it's crushing my development cycles.

@jamime

This comment has been minimized.

Show comment
Hide comment
@jamime

jamime Jul 13, 2015

Same experience here on 1.7 (I did not upgrade, fresh install) on Windows.

jamime commented Jul 13, 2015

Same experience here on 1.7 (I did not upgrade, fresh install) on Windows.

@jancarloviray

This comment has been minimized.

Show comment
Hide comment
@jancarloviray

jancarloviray Jul 14, 2015

+1 For Fix

My current workaround is: boot2docker poweroff && boot2docker destroy && boot2docker init && boot2docker start

But that destroys all images. It's the only solution that works for me as of now.

+1 For Fix

My current workaround is: boot2docker poweroff && boot2docker destroy && boot2docker init && boot2docker start

But that destroys all images. It's the only solution that works for me as of now.

@mkobit

This comment has been minimized.

Show comment
Hide comment
@mkobit

mkobit Jul 14, 2015

This is the bash alias I have been using:

alias b2dinit="boot2docker up \
     && \$(boot2docker shellinit) \
     && boot2docker ssh 'sudo /etc/init.d/docker restart'"

mkobit commented Jul 14, 2015

This is the bash alias I have been using:

alias b2dinit="boot2docker up \
     && \$(boot2docker shellinit) \
     && boot2docker ssh 'sudo /etc/init.d/docker restart'"
@timlesallen

This comment has been minimized.

Show comment
Hide comment
@timlesallen

timlesallen Jul 14, 2015

boot2docker ssh sudo /etc/init.d/docker restart fixed it for me.

boot2docker ssh sudo /etc/init.d/docker restart fixed it for me.

@marvinosswald

This comment has been minimized.

Show comment
Hide comment
@marvinosswald

marvinosswald Jul 14, 2015

+1 fixed it for me too

+1 fixed it for me too

@vivekjuneja

This comment has been minimized.

Show comment
Hide comment
@vivekjuneja

vivekjuneja Jul 14, 2015

+1 fixed for me as well

+1 fixed for me as well

@thenikso

This comment has been minimized.

Show comment
Hide comment

+1

@chevdor

This comment has been minimized.

Show comment
Hide comment
@chevdor

chevdor Jul 14, 2015

I prefer the option from @timlesallen to the others as the others wipe out whatever images/containers you had.

chevdor commented Jul 14, 2015

I prefer the option from @timlesallen to the others as the others wipe out whatever images/containers you had.

@tianon

This comment has been minimized.

Show comment
Hide comment
@tianon

tianon Jul 14, 2015

Contributor

Can anyone who's able to reproduce this test with v1.7.1-rc3 (https://github.com/tianon/boot2docker/releases/tag/v1.7.1-rc3) and verify that #960 fixed it?

Contributor

tianon commented Jul 14, 2015

Can anyone who's able to reproduce this test with v1.7.1-rc3 (https://github.com/tianon/boot2docker/releases/tag/v1.7.1-rc3) and verify that #960 fixed it?

@tianon

This comment has been minimized.

Show comment
Hide comment
@tianon

tianon Jul 14, 2015

Contributor

Thanks to @nathanleclaire, we've verified that #960 is the fix. Let's build us an official 1.7.1 release and finally put this to bed! 👍

Contributor

tianon commented Jul 14, 2015

Thanks to @nathanleclaire, we've verified that #960 is the fix. Let's build us an official 1.7.1 release and finally put this to bed! 👍

@tianon tianon closed this Jul 14, 2015

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Jul 15, 2015

Contributor

Thanks @tianon. Sorry all for any inconvenience encountered in the meantime. In our excitement to migrate to Docker Machine this one slipped through the cracks.

Contributor

nathanleclaire commented Jul 15, 2015

Thanks @tianon. Sorry all for any inconvenience encountered in the meantime. In our excitement to migrate to Docker Machine this one slipped through the cracks.

@chiefy

This comment has been minimized.

Show comment
Hide comment
@chiefy

chiefy Jul 15, 2015

Thanks b2d team for finally fixing this - just installed 1.7.1 and 🍻 !

chiefy commented Jul 15, 2015

Thanks b2d team for finally fixing this - just installed 1.7.1 and 🍻 !

@MiguelPeralvo

This comment has been minimized.

Show comment
Hide comment
@MiguelPeralvo

MiguelPeralvo Jul 15, 2015

I had the same issue, installed 1.7.1 and the problem is now gone. Thanks b2d team!

I had the same issue, installed 1.7.1 and the problem is now gone. Thanks b2d team!

@jlouazel

This comment has been minimized.

Show comment
Hide comment
@jlouazel

jlouazel Jul 15, 2015

@MiguelPeralvo: I agree, 1.7.1 rocks.
Thanks guys, the problem is gone!

@MiguelPeralvo: I agree, 1.7.1 rocks.
Thanks guys, the problem is gone!

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Jul 15, 2015

Contributor

❤️ ❤️ ❤️ ❤️ Appreciate hearing that it is working for you.

Contributor

nathanleclaire commented Jul 15, 2015

❤️ ❤️ ❤️ ❤️ Appreciate hearing that it is working for you.

@dmoore247

This comment has been minimized.

Show comment
Hide comment
@dmoore247

dmoore247 Jul 17, 2015

Hit this problem too, happy to see there is a fix. It installed, but failed the same way as above. The reported client version was 1.7.1 so the newever version was installed. I banged around for 20 minutes to fully un-install boot2docker and verify that VBOX was up to date. After a full un-install and install of boot2docker, it worked!

Please note, the https://docs.docker.com/mac/step_one/ page should be updated to point to the 1.7.1 release download: https://github.com/boot2docker/osx-installer/releases/download/v1.7.1/Boot2Docker-1.7.1.pkg

Hit this problem too, happy to see there is a fix. It installed, but failed the same way as above. The reported client version was 1.7.1 so the newever version was installed. I banged around for 20 minutes to fully un-install boot2docker and verify that VBOX was up to date. After a full un-install and install of boot2docker, it worked!

Please note, the https://docs.docker.com/mac/step_one/ page should be updated to point to the 1.7.1 release download: https://github.com/boot2docker/osx-installer/releases/download/v1.7.1/Boot2Docker-1.7.1.pkg

@aluenkinglee

This comment has been minimized.

Show comment
Hide comment
@aluenkinglee

aluenkinglee Jul 21, 2015

boot2docker ssh 'sudo /etc/init.d/docker restart'

thanks @zh-lab

boot2docker ssh 'sudo /etc/init.d/docker restart'

thanks @zh-lab

@lordkada

This comment has been minimized.

Show comment
Hide comment
@lordkada

lordkada Jul 21, 2015

Hmmm... maybe I'm wrong but I think I hit this problem again... (or at least I thought I shouldn't use again boot2docker ssh 'sudo /etc/init.d/docker restart' with b2d 1.7.1).
I cleaned up and reinstalled b2d from scratch, but after restarting I encountered the problem again:

Carlos-MacBook-Pro:bin lordkada$ boot2docker init
Initialization of virtual machine "boot2docker-vm" complete.
Use `boot2docker up` to start it.
Carlos-MacBook-Pro:bin lordkada$ boot2docker up
Waiting for VM and Docker daemon to start...
.........................ooooooooooooooooooooo
Started.
Writing /Users/lordkada/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/lordkada/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/lordkada/.boot2docker/certs/boot2docker-vm/key.pem
Your environment variables are already set correctly.

Carlos-MacBook-Pro:bin lordkada$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
Carlos-MacBook-Pro:bin lordkada$ boot2docker stop
Carlos-MacBook-Pro:bin lordkada$ boot2docker up
Waiting for VM and Docker daemon to start...
..............oooo
Started.
Writing /Users/lordkada/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/lordkada/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/lordkada/.boot2docker/certs/boot2docker-vm/key.pem
Your environment variables are already set correctly.

Carlos-MacBook-Pro:bin lordkada$ docker ps
An error occurred trying to connect: Get https://192.168.59.103:2376/v1.19/containers/json: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103

I'm running boot2docker v1.7.1:

Carlos-MacBook-Pro:bin lordkada$ boot2docker version
Boot2Docker-cli version: v1.7.1
Git commit: 8fdc6f5

What I'm missing?

Hmmm... maybe I'm wrong but I think I hit this problem again... (or at least I thought I shouldn't use again boot2docker ssh 'sudo /etc/init.d/docker restart' with b2d 1.7.1).
I cleaned up and reinstalled b2d from scratch, but after restarting I encountered the problem again:

Carlos-MacBook-Pro:bin lordkada$ boot2docker init
Initialization of virtual machine "boot2docker-vm" complete.
Use `boot2docker up` to start it.
Carlos-MacBook-Pro:bin lordkada$ boot2docker up
Waiting for VM and Docker daemon to start...
.........................ooooooooooooooooooooo
Started.
Writing /Users/lordkada/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/lordkada/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/lordkada/.boot2docker/certs/boot2docker-vm/key.pem
Your environment variables are already set correctly.

Carlos-MacBook-Pro:bin lordkada$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
Carlos-MacBook-Pro:bin lordkada$ boot2docker stop
Carlos-MacBook-Pro:bin lordkada$ boot2docker up
Waiting for VM and Docker daemon to start...
..............oooo
Started.
Writing /Users/lordkada/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/lordkada/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/lordkada/.boot2docker/certs/boot2docker-vm/key.pem
Your environment variables are already set correctly.

Carlos-MacBook-Pro:bin lordkada$ docker ps
An error occurred trying to connect: Get https://192.168.59.103:2376/v1.19/containers/json: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103

I'm running boot2docker v1.7.1:

Carlos-MacBook-Pro:bin lordkada$ boot2docker version
Boot2Docker-cli version: v1.7.1
Git commit: 8fdc6f5

What I'm missing?

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Jul 21, 2015

Contributor

@lordkada Is the boot2docker.iso file itself on 1.7.1 (you should be able to see this if you boot2docker ssh)? boot2docker upgrade will give you the latest of everything.

Contributor

nathanleclaire commented Jul 21, 2015

@lordkada Is the boot2docker.iso file itself on 1.7.1 (you should be able to see this if you boot2docker ssh)? boot2docker upgrade will give you the latest of everything.

@chiefy

This comment has been minimized.

Show comment
Hide comment
@chiefy

chiefy Jul 21, 2015

@lordkada try this:

$ docker --version && boot2docker ssh docker --version

You should get the same info twice:

Docker version 1.7.1, build 786b29d
Docker version 1.7.1, build 786b29d

If not, then yeah: you may be having issues. Try boot2docker delete && boot2docker up but it says you re-installed? That's odd.

chiefy commented Jul 21, 2015

@lordkada try this:

$ docker --version && boot2docker ssh docker --version

You should get the same info twice:

Docker version 1.7.1, build 786b29d
Docker version 1.7.1, build 786b29d

If not, then yeah: you may be having issues. Try boot2docker delete && boot2docker up but it says you re-installed? That's odd.

@lordkada

This comment has been minimized.

Show comment
Hide comment
@lordkada

lordkada Jul 22, 2015

@nathanleclaire & @chiefy - thanks for your support. Yes, the .iso was still old and I forced an upgrade with boot2docker upgrade. Now it works!

I'm not 100% sure, but when I uninstalled boot2docker (I use brew cask) I forgot to wipe the .bootdocker folder (or at least the .iso)... now I presume that, for safety, the .iso is not overwritten by a fresh install...

Thanks again!

@nathanleclaire & @chiefy - thanks for your support. Yes, the .iso was still old and I forced an upgrade with boot2docker upgrade. Now it works!

I'm not 100% sure, but when I uninstalled boot2docker (I use brew cask) I forgot to wipe the .bootdocker folder (or at least the .iso)... now I presume that, for safety, the .iso is not overwritten by a fresh install...

Thanks again!

@programoo

This comment has been minimized.

Show comment
Hide comment
@programoo

programoo Jul 23, 2015

@efosao

boot2docker delete
boot2docker init
Then it will response with "Initialization of virtual machine "boot2docker-vm" complete.
Use boot2docker up to start it"

boot2docker up did the magic for me.

Docker version 1.7.1, build 786b29d
OSX 10.10.3 Yosemite

@efosao

boot2docker delete
boot2docker init
Then it will response with "Initialization of virtual machine "boot2docker-vm" complete.
Use boot2docker up to start it"

boot2docker up did the magic for me.

Docker version 1.7.1, build 786b29d
OSX 10.10.3 Yosemite

@edoardoc

This comment has been minimized.

Show comment
Hide comment
@edoardoc

edoardoc Aug 4, 2015

boot2docker upgrade did it for me:

~ boot2docker upgrade
docker is up to date (1.7.1), skipping upgrade...
boot2docker is up to date (v1.7.1), skipping upgrade...
Latest release for github.com/boot2docker/boot2docker is v1.7.1
Downloading boot2docker ISO image...


Success: downloaded https://github.com/boot2docker/boot2docker/releases/download/v1.7.1/boot2docker.iso
    to /Users/eddy/.boot2docker/boot2docker.iso
Waiting for VM and Docker daemon to start...
...............oooooooooo
Started.
Writing /Users/eddy/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/eddy/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/eddy/.boot2docker/certs/boot2docker-vm/key.pem
Your environment variables are already set correctly.

edoardoc commented Aug 4, 2015

boot2docker upgrade did it for me:

~ boot2docker upgrade
docker is up to date (1.7.1), skipping upgrade...
boot2docker is up to date (v1.7.1), skipping upgrade...
Latest release for github.com/boot2docker/boot2docker is v1.7.1
Downloading boot2docker ISO image...


Success: downloaded https://github.com/boot2docker/boot2docker/releases/download/v1.7.1/boot2docker.iso
    to /Users/eddy/.boot2docker/boot2docker.iso
Waiting for VM and Docker daemon to start...
...............oooooooooo
Started.
Writing /Users/eddy/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/eddy/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/eddy/.boot2docker/certs/boot2docker-vm/key.pem
Your environment variables are already set correctly.
@gsavoie

This comment has been minimized.

Show comment
Hide comment
@gsavoie

gsavoie Aug 4, 2015

Also seems fixed for me after boot2docker upgrade.

gsavoie commented Aug 4, 2015

Also seems fixed for me after boot2docker upgrade.

@mhawila

This comment has been minimized.

Show comment
Hide comment
@mhawila

mhawila Aug 10, 2015

boot2docker delete && boot2docker init && boot2docker start
fixed the problem for me.

mhawila commented Aug 10, 2015

boot2docker delete && boot2docker init && boot2docker start
fixed the problem for me.

@zysam

This comment has been minimized.

Show comment
Hide comment
@zysam

zysam Aug 13, 2015

fix the problem for me

docker 安装准备

env: win10 64bit
dependencies: 
    docker: 1.8.0
    boot2docker.iso: 1.8.0
    boot2docker-cli: 1.7.1
    virtuaBox: 5.0.1(测试版)
    git: 1.9.5.msysgit.1

docker 启动

命令行下:

//初始化
boot2docker init
//启动
boot2docker up(报错, ssh认证无效)
//补上, 成功
boot2docker ssh

因为:
ssh docker@192.168.59.103 运行参数为

2015/08/13 11:47:27 executing: E:\Program Files\Git\bin\ssh.exe ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i C:\Users\sysam\.ssh\id_boot2docker docker@localhost tar c /home/docker/.docker/*.pem

boot2docker ssh 运行参数为

2015/08/13 11:47:33 executing: E:\Program Files\Git\bin\ssh.exe ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i C:\Users\sysam\.ssh\id_boot2docker docker@localhost

多了 tar c /home/docker/.docker/*.pem

zysam commented Aug 13, 2015

fix the problem for me

docker 安装准备

env: win10 64bit
dependencies: 
    docker: 1.8.0
    boot2docker.iso: 1.8.0
    boot2docker-cli: 1.7.1
    virtuaBox: 5.0.1(测试版)
    git: 1.9.5.msysgit.1

docker 启动

命令行下:

//初始化
boot2docker init
//启动
boot2docker up(报错, ssh认证无效)
//补上, 成功
boot2docker ssh

因为:
ssh docker@192.168.59.103 运行参数为

2015/08/13 11:47:27 executing: E:\Program Files\Git\bin\ssh.exe ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i C:\Users\sysam\.ssh\id_boot2docker docker@localhost tar c /home/docker/.docker/*.pem

boot2docker ssh 运行参数为

2015/08/13 11:47:33 executing: E:\Program Files\Git\bin\ssh.exe ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i C:\Users\sysam\.ssh\id_boot2docker docker@localhost

多了 tar c /home/docker/.docker/*.pem

@mooreniemi

This comment has been minimized.

Show comment
Hide comment
@mooreniemi

mooreniemi Sep 10, 2015

hmm i did boot2docker upgrade and i didnt see that work.

hmm i did boot2docker upgrade and i didnt see that work.

@josiah14

This comment has been minimized.

Show comment
Hide comment
@josiah14

josiah14 Oct 7, 2015

+1. I'm experiencing this issue on Mavricks and the latest version of boot2docker.

josiah14 commented Oct 7, 2015

+1. I'm experiencing this issue on Mavricks and the latest version of boot2docker.

@chigix

This comment has been minimized.

Show comment
Hide comment
@chigix

chigix Mar 7, 2016

I have handled this problem just via regenerating a new TLS certification stand in for disabling TLS roughly:

docker-machine regenerate-certs ConfusedMachine

I think it's not relevent to Docker itself at all, but the source of secure binding in the TLS certification with IP address.

chigix commented Mar 7, 2016

I have handled this problem just via regenerating a new TLS certification stand in for disabling TLS roughly:

docker-machine regenerate-certs ConfusedMachine

I think it's not relevent to Docker itself at all, but the source of secure binding in the TLS certification with IP address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment