Error response from daemon: client is newer than server with Docker 1.9 RC3
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.
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
Why this special treatment for RC?
This makes it non-intuitive.
Well, your Docker client binary is also an RC. How do you feel it should work?
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.
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.
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!
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.
Did you run docker-machine upgrade?
This machine was just created. Do I need to run docker-machine upgrade for that as well?
@arun-gupta Most likely, to update your cache and/or in case you made the machine before the official b2d release happened.
@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?
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.
docker-machine upgrade resolved the issue.
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.
:+1: for docker-machine upgrade
+1 for docker-machine upgrade - assuming the only thing being upgraded is docker-related ;)
:+1: for docker-machine upgrade <machine name>
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
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.
- 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.
- I ran a
docker-machine rm defaultjust as a safety step - Downloaded and installed the toolbox version 1.9.0c
- Git was the only thing I did not pick when prompted and installed everything else.
- Kicked off the Docker Quickstart Terminal
- 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.
@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!