4

Whenever I am trying to run docker-compose up it shows the below error related to a version mismatch of client and server.

client and server don't have same version (client : 1.19, server: 1.18)

Below are the installed versions of docker-compose and docker itself. Neither docker, nor docker-compose have 1.19 and 1.18 versions. So actually this message is referring to which client and server?

[root@node1 composetest]# docker -v
Docker version 1.6.2, build 7c8fca2/1.6.2
[root@node1 composetest]# docker-compose up
client and server don't have same version (client : 1.19, server: 1.18)

Further how to fix this issue. I am using centos 6 and have upgraded the docker to latest version.I had installed docker-compose using pip.

Henrik Sachse
  • 51,228
  • 7
  • 46
  • 59
thinkingmonster
  • 5,063
  • 8
  • 35
  • 57
  • possible duplicate of [docker-compose up leads to "client and server don't have same version (client : 1.14, server: 1.12)" error but client and server have the same version](http://stackoverflow.com/questions/29727171/docker-compose-up-leads-to-client-and-server-dont-have-same-version-client) – Henrik Sachse Aug 12 '15 at 07:35

3 Answers3

7

As of docker-compose 1.4 you can now set the client API version, so you don't have to downgrade the client, or upgrade the server.

Set the environment variable COMPOSE_API_VERSION=auto to have it auto-detect the client version, or COMPOSE_API_VERSION=1.18 to set the exact version.

dnephin
  • 25,944
  • 9
  • 55
  • 45
1

This happens when there's a mismatch in API versions. Seems like your docker daemon is not updated.

Here's my output for # docker version:

Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 786b29d
OS/Arch (server): linux/amd64
Fedalto
  • 1,507
  • 1
  • 10
  • 13
0

You either need to downgrade your docker client to version 1.6 or upgrade the server to version 1.7 to have an API match.

The versions are the API versions and not the product versions.

Henrik Sachse
  • 51,228
  • 7
  • 46
  • 59