2

I am getting error as "ERROR: client and server don't have same version (client : 1.21, server: 1.18)"

So I ran a command "export COMPOSE_API_VERSION=1.18" and now i am getting different error.

Traceback (most recent call last):
File "<string>", line 3, in <module>
File "compose/cli/main.py", line 61, in main
File "compose/cli/main.py", line 113, in perform_command
File "compose/cli/main.py", line 835, in up
File "compose/project.py", line 374, in up
File "compose/project.py", line 415, in initialize
File "compose/network.py", line 162, in initialize
File "compose/network.py", line 47, in ensure
File "compose/network.py", line 82, in inspect
File "site-packages/docker/utils/decorators.py", line 32, in wrapper
docker.errors.InvalidVersion: inspect_network is not available for version < 1.21
docker-compose returned -1

my docker-compose file can be found at gist

Docker Version : Docker version 1.12.0, build 8eab29e

Docker-compose : docker-compose version 1.8.0, build f3628c7

Ubuntu 14.04 64bit.

Any help would be appreciated. Thanks.

1 Answer 1

-1

You are running the latest version of docker (1.12) and docker-compose (1.8.0), locally. The error message implies that perhaps you're launching containers on a remote server? (started with docker-machine?)

I suggest upgrading the version of docker running on the target server.

The documentation on the COMPOSE_API_VERSION variable states that's only supposed to be used as a work-around.

Setting this variable is intended as a workaround for situations where you need to run temporarily with a mismatch between the client and server version. For example, if you can upgrade the client but need to wait to upgrade the server.

Running with this variable set and a known mismatch does prevent some Docker features from working properly. The exact features that fail would depend on the Docker client and server versions. For this reason, running with this variable set is only intended as a workaround and it is not officially supported.

If you run into problems running with this set, resolve the mismatch through upgrade and remove this setting to see if your problems resolve before notifying support.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.