Mismatch between api versions after automatic update to 1.11.0-beta6 with docker-machine on amazon

Expected behavior

$ eval $(docker-machine env machinenamerunningonamazonec2)
$ docker ps

List of running containers.

Actual behavior

$ eval $(docker-machine env machinenamerunningonamazonec2)
$ docker ps
Error response from daemon: client is newer than server (client API version: 1.23, server API version: 1.22)

Information

$ docker version
Client:
 Version:      1.11.0-rc3
 API version:  1.23
 Go version:   go1.5.3
 Git commit:   eabf97a
 Built:        Fri Apr  1 23:33:49 2016
 OS/Arch:      darwin/amd64
Error response from daemon: client is newer than server (client API version: 1.23, server API version: 1.22)
$ docker-machine version
docker-machine version 0.7.0-rc2, build 60dbecb
$ pinata diagnose -u
OS X: version 10.11.3 (build: 15D21)
Docker.app: version v1.11.0-beta6
Running diagnostic tests:
Error docker ps: timeout after 10.00s
[OK]      Moby booted
Error docker ps: timeout after 0.35s
Thread 6 killed on uncaught exception Misc.Failure
[OK]      driver.amd64-linux
[OK]      vmnetd
[OK]      osxfs
[OK]      db
[OK]      slirp
[OK]      menubar
[ERROR]   environment      the variables DOCKER_CERT_PATH DOCKER_TLS_VERIFY DOCKER_MACHINE_NAME DOCKER_HOST should not be set
[OK]      Docker
[OK]      VT-x
Docker logs are being collected into /tmp/20160406-140146.tar.gz.
Your unique id in bugsnag is: F9890884-5695-48AB-B8E8-685227E09F4B
Please quote this in all correspondence.
$ eval $(docker-machine env --unset)
$ pinata diagnose -u
OS X: version 10.11.3 (build: 15D21)
Docker.app: version v1.11.0-beta6
Running diagnostic tests:
[OK]      docker-cli
[OK]      Moby booted
[OK]      driver.amd64-linux
[OK]      vmnetd
[OK]      osxfs
[OK]      db
[OK]      slirp
[OK]      menubar
[OK]      environment
[OK]      Docker
[OK]      VT-x
Docker logs are being collected into /tmp/20160406-140421.tar.gz.
Your unique id in bugsnag is: F9890884-5695-48AB-B8E8-685227E09F4B
Please quote this in all correspondence.

OS X 10.11.3

Steps to reproduce the behavior

  1. Accept Docker for Mac automatic update to version 1.11.0-beta6
  2. Try to connect to any docker-machine

I tried docker-machine upgrade but it won’t go beyond the last stable version of Docker, of course, so it remains on API version 1.22.

I’m ok with either updating by docker-machines to the beta version or downgrading my client, but how do I do either of it?

The best I got so far is docker-machine ssh and a manual upgrade to the latest rc, but I’m open to better options.

@vdemario as of right now there isn’t an easy way to make this process any easier.
However if you look at the latest machine release change logs, you will see that docker machine RC will now support boot2docker RC releases as well.

RC versions of Machine will now create and upgrade to boot2docker RCs instead of stable versions if available

I received a similar error after installing Docker for Mac beta.

I had an installation of Docker Toolkit that it migrated for me.

➜  ~  docker version
Client:
 Version:      1.11.0
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   4dc5990
 Built:        Wed Apr 13 19:36:04 2016
 OS/Arch:      darwin/amd64
Error response from daemon: client is newer than server (client API version: 1.23, server API version: 1.22)

Running

docker-machine upgrade

Alleviated my issues.

➜  ~  docker-machine upgrade
➜  ~  docker version
Client:
 Version:      1.11.0
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   4dc5990
 Built:        Wed Apr 13 19:36:04 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      1.11.0
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   4dc5990
 Built:        Wed Apr 13 19:36:04 2016
 OS/Arch:      linux/amd64
1 Like

For anyone using Rackspace Carina, they have quick tutorial for DVM that solves the same issue https://getcarina.com/docs/tutorials/docker-version-manager/

I think Docker for Mac beta version doesn’t need docker-machine anymore.
So, executing

unset ${!DOCKER_*}

solved the problem for me.

This is true if you’re working in a local dev environment, but is little help if you’ve got remote engines and swarms out there that you can no longer communicate with due to the version mismatch.

1 Like

On OS X this solves the issue. (Background: After upgrading Docker via Homebrew, the virtualbox Boot2Docker ISO needed to be upgraded to match - docker-machine upgrade does just that).