fnichol / dvm

An on demand Docker virtual machine, thanks to Vagrant and boot2docker. Works great on Macs and other platforms that don't natively support the Docker daemon. Support VirtualBox, VMware, and Parallels.
http://fnichol.github.io/dvm
Apache License 2.0
458 stars 71 forks source link

Error response from daemon: client and server don't have same version #51

Open mcandre opened 9 years ago

mcandre commented 9 years ago

When I try to setup docker with dvm, I get an error message:

FATA[0000] Error response from daemon: client and server don't have same version (client : 1.16, server: 1.14) 

Trace:

$ dvm up
Bringing machine 'dvm' up with 'virtualbox' provider...
==> dvm: Importing base box 'boot2docker-1.2.0'...
==> dvm: Matching MAC address for NAT networking...
==> dvm: Setting the name of the VM: dvm_dvm_1419118928038_21058
==> dvm: Clearing any previously set network interfaces...
==> dvm: Preparing network interfaces based on configuration...
    dvm: Adapter 1: nat
    dvm: Adapter 2: hostonly
==> dvm: Forwarding ports...
    dvm: 22 => 2222 (adapter 1)
==> dvm: Running 'pre-boot' VM customizations...
==> dvm: Booting VM...
==> dvm: Waiting for machine to boot. This may take a few minutes...
    dvm: SSH address: 127.0.0.1:2222
    dvm: SSH username: docker
    dvm: SSH auth method: private key
    dvm: Warning: Connection timeout. Retrying...
    dvm: 
    dvm: Vagrant insecure key detected. Vagrant will automatically replace
    dvm: this with a newly generated keypair for better security.
    dvm: 
    dvm: Inserting generated public key within guest...
    dvm: Removing insecure key from the guest if its present...
    dvm: Key inserted! Disconnecting and reconnecting using new SSH key...
==> dvm: Machine booted and ready!
No installation found.
The guest's platform is currently not supported, will try generic Linux method...
Copy iso file /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
Installing Virtualbox Guest Additions 4.3.20 - guest version is 
mkdir: can't create directory '/tmp/selfgz85231093': No such file or directory
Cannot create target directory /tmp/selfgz85231093
You should try option --target OtherDirectory
An error occurred during installation of VirtualBox Guest Additions 4.3.20. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
==> dvm: Checking for guest additions in VM...
    dvm: No guest additions were detected on the base box for this VM! Guest
    dvm: additions are required for forwarded ports, shared folders, host only
    dvm: networking, and more. If SSH fails on this machine, please install
    dvm: the guest additions and repackage the box to continue.
    dvm: 
    dvm: This is not an error message; everything may continue to work properly,
    dvm: in which case you may ignore this message.
==> dvm: Configuring and enabling network interfaces...
==> dvm: Running provisioner: shell...
    dvm: Running: inline script
==> dvm: boot2docker: 1.2.0
$ eval $(dvm env)
$ docker images
FATA[0000] Error response from daemon: client and server don't have same version (client : 1.16, server: 1.14) 

System:

$ specs dvm docker vagrant virtualbox brew os
Specs:

specs 0.12
https://github.com/mcandre/specs#readme

dvm --version
dvm: 0.9.0

docker --version
Docker version 1.4.1, build 5bc2ff8

vagrant --version
Vagrant 1.7.1

vboxwebsrv --help 2>&1 | grep VirtualBox
Oracle VM VirtualBox web service Version 4.3.20

brew --version
0.9.5

system_profiler SPSoftwareDataType | grep 'System Version'
      System Version: OS X 10.10.1 (14B25)
tlehman commented 9 years ago

I'm having the same version, using boot2docker I could just run boot2docker download and get the newest version.

ghost commented 9 years ago

Had same issue. Workaround here: https://github.com/boot2docker/boot2docker/issues/481

Terminal:

boot2docker --iso-url=https://github.com/boot2docker/boot2docker/releases/download/v1.4.1/boot2docker.iso download
boot2docker init

Also, might need to clean up VirtualBox if the previous boot2docker instance is still running.

mgenev commented 9 years ago

i'm having this issue right now with boot2docker 1.5 and the workaround didn't work

saurabh-agrawal83 commented 9 years ago

I am also having this issue with boot2Docker 1.5.

rmacdonaldsmith commented 9 years ago

Me too. Docker version and boot2docker version are at 1.5, but getting this when I try to build a docker image: Error response from daemon: client and server don't have same version (client : 1.17, server: 1.15)

ericlarssen-wf commented 9 years ago

I solved this issue by doing this.

$ boot2docker stop
$ boot2docker download
$ boot2docker up
harishbsrinivas commented 9 years ago

@ericlarssen-wf thanks that worked me.

mcandre commented 9 years ago

Could we please update the version of boot2docker used by dvm? I still get:

