machine icon indicating copy to clipboard operation
machine copied to clipboard

Error response from daemon: client is newer than server with Docker 1.9 RC3

Open arun-gupta opened this issue 11 years ago • 72 comments

Here is the version information:

> docker-machine -v
docker-machine version 0.5.0-rc3 (a1e610b)
> docker -v
Docker version 1.9.0-rc3, build 2100b94

Created a Docker machine:

> docker-machine create -d=virtualbox lab2
Running pre-create checks...
Creating machine...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Provisioning created instance...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
To see how to connect Docker to this machine, run: docker-machine env lab2

Configured as:

eval $(docker-machine env lab2)

docker ps gives the following error:

> docker ps
Error response from daemon: client is newer than server (client API version: 1.21, server API version: 1.20)

This is a newly created machine using the latest version of Docker CLI and Docker Machine.

arun-gupta avatar Nov 03 '15 06:11 arun-gupta

Yeah, the UX is not great but if you want to use a RC Docker binary you need to specify to use a release candidate ISO to use e.g. --virtualbox-boot2docker-url https://github.com/tianon/boot2docker-legacy/releases/download/v1.9.0-rc4/boot2docker.iso

nathanleclaire avatar Nov 03 '15 06:11 nathanleclaire

Why this special treatment for RC?

This makes it non-intuitive.

arun-gupta avatar Nov 03 '15 20:11 arun-gupta

Well, your Docker client binary is also an RC. How do you feel it should work?

nathanleclaire avatar Nov 03 '15 20:11 nathanleclaire

RC should automatically pick up the boot2docker.iso from RC. --virtualbox-boot2docker-url should only be used to override the default value. And the default should be the same as Docker client binary.

arun-gupta avatar Nov 03 '15 21:11 arun-gupta

I do think we could do better about allowing upgrade / create to use new RCs by default, but currently RCs for boot2docker we've been keeping at @tianon's fork, so we need to change our habit of doing that as well if we're going to support this. I do worry a bit about making things too magic as everyone has really different expectations in this regard.

nathanleclaire avatar Nov 03 '15 21:11 nathanleclaire

Matching the boot2docker.iso with the Docker client binary seems like a reasonable and intuitive approach. And there will be an option to override anyway.

No magic, just intuitive at least to me!

arun-gupta avatar Nov 03 '15 22:11 arun-gupta

Seeing the exact same error with Docker 1.9.0 and Machine 0.5.0:

~ > docker ps
Error response from daemon: client is newer than server (client API version: 1.21, server API version: 1.20)
~ > docker -v
Docker version 1.9.0, build 76d6bc9
~ > docker-machine -v
docker-machine version 0.5.0 (04cfa58)

Don't see any way to reopen the issue now.

arun-gupta avatar Nov 03 '15 23:11 arun-gupta

Did you run docker-machine upgrade?

nathanleclaire avatar Nov 03 '15 23:11 nathanleclaire

This machine was just created. Do I need to run docker-machine upgrade for that as well?

arun-gupta avatar Nov 03 '15 23:11 arun-gupta

@arun-gupta Most likely, to update your cache and/or in case you made the machine before the official b2d release happened.

nathanleclaire avatar Nov 04 '15 00:11 nathanleclaire

@nathanleclaire created the machine 30 mins ago again and still got the same error. docker-compose up -d on a docker-compose.yml worked successfully. But docker ps is giving the error again:

> docker ps
Error response from daemon: client is newer than server (client API version: 1.21, server API version: 1.20)

Upgrading the machine explicitly.

Is there a mapping of b2d.iso and Client/Server API version?

arun-gupta avatar Nov 04 '15 00:11 arun-gupta

docker-machine upgrade name should work, my guess is it's an "ISO cache issue". Did you try that command?

The boot2docker.iso always maps to the corresponding Docker release API version. You can see the cache's version in the metadata by doing file $HOME/.docker/machine/cache/boot2docker.iso.

nathanleclaire avatar Nov 04 '15 00:11 nathanleclaire