$ docker images
FATA[0000] Error response from daemon: client and server don't have same version (client : 1.17, server: 1.14)

$ specs docker dvm vagrant virtualbox brew-cask brew os
Specs:

specs 0.13
https://github.com/mcandre/specs#readme

docker --version
Docker version 1.5.0, build a8a31ef

dvm --version
dvm: 0.9.0

vagrant --version
Vagrant 1.7.2

vboxwebsrv --help 2>&1 | grep VirtualBox
Oracle VM VirtualBox web service Version 4.3.24

brew-cask --version
0.53.3

brew --version
0.9.5

system_profiler SPSoftwareDataType | grep 'System Version'
      System Version: OS X 10.10.2 (14C109)
BrianHutchison commented 9 years ago

thanks @ericlarssen-wf, that got me unblocked.

matthewpbyrne commented 9 years ago

+1 to @ericlarssen-wf!

lekansogunle commented 9 years ago

+1 to @ericlarssen-wf that worked

ryanhanks-wf commented 9 years ago

+1 @ericlarssen-wf

intuitivepixel commented 9 years ago

+1 @ericlarssen-wf

andybak commented 9 years ago

@ericlarssen-wf - 'boot2docker stop' gives me "boot2docker: command not found". I tried to brew install boot2docker separately but that didn't work.

Any ideas? Be nice to get this ticket fixed properly to help noobs like me!

mcandre commented 9 years ago

@andybak Are you sure your Homebrew bin directory is correctly added to PATH? Can you find other programs installed with Homebrew, like brew install maven && mvn?

andybak commented 9 years ago

@mcandre - Yeah otherwise dvm command would also have failed - it's working now so must have been just a brain failure at the time...

rene-o commented 9 years ago

thank you @ericlarssen-wf

digen commented 9 years ago

thank you @ericlarssen-wf. That did the trick !

tuongaz commented 9 years ago

+1 @ericlarssen-wf

nmadhok commented 9 years ago

Solved this with the following one liner:

boot2docker stop && boot2docker download && boot2docker up
Awezome commented 9 years ago

boot2docker stop && boot2docker download && boot2docker up

it works

kmouss commented 9 years ago

Thank you very much I had the same issue upon fresh installation and the above steps (stop, download, up) helped fix it.

xiaocong commented 9 years ago

@ericlarssen-wf :+1:

daverogers commented 9 years ago

@nmadhok :+1: thanks

deitch commented 9 years ago

@ericlarssen-wf +1 Thank you.

shaunc869 commented 9 years ago

@ericlarssen-wf You rock!

yunsong0922 commented 9 years ago

@ericlarssen-wf You rock!

hzhu commented 9 years ago

@ericlarssen-wf Thanks it worked for me too.

nickjoyce-wf commented 9 years ago

@ericlarssen-wf you are my idol

danielbruns commented 9 years ago

I owe my life to you @ericlarssen-wf

bparanj commented 9 years ago

+1 @ericlarssen-wf

yangtao309 commented 9 years ago

+1 @ericlarssen-wf

ghost commented 9 years ago

+1 @ericlarssen-wf

I'm using docker-machine and this worked for me too

$ vboxwebsrv --help 2>&1 | grep VirtualBox
Oracle VM VirtualBox web service Version 4.3.28

$ docker-machine --version
docker-machine version 0.3.0 (0a251fe)

$ docker-machine create --driver virtualbox dev

$ docker-machine start dev
Starting VM...

$ eval $(docker-machine env dev)

$ docker --version
Docker version 1.7.0, build 0baf609

$ docker pull library/centos
Error response from daemon: client and server don't have same version (client : 1.19, server: 1.18)

$ docker images
Error response from daemon: client and server don't have same version (client : 1.19, server: 1.18)

$ docker-machine upgrade dev
Stopping machine to do the upgrade...
Upgrading machine dev...
Downloading https://github.com/boot2docker/boot2docker/releases/download/v1.7.0/boot2docker.iso to /Users/victorv/.docker/machine/cache/boot2docker.iso...

Starting machine back up...
Starting VM...

$ docker pull library/centos
latest: Pulling from centos
f1b10cd84249: Pull complete
c852f6d61e65: Pull complete
7322fbe74aa5: Already exists
centos:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
Digest: sha256:a4627c43bafc86705af2e8a5ea1f0ed34fbf27b6e7a392e5ee45dbd4736627cc
Status: Downloaded newer image for centos:latest

$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
centos              latest              7322fbe74aa5        2 weeks ago         172.2 MB
anthonygreen commented 9 years ago

Tried all the suggested solutions and still have this issue

Error response from daemon: client and server don't have same version (client : 1.19, server: 1.18)

anthonygreen commented 9 years ago

Removing ALL running VMs and restarting the workstation seems to have fixed it.