docker-machine upgrade resolved the issue.

arun-gupta avatar Nov 04 '15 01:11 arun-gupta

Thanks Arun. We're going to be working on some issues around upgrade flow this iteration so hopefully it will be a little more clear in the future.

nathanleclaire avatar Nov 04 '15 01:11 nathanleclaire

:+1: for docker-machine upgrade

lisp-ceo avatar Nov 10 '15 05:11 lisp-ceo

+1 for docker-machine upgrade - assuming the only thing being upgraded is docker-related ;)

brandontamm avatar Nov 11 '15 15:11 brandontamm

:+1: for docker-machine upgrade <machine name>

danaucpe avatar Nov 12 '15 22:11 danaucpe

After upgrade with Docker Toolbox, default machine was stopped but upgraded. Others machine was not stopped, and not upgraded.

docker-machine upgrade <machine-name>work also for me

jgsqware avatar Nov 13 '15 07:11 jgsqware

I'm on Windows 10 and saw a similar issue which strangely just disappeared on a second run. Here's what I had and the sequence of steps.

  1. I was using the Docker Toolbox 1.8.3 and decided to use the latest release 1.9.0c as I was facing some weird issues.
  2. I ran a docker-machine rm default just as a safety step
  3. Downloaded and installed the toolbox version 1.9.0c
  4. Git was the only thing I did not pick when prompted and installed everything else.
  5. Kicked off the Docker Quickstart Terminal
  6. Everything looked fine
Creating Machine default...
Running pre-create checks...
Creating machine...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Provisioning created instance...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
To see how to connect Docker to this machine, run: C:\Program Files\Docker Toolbox\docker-machine.exe env default
Setting environment variables for machine default...



                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           \______ o           __/
             \    \         __/
              \____\_______/

docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com

7.Checked to see that machine is created

$ docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL                         SWARM
default   *        virtualbox   Running   tcp://192.168.99.100:2376

8.All fine so far, but

$ docker ps
Error response from daemon: client is newer than server (client API version: 1.21, server API version: 1.20)

9.What do I have?

$ docker-machine -v
C:\Program Files\Docker Toolbox\docker-machine.exe version 0.5.0 (04cfa58)
$ docker -v
Docker version 1.9.0, build 76d6bc9

10.Run the machine upgrade as suggested above and I get:

$ docker-machine upgrade default
Stopping machine to do the upgrade...
C:\Program Files\Oracle\VirtualBox\VBoxManage.exe showvminfo default --machinereadable failed:
VBoxManage.exe: error: The object is not ready
VBoxManage.exe: error: Details: code E_ACCESSDENIED (0x80070005), component ConsoleWrap, interface IConsole, callee IUnknown
VBoxManage.exe: error: Context: "COMGETTER(SharedFolders)(ComSafeArrayAsOutParam(folders))" at line 2306 of file VBoxManageInfo.cpp
$ docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL   SWARM
default   -        virtualbox   Stopped
$ docker-machine upgrade default
Error: machine must be running to upgrade.
$ docker-machine start default
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
$ docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL                         SWARM
default   *        virtualbox   Running   tcp://192.168.99.100:2376
$ docker-machine upgrade default
Stopping machine to do the upgrade...
Upgrading machine default...
Latest release for github.com/boot2docker/boot2docker is v1.9.0

Downloading https://github.com/boot2docker/boot2docker/releases/download/v1.9.0/boot2docker.iso to C:\Users\ssluser\.docker\machine\cache\boot2docker.iso...
Starting machine back up...

11.All fine after that. Just running the upgrade a second time seemed to work.

amar-sanakal avatar Nov 13 '15 20:11 amar-sanakal

@arun-gupta @nathanleclaire docker-machine upgrade [machine-name] fixed mine!!! Thanks Much. FWIW, this upgrade-sync between client & server is really a PITA. Any cycles spent on making this better will be much appreciated!

ericm24 avatar Nov 17 '15 16:11 ericm24