New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: client version 1.22 is too old #4106

Closed
PatrickLang opened this Issue Nov 3, 2016 · 31 comments

Comments

Projects
None yet
@PatrickLang

PatrickLang commented Nov 3, 2016

I'm trying to run https://github.com/docker/labs/blob/master/windows/windows-containers/MultiContainerApp.md using Docker-Compose with named pipes. It's failing with an error about client API version:

PS C:\Source\Musicstore> docker-compose -f .\docker-compose.windows.yml up
ERROR: client version 1.22 is too old. Minimum supported API version is 1.25, please upgrade your client to a newer version
PS C:\Source\Musicstore> docker-compose -f .\docker-compose.windows.yml ps
ERROR: client version 1.22 is too old. Minimum supported API version is 1.25, please upgrade your client to a newer version

Here's what I have installed:

docker-compose version

docker-compose version 1.9.0-rc2, build d41f869
docker-py version: 1.10.5
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2h  3 May 2016

docker version:

Client:
 Version:      1.13.0-dev
 API version:  1.25
 Go version:   go1.7.3
 Git commit:   877c860
 Built:        Thu Nov  3 04:06:20 2016
 OS/Arch:      windows/amd64

Server:
 Version:      1.13.0-dev
 API version:  1.25
 Go version:   go1.7.3
 Git commit:   877c860
 Built:        Thu Nov  3 04:06:20 2016
 OS/Arch:      windows/amd64
 Experimental: false
@nicholasdille

This comment has been minimized.

Show comment
Hide comment
@nicholasdille

nicholasdille Nov 3, 2016

I am seeing the same issue then running docker-compose up on Windows Server 2016 RTM against a remote Windows Server 2016 RTM:
echo $env:DOCKER_HOST:

tcp://10.0.0.201:2375

docker-compose version:

docker-compose version 1.8.1, build 004ddae
docker-py version: 1.10.3
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2h  3 May 2016

docker version:

Client:
 Version:      1.12.2-cs2-ws-beta
 API version:  1.25
 Go version:   go1.7.1
 Git commit:   050b611
 Built:        Tue Oct 11 02:35:40 2016
 OS/Arch:      windows/amd64

Server:
 Version:      1.13.0-dev
 API version:  1.25
 Go version:   go1.7.3
 Git commit:   81683e8
 Built:        Thu Nov  3 15:40:00 2016
 OS/Arch:      windows/amd64

nicholasdille commented Nov 3, 2016

I am seeing the same issue then running docker-compose up on Windows Server 2016 RTM against a remote Windows Server 2016 RTM:
echo $env:DOCKER_HOST:

tcp://10.0.0.201:2375

docker-compose version:

docker-compose version 1.8.1, build 004ddae
docker-py version: 1.10.3
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2h  3 May 2016

docker version:

Client:
 Version:      1.12.2-cs2-ws-beta
 API version:  1.25
 Go version:   go1.7.1
 Git commit:   050b611
 Built:        Tue Oct 11 02:35:40 2016
 OS/Arch:      windows/amd64

Server:
 Version:      1.13.0-dev
 API version:  1.25
 Go version:   go1.7.3
 Git commit:   81683e8
 Built:        Thu Nov  3 15:40:00 2016
 OS/Arch:      windows/amd64
@shin-

This comment has been minimized.

Show comment
Hide comment
@shin-

shin- Nov 3, 2016

Member

The Engine shouldn't refuse older clients. This is a wontfix as far as Compose is concerned - implications of changing the API version are too great.

Member

shin- commented Nov 3, 2016

The Engine shouldn't refuse older clients. This is a wontfix as far as Compose is concerned - implications of changing the API version are too great.

@nicholasdille

This comment has been minimized.

Show comment
Hide comment
@nicholasdille

nicholasdille Nov 4, 2016

Isn't the message related to docker-py 1.10.5 which implements API version 1.22? Is it possible to update docker-py independently of docker-compose on Windows? Feels like I am missing something here ;-)

nicholasdille commented Nov 4, 2016

Isn't the message related to docker-py 1.10.5 which implements API version 1.22? Is it possible to update docker-py independently of docker-compose on Windows? Feels like I am missing something here ;-)

@PatrickLang

This comment has been minimized.

Show comment
Hide comment
@PatrickLang

PatrickLang Nov 5, 2016

Ok, I picked up builds of Docker/DockerD that have moby/moby#28072 fixed.

Based on the discussion there - I think that I should still be getting ERROR: client version 1.22 is too old. Minimum supported API version is 1.25, please upgrade your client because the docker-compose file has version: '2'. Instead, I get this:

PS C:\Users\Patrick\Source\Repos\MusicStore> docker-compose -f .\docker-compose.windows.yml build
db uses an image, skipping
Building web
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "compose\cli\main.py", line 65, in main
  File "compose\cli\main.py", line 117, in perform_command
  File "compose\cli\main.py", line 223, in build
  File "compose\project.py", line 300, in build
  File "compose\service.py", line 741, in build
  File "site-packages\docker\api\build.py", line 105, in build
  File "site-packages\docker\utils\decorators.py", line 47, in inner
  File "site-packages\docker\client.py", line 135, in _post
  File "site-packages\requests\sessions.py", line 522, in post
  File "site-packages\requests\sessions.py", line 475, in request
  File "site-packages\requests\sessions.py", line 596, in send
  File "site-packages\requests\adapters.py", line 423, in send
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 595, in urlopen
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 363, in _make_request
  File "httplib.py", line 1057, in request
  File "httplib.py", line 1097, in _send_request
  File "httplib.py", line 1053, in endheaders
  File "httplib.py", line 901, in _send_output
  File "httplib.py", line 870, in send
  File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
  File "site-packages\docker\transport\npipesocket.py", line 158, in sendall
  File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
  File "site-packages\docker\transport\npipesocket.py", line 153, in send
pywintypes.error: (232, 'WriteFile', 'The pipe is being closed.')
docker-compose returned -1

Why aren't I getting the right error?

If I change it to version: '2.1', then it works as expected.

For reference, here's the versions I'm using now:

PS C:\Users\Patrick\Source\Repos\MusicStore> docker-compose version
docker-compose version 1.9.0dev, build 9046e33
docker-py version: 1.10.6
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2h  3 May 2016
PS C:\Users\Patrick\Source\Repos\MusicStore> docker version
Client:
 Version:      1.13.0-dev
 API version:  1.25
 Go version:   go1.7.3
 Git commit:   c5ceb0f
 Built:        Sat Nov  5 03:24:43 2016
 OS/Arch:      windows/amd64

Server:
 Version:      1.13.0-dev
 API version:  1.25
 Go version:   go1.7.3
 Git commit:   c5ceb0f
 Built:        Sat Nov  5 03:24:43 2016
 OS/Arch:      windows/amd64
 Experimental: false

PatrickLang commented Nov 5, 2016

Ok, I picked up builds of Docker/DockerD that have moby/moby#28072 fixed.

Based on the discussion there - I think that I should still be getting ERROR: client version 1.22 is too old. Minimum supported API version is 1.25, please upgrade your client because the docker-compose file has version: '2'. Instead, I get this:

PS C:\Users\Patrick\Source\Repos\MusicStore> docker-compose -f .\docker-compose.windows.yml build
db uses an image, skipping
Building web
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "compose\cli\main.py", line 65, in main
  File "compose\cli\main.py", line 117, in perform_command
  File "compose\cli\main.py", line 223, in build
  File "compose\project.py", line 300, in build
  File "compose\service.py", line 741, in build
  File "site-packages\docker\api\build.py", line 105, in build
  File "site-packages\docker\utils\decorators.py", line 47, in inner
  File "site-packages\docker\client.py", line 135, in _post
  File "site-packages\requests\sessions.py", line 522, in post
  File "site-packages\requests\sessions.py", line 475, in request
  File "site-packages\requests\sessions.py", line 596, in send
  File "site-packages\requests\adapters.py", line 423, in send
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 595, in urlopen
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 363, in _make_request
  File "httplib.py", line 1057, in request
  File "httplib.py", line 1097, in _send_request
  File "httplib.py", line 1053, in endheaders
  File "httplib.py", line 901, in _send_output
  File "httplib.py", line 870, in send
  File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
  File "site-packages\docker\transport\npipesocket.py", line 158, in sendall
  File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
  File "site-packages\docker\transport\npipesocket.py", line 153, in send
pywintypes.error: (232, 'WriteFile', 'The pipe is being closed.')
docker-compose returned -1

Why aren't I getting the right error?

If I change it to version: '2.1', then it works as expected.

For reference, here's the versions I'm using now:

PS C:\Users\Patrick\Source\Repos\MusicStore> docker-compose version
docker-compose version 1.9.0dev, build 9046e33
docker-py version: 1.10.6
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2h  3 May 2016
PS C:\Users\Patrick\Source\Repos\MusicStore> docker version
Client:
 Version:      1.13.0-dev
 API version:  1.25
 Go version:   go1.7.3
 Git commit:   c5ceb0f
 Built:        Sat Nov  5 03:24:43 2016
 OS/Arch:      windows/amd64

Server:
 Version:      1.13.0-dev
 API version:  1.25
 Go version:   go1.7.3
 Git commit:   c5ceb0f
 Built:        Sat Nov  5 03:24:43 2016
 OS/Arch:      windows/amd64
 Experimental: false
@shin-

This comment has been minimized.

Show comment
Hide comment
@shin-

shin- Nov 7, 2016

Member

@PatrickLang It's possible build behaves a bit differently than other commands. Do you see the same issue with up or ps?

Member

shin- commented Nov 7, 2016

@PatrickLang It's possible build behaves a bit differently than other commands. Do you see the same issue with up or ps?

@shin-

This comment has been minimized.

Show comment
Hide comment
@shin-

shin- Nov 7, 2016

Member

FWIW, I get the same type of error on Linux if I try to build with a version < 1.12

$ python
Python 2.7.9 (default, Apr  2 2015, 15:33:21) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import docker
>>> c = docker.Client(version='1.11')
>>> c.build('.')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/docker_py-1.10.6-py2.7.egg/docker/api/build.py", line 105, in build
    timeout=timeout,
  File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/docker_py-1.10.6-py2.7.egg/docker/utils/decorators.py", line 47, in inner
    return f(self, *args, **kwargs)
  File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/docker_py-1.10.6-py2.7.egg/docker/client.py", line 135, in _post
    return self.post(url, **self._set_request_timeout(kwargs))
  File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/requests/sessions.py", line 508, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/requests/sessions.py", line 465, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/requests/sessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
  File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/requests/adapters.py", line 415, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', error(104, 'Connection reset by peer'))
Member

shin- commented Nov 7, 2016

FWIW, I get the same type of error on Linux if I try to build with a version < 1.12

$ python
Python 2.7.9 (default, Apr  2 2015, 15:33:21) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import docker
>>> c = docker.Client(version='1.11')
>>> c.build('.')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/docker_py-1.10.6-py2.7.egg/docker/api/build.py", line 105, in build
    timeout=timeout,
  File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/docker_py-1.10.6-py2.7.egg/docker/utils/decorators.py", line 47, in inner
    return f(self, *args, **kwargs)
  File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/docker_py-1.10.6-py2.7.egg/docker/client.py", line 135, in _post
    return self.post(url, **self._set_request_timeout(kwargs))
  File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/requests/sessions.py", line 508, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/requests/sessions.py", line 465, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/requests/sessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
  File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/requests/adapters.py", line 415, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', error(104, 'Connection reset by peer'))
@nerumo

This comment has been minimized.

Show comment
Hide comment
@nerumo

nerumo Dec 5, 2016

I'm getting the same issue with

Client:
Version: 1.13.0-rc2
API version: 1.25
Go version: go1.7.3
Git commit: 1f9b3ef
Built: Wed Nov 23 17:40:58 2016
OS/Arch: windows/amd64

Server:
Version: 1.13.0-rc2
API version: 1.25
Minimum API version: 1.24
Go version: go1.7.3
Git commit: 1f9b3ef
Built: Wed Nov 23 17:40:58 2016
OS/Arch: windows/amd64
Experimental: false

nerumo commented Dec 5, 2016

I'm getting the same issue with

Client:
Version: 1.13.0-rc2
API version: 1.25
Go version: go1.7.3
Git commit: 1f9b3ef
Built: Wed Nov 23 17:40:58 2016
OS/Arch: windows/amd64

Server:
Version: 1.13.0-rc2
API version: 1.25
Minimum API version: 1.24
Go version: go1.7.3
Git commit: 1f9b3ef
Built: Wed Nov 23 17:40:58 2016
OS/Arch: windows/amd64
Experimental: false

@nerumo

This comment has been minimized.

Show comment
Hide comment
@nerumo

nerumo Dec 8, 2016

Nevermind my comment, after setting version to 2.1 it worked. But the error message could be a bit more specific

nerumo commented Dec 8, 2016

Nevermind my comment, after setting version to 2.1 it worked. But the error message could be a bit more specific

@adamtuliper

This comment has been minimized.

Show comment
Hide comment
@adamtuliper

adamtuliper Dec 8, 2016

FYI - tried 2.1 and it fixed the issue for me. Thanks :)

adamtuliper commented Dec 8, 2016

FYI - tried 2.1 and it fixed the issue for me. Thanks :)

@PatrickLang

This comment has been minimized.

Show comment
Hide comment
@PatrickLang

PatrickLang Dec 9, 2016

I still get the error trying to build a docker-compose.yml with version: "2.0" using Docker version v1.13-rc3 too.

PatrickLang commented Dec 9, 2016

I still get the error trying to build a docker-compose.yml with version: "2.0" using Docker version v1.13-rc3 too.

@shin-

This comment has been minimized.

Show comment
Hide comment
@shin-

shin- Dec 9, 2016

Member

@PatrickLang Yes - you have to use 2.1 on Windows.

Member

shin- commented Dec 9, 2016

@PatrickLang Yes - you have to use 2.1 on Windows.

@PatrickLang

This comment has been minimized.

Show comment
Hide comment
@PatrickLang

PatrickLang Dec 9, 2016

@shin- should we close this issue? I think we should still fix the error message to say "Windows requires version 2.1 or greater" instead of

PS C:\Users\Patrick\Source\Repos\MusicStore> docker-compose -f .\docker-compose.windows.yml build
db uses an image, skipping
Building web
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "compose\cli\main.py", line 65, in main
  File "compose\cli\main.py", line 117, in perform_command
  File "compose\cli\main.py", line 223, in build
  File "compose\project.py", line 300, in build
  File "compose\service.py", line 741, in build
  File "site-packages\docker\api\build.py", line 105, in build
  File "site-packages\docker\utils\decorators.py", line 47, in inner
  File "site-packages\docker\client.py", line 135, in _post
  File "site-packages\requests\sessions.py", line 522, in post
  File "site-packages\requests\sessions.py", line 475, in request
  File "site-packages\requests\sessions.py", line 596, in send
  File "site-packages\requests\adapters.py", line 423, in send
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 595, in urlopen
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 363, in _make_request
  File "httplib.py", line 1057, in request
  File "httplib.py", line 1097, in _send_request
  File "httplib.py", line 1053, in endheaders
  File "httplib.py", line 901, in _send_output
  File "httplib.py", line 870, in send
  File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
  File "site-packages\docker\transport\npipesocket.py", line 158, in sendall
  File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
  File "site-packages\docker\transport\npipesocket.py", line 153, in send
pywintypes.error: (232, 'WriteFile', 'The pipe is being closed.')
docker-compose returned -1

Should I file a separate issue for that and close this one?

PatrickLang commented Dec 9, 2016

@shin- should we close this issue? I think we should still fix the error message to say "Windows requires version 2.1 or greater" instead of

PS C:\Users\Patrick\Source\Repos\MusicStore> docker-compose -f .\docker-compose.windows.yml build
db uses an image, skipping
Building web
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "compose\cli\main.py", line 65, in main
  File "compose\cli\main.py", line 117, in perform_command
  File "compose\cli\main.py", line 223, in build
  File "compose\project.py", line 300, in build
  File "compose\service.py", line 741, in build
  File "site-packages\docker\api\build.py", line 105, in build
  File "site-packages\docker\utils\decorators.py", line 47, in inner
  File "site-packages\docker\client.py", line 135, in _post
  File "site-packages\requests\sessions.py", line 522, in post
  File "site-packages\requests\sessions.py", line 475, in request
  File "site-packages\requests\sessions.py", line 596, in send
  File "site-packages\requests\adapters.py", line 423, in send
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 595, in urlopen
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 363, in _make_request
  File "httplib.py", line 1057, in request
  File "httplib.py", line 1097, in _send_request
  File "httplib.py", line 1053, in endheaders
  File "httplib.py", line 901, in _send_output
  File "httplib.py", line 870, in send
  File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
  File "site-packages\docker\transport\npipesocket.py", line 158, in sendall
  File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
  File "site-packages\docker\transport\npipesocket.py", line 153, in send
pywintypes.error: (232, 'WriteFile', 'The pipe is being closed.')
docker-compose returned -1

Should I file a separate issue for that and close this one?

@shin-

This comment has been minimized.

Show comment
Hide comment
@shin-

shin- Dec 9, 2016

Member

pywintypes.error: (232, 'WriteFile', 'The pipe is being closed.')

That's an engine issue - the connection shouldn't be closed like this. It's a problem on Linux too as I mentioned here: #4106 (comment)

We can look into adding Windows checks with a distinct error message, but we have to differentiate Windows Engine from "Docker For Windows"

Member

shin- commented Dec 9, 2016

pywintypes.error: (232, 'WriteFile', 'The pipe is being closed.')

That's an engine issue - the connection shouldn't be closed like this. It's a problem on Linux too as I mentioned here: #4106 (comment)

We can look into adding Windows checks with a distinct error message, but we have to differentiate Windows Engine from "Docker For Windows"

@reduardo7

This comment has been minimized.

Show comment
Hide comment
@reduardo7

reduardo7 Feb 16, 2017

Maybe related with: #268

Try to change version: "2" to "version: "2.1" in you docker-compose.yml file.

reduardo7 commented Feb 16, 2017

Maybe related with: #268

Try to change version: "2" to "version: "2.1" in you docker-compose.yml file.

@prochnowc

This comment has been minimized.

Show comment
Hide comment
@prochnowc

prochnowc Feb 17, 2017

@shin- I still get the error when running docker-compose on docker for windows.

version: '2.1'

PS C:\> docker-compose version
docker-compose version 1.11.1, build 7afaa436
docker-py version: 2.0.2
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.2j  26 Sep 2016
PS C:\dev\Source\DevTools\Docker> docker version
Client:
 Version:      1.13.1
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 08:47:51 2017
 OS/Arch:      windows/amd64

Server:
 Version:      1.13.1
 API version:  1.26 (minimum version 1.24)
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 08:47:51 2017
 OS/Arch:      windows/amd64
 Experimental: true
PS C:\dev\Source\DevTools\Docker> docker-compose -f .\docker-compose.windows.yml build
consul uses an image, skipping
sql uses an image, skipping
Building audittrail
Traceback (most recent call last):
  File "docker-compose", line 3, in <module>
  File "compose\cli\main.py", line 88, in main
  File "compose\cli\main.py", line 140, in perform_command
  File "compose\cli\main.py", line 247, in build
  File "compose\project.py", line 313, in build
  File "compose\service.py", line 804, in build
  File "site-packages\docker\api\build.py", line 205, in build
  File "site-packages\docker\utils\decorators.py", line 47, in inner
  File "site-packages\docker\api\client.py", line 175, in _post
  File "site-packages\requests\sessions.py", line 522, in post
  File "site-packages\requests\sessions.py", line 475, in request
  File "site-packages\requests\sessions.py", line 596, in send
  File "site-packages\requests\adapters.py", line 423, in send
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 595, in urlopen
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 363, in _make_request
  File "httplib.py", line 1042, in request
  File "httplib.py", line 1082, in _send_request
  File "httplib.py", line 1038, in endheaders
  File "httplib.py", line 886, in _send_output
  File "httplib.py", line 855, in send
  File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
  File "site-packages\docker\transport\npipesocket.py", line 159, in sendall
  File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
  File "site-packages\docker\transport\npipesocket.py", line 154, in send
pywintypes.error: (232, 'WriteFile', 'The pipe is being closed.')
Failed to execute script docker-compose

prochnowc commented Feb 17, 2017

@shin- I still get the error when running docker-compose on docker for windows.

version: '2.1'

PS C:\> docker-compose version
docker-compose version 1.11.1, build 7afaa436
docker-py version: 2.0.2
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.2j  26 Sep 2016
PS C:\dev\Source\DevTools\Docker> docker version
Client:
 Version:      1.13.1
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 08:47:51 2017
 OS/Arch:      windows/amd64

Server:
 Version:      1.13.1
 API version:  1.26 (minimum version 1.24)
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 08:47:51 2017
 OS/Arch:      windows/amd64
 Experimental: true
PS C:\dev\Source\DevTools\Docker> docker-compose -f .\docker-compose.windows.yml build
consul uses an image, skipping
sql uses an image, skipping
Building audittrail
Traceback (most recent call last):
  File "docker-compose", line 3, in <module>
  File "compose\cli\main.py", line 88, in main
  File "compose\cli\main.py", line 140, in perform_command
  File "compose\cli\main.py", line 247, in build
  File "compose\project.py", line 313, in build
  File "compose\service.py", line 804, in build
  File "site-packages\docker\api\build.py", line 205, in build
  File "site-packages\docker\utils\decorators.py", line 47, in inner
  File "site-packages\docker\api\client.py", line 175, in _post
  File "site-packages\requests\sessions.py", line 522, in post
  File "site-packages\requests\sessions.py", line 475, in request
  File "site-packages\requests\sessions.py", line 596, in send
  File "site-packages\requests\adapters.py", line 423, in send
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 595, in urlopen
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 363, in _make_request
  File "httplib.py", line 1042, in request
  File "httplib.py", line 1082, in _send_request
  File "httplib.py", line 1038, in endheaders
  File "httplib.py", line 886, in _send_output
  File "httplib.py", line 855, in send
  File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
  File "site-packages\docker\transport\npipesocket.py", line 159, in sendall
  File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
  File "site-packages\docker\transport\npipesocket.py", line 154, in send
pywintypes.error: (232, 'WriteFile', 'The pipe is being closed.')
Failed to execute script docker-compose
@aberlin75

This comment has been minimized.

Show comment
Hide comment
@aberlin75

aberlin75 Mar 9, 2017

Same happen in VS2017 with docker 1.26 client version, I'll try to fix it changing .yml files version to '2.1' but still same error occurs.

1>------ Operación Compilar iniciada: proyecto: docker-compose, configuración: Debug Any CPU ------
1>docker-compose -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.override.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.vs.debug.yml" -p dockercompose3258359292 config
1>networks: {}
1>services:
1> webapplication1:
1> build:
1> args:
1> source: obj/Docker/empty/
1> context: c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\WebApplication1
1> dockerfile: Dockerfile
1> entrypoint: tail -f /dev/null
1> environment:
1> ASPNETCORE_ENVIRONMENT: Development
1> DOTNET_USE_POLLING_FILE_WATCHER: '1'
1> image: webapplication1:dev
1> labels:
1> com.microsoft.visualstudio.targetoperatingsystem: linux
1> ports:
1> - '80'
1> volumes:
1> - c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\WebApplication1:/app:rw
1> - C:\Users\aberlin\clrdbg:/clrdbg:ro
1> - C:\Users\aberlin.nuget\packages:/root/.nuget/packages:ro
1>version: '2.1'
1>volumes: {}
1>docker ps --filter "status=running" --filter "name=dockercompose3258359292_webapplication1_" --format {{.ID}} -n 1
1>WebApplication1 -> c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\WebApplication1\bin\Debug\netcoreapp1.1\WebApplication1.dll
1>C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -NoProfile -WindowStyle Hidden -ExecutionPolicy RemoteSigned -File "C:\Users\aberlin\AppData\Local\Temp\GetClrDbg.ps1" -Version latest -RuntimeID debian.8-x64 -InstallPath "C:\Users\aberlin\clrdbg"
1>Info: Using clrdbg version '15.0.26022.0'
1>Info: Using Runtime ID 'debian.8-x64'
1>Info: Latest version of ClrDbg is present. Skipping downloads
1>docker-compose -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.override.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.vs.release.yml" -p dockercompose3258359292 kill
1>docker-compose -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.override.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.vs.release.yml" -p dockercompose3258359292 down --rmi local --remove-orphans
1>Removing network dockercompose3258359292_default
1>Network dockercompose3258359292_default not found.
1>docker-compose -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.override.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.vs.debug.yml" -p dockercompose3258359292 kill
1>docker-compose -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.override.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.vs.debug.yml" -p dockercompose3258359292 down --rmi local --remove-orphans
1>Removing network dockercompose3258359292_default
1>Network dockercompose3258359292_default not found.
1>docker-compose -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.override.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.vs.debug.yml" -p dockercompose3258359292 up -d --build
1>Creating network "dockercompose3258359292_default" with the default driver
1>HNS failed with error : Unspecified error
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: Error inesperado en la tarea "PrepareForLaunch".
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose3258359292_default" with the default driver
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: HNS failed with error : Unspecified error.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018:
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: Para más información de solución de problemas, vaya a http://aka.ms/DockerToolsTroubleshooting ---> Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose3258359292_default" with the default driver
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: HNS failed with error : Unspecified error
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.DotNet.Docker.DockerComposeClient.d__18.MoveNext()
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: --- Fin del seguimiento de la pila de la excepción interna ---
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.DotNet.Docker.DockerComposeClient.d__18.MoveNext()
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: --- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.DotNet.Docker.DockerWorkspace.d__14.MoveNext()
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: --- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.DotNet.Docker.BuildTasks.DockerBaseTask.Execute()
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
1>Compilación del proyecto "docker-compose.dcproj" terminada -- ERROR.
========== Compilar: 0 correctos o actualizados, 1 incorrectos, 0 omitidos ==========

aberlin75 commented Mar 9, 2017

Same happen in VS2017 with docker 1.26 client version, I'll try to fix it changing .yml files version to '2.1' but still same error occurs.

1>------ Operación Compilar iniciada: proyecto: docker-compose, configuración: Debug Any CPU ------
1>docker-compose -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.override.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.vs.debug.yml" -p dockercompose3258359292 config
1>networks: {}
1>services:
1> webapplication1:
1> build:
1> args:
1> source: obj/Docker/empty/
1> context: c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\WebApplication1
1> dockerfile: Dockerfile
1> entrypoint: tail -f /dev/null
1> environment:
1> ASPNETCORE_ENVIRONMENT: Development
1> DOTNET_USE_POLLING_FILE_WATCHER: '1'
1> image: webapplication1:dev
1> labels:
1> com.microsoft.visualstudio.targetoperatingsystem: linux
1> ports:
1> - '80'
1> volumes:
1> - c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\WebApplication1:/app:rw
1> - C:\Users\aberlin\clrdbg:/clrdbg:ro
1> - C:\Users\aberlin.nuget\packages:/root/.nuget/packages:ro
1>version: '2.1'
1>volumes: {}
1>docker ps --filter "status=running" --filter "name=dockercompose3258359292_webapplication1_" --format {{.ID}} -n 1
1>WebApplication1 -> c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\WebApplication1\bin\Debug\netcoreapp1.1\WebApplication1.dll
1>C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -NoProfile -WindowStyle Hidden -ExecutionPolicy RemoteSigned -File "C:\Users\aberlin\AppData\Local\Temp\GetClrDbg.ps1" -Version latest -RuntimeID debian.8-x64 -InstallPath "C:\Users\aberlin\clrdbg"
1>Info: Using clrdbg version '15.0.26022.0'
1>Info: Using Runtime ID 'debian.8-x64'
1>Info: Latest version of ClrDbg is present. Skipping downloads
1>docker-compose -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.override.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.vs.release.yml" -p dockercompose3258359292 kill
1>docker-compose -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.override.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.vs.release.yml" -p dockercompose3258359292 down --rmi local --remove-orphans
1>Removing network dockercompose3258359292_default
1>Network dockercompose3258359292_default not found.
1>docker-compose -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.override.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.vs.debug.yml" -p dockercompose3258359292 kill
1>docker-compose -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.override.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.vs.debug.yml" -p dockercompose3258359292 down --rmi local --remove-orphans
1>Removing network dockercompose3258359292_default
1>Network dockercompose3258359292_default not found.
1>docker-compose -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.override.yml" -f "c:\users\aberlin\documents\visual studio 2017\Projects\WebApplication1\docker-compose.vs.debug.yml" -p dockercompose3258359292 up -d --build
1>Creating network "dockercompose3258359292_default" with the default driver
1>HNS failed with error : Unspecified error
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: Error inesperado en la tarea "PrepareForLaunch".
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose3258359292_default" with the default driver
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: HNS failed with error : Unspecified error.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018:
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: Para más información de solución de problemas, vaya a http://aka.ms/DockerToolsTroubleshooting ---> Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose3258359292_default" with the default driver
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: HNS failed with error : Unspecified error
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.DotNet.Docker.DockerComposeClient.d__18.MoveNext()
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: --- Fin del seguimiento de la pila de la excepción interna ---
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.DotNet.Docker.DockerComposeClient.d__18.MoveNext()
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: --- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.DotNet.Docker.DockerWorkspace.d__14.MoveNext()
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: --- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.DotNet.Docker.BuildTasks.DockerBaseTask.Execute()
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
1>Compilación del proyecto "docker-compose.dcproj" terminada -- ERROR.
========== Compilar: 0 correctos o actualizados, 1 incorrectos, 0 omitidos ==========

@shin-

This comment has been minimized.

Show comment
Hide comment
@shin-

shin- Mar 10, 2017

Member

@aberlin75 That error seems unrelated. Looks like a network issue similar to #4482

Member

shin- commented Mar 10, 2017

@aberlin75 That error seems unrelated. Looks like a network issue similar to #4482

jonashackt added a commit to jonashackt/cxf-spring-cloud-netflix-docker that referenced this issue Mar 14, 2017

jonashackt added a commit to jonashackt/Virtualization-Documentation that referenced this issue Mar 14, 2017

Fixing ERROR: client version 1.2x is too old. Minimum supported API v…
…ersion is 1.2x

As docker/compose#4106 states, the change to '2.1' fixes the following error, when running 'docker-compose up': ERROR: client version 1.2x is too old. Minimum supported API version is 1.2x, please upgrade your client to a newer version

PatrickLang added a commit to MicrosoftDocs/Virtualization-Documentation that referenced this issue Mar 27, 2017

Fixing ERROR: client version 1.2x is too old. Minimum supported API v…
…ersion is 1.2x (#576)

As docker/compose#4106 states, the change to '2.1' fixes the following error, when running 'docker-compose up': ERROR: client version 1.2x is too old. Minimum supported API version is 1.2x, please upgrade your client to a newer version

sebn added a commit to cozy-labs/cozy-desktop that referenced this issue Apr 10, 2017

build: Run unit tests on AppVeyor
Set docker-compose.yml version to 2.1 to fix a strange issue on Windows.
See: docker/compose#4106

This may not occur anymore since we finally used docker-for-windows
instead of the preinstalled docker in AppVeyor's VS2017 image.

We also don't need to `DockerCli -SwitchDaemon`.

sebn added a commit to cozy-labs/cozy-desktop that referenced this issue Apr 10, 2017

build: Run unit tests on AppVeyor
Set docker-compose.yml version to 2.1 to fix a strange issue on Windows.
See: docker/compose#4106

This may not occur anymore since we finally used docker-for-windows
instead of the preinstalled docker in AppVeyor's VS2017 image.

We also don't need to `DockerCli -SwitchDaemon`.

sebn added a commit to cozy-labs/cozy-desktop that referenced this issue Apr 10, 2017

build: Run unit tests on AppVeyor
Set docker-compose.yml version to 2.1 to fix a strange issue on Windows.
See: docker/compose#4106

This may not occur anymore since we finally used docker-for-windows
instead of the preinstalled docker in AppVeyor's VS2017 image.

We also don't need to `DockerCli -SwitchDaemon`.

sebn added a commit to cozy-labs/cozy-desktop that referenced this issue Apr 10, 2017

build: Run unit tests on AppVeyor
Set docker-compose.yml version to 2.1 to fix a strange issue on Windows.
See: docker/compose#4106

This may not occur anymore since we finally used docker-for-windows
instead of the preinstalled docker in AppVeyor's VS2017 image.

We also don't need to `DockerCli -SwitchDaemon`.

sebn added a commit to cozy-labs/cozy-desktop that referenced this issue Apr 10, 2017

build: Run unit tests on AppVeyor
Set docker-compose.yml version to 2.1 to fix a strange issue on Windows.
See: docker/compose#4106

This may not occur anymore since we finally used docker-for-windows
instead of the preinstalled docker in AppVeyor's VS2017 image.

We also don't need to `DockerCli -SwitchDaemon`.

sebn added a commit to cozy-labs/cozy-desktop that referenced this issue Apr 17, 2017

build: Run unit tests on AppVeyor
Set docker-compose.yml version to 2.1 to fix a strange issue on Windows.
See: docker/compose#4106

This may not occur anymore since we finally used docker-for-windows
instead of the preinstalled docker in AppVeyor's VS2017 image.

We also don't need to `DockerCli -SwitchDaemon`.

sebn added a commit to cozy-labs/cozy-desktop that referenced this issue Apr 18, 2017

build: Run unit tests on AppVeyor
Also set docker-compose.yml version to 2.1 to fix a strange issue on Windows.
See: docker/compose#4106
Although we don't use it on CI (running linux containers on AppVeyor
is not easy).

sebn added a commit to cozy-labs/cozy-desktop that referenced this issue Apr 18, 2017

build: Run unit tests on AppVeyor
Also set docker-compose.yml version to 2.1 to fix a strange issue on Windows.
See: docker/compose#4106
Although we don't use it on CI (running linux containers on AppVeyor
is not easy).

sebn added a commit to cozy-labs/cozy-desktop that referenced this issue Apr 18, 2017

build: Run unit tests on AppVeyor
Set up test env with remote Cozy instance (running linux containers
on AppVeyor is not easy).

Also set docker-compose.yml version to 2.1 to fix a strange issue on Windows.
See: docker/compose#4106

sebn added a commit to cozy-labs/cozy-desktop that referenced this issue Apr 18, 2017

build: Run unit tests on AppVeyor
Set up test env with remote Cozy instance (running linux containers
on AppVeyor is not easy).

Also set docker-compose.yml version to 2.1 to fix a strange issue on Windows.
See: docker/compose#4106

sebn added a commit to cozy-labs/cozy-desktop that referenced this issue Apr 18, 2017

build: Run unit tests on AppVeyor
Set up test env with remote Cozy instance (running linux containers
on AppVeyor is not easy).

Also set docker-compose.yml version to 2.1 to fix a strange issue on Windows.
See: docker/compose#4106

rainabba added a commit to rainabba/ndc-london-2017 that referenced this issue May 12, 2017

Update docker version in docker-compose.yml
I was just trying to follow along with http://markheath.net/post/get-up-and-running-with-docker-for-windows and hit an error that led me to docker/compose#4106 and once I changed the version to 2.1, I was able to move along.
@hugo1337

This comment has been minimized.

Show comment
Hide comment
@hugo1337

hugo1337 Jun 20, 2017

Hi guys, after changing docker-compose.yml version from '2' to '2.1' I get following error: Creating network "laradock_default" with the default driver
ERROR: HNS failed with error : wrong parameter.

docker version
Client:
Version: 17.03.1-ce
API version: 1.27
Go version: go1.7.5
Git commit: c6d412e
Built: Tue Mar 28 00:40:02 2017
OS/Arch: windows/amd64

Server:
Version: 17.03.1-ce
API version: 1.27 (minimum version 1.24)
Go version: go1.7.5
Git commit: c6d412e
Built: Tue Mar 28 00:40:02 2017
OS/Arch: windows/amd64
Experimental: true

any ideas? :)

hugo1337 commented Jun 20, 2017

Hi guys, after changing docker-compose.yml version from '2' to '2.1' I get following error: Creating network "laradock_default" with the default driver
ERROR: HNS failed with error : wrong parameter.

docker version
Client:
Version: 17.03.1-ce
API version: 1.27
Go version: go1.7.5
Git commit: c6d412e
Built: Tue Mar 28 00:40:02 2017
OS/Arch: windows/amd64

Server:
Version: 17.03.1-ce
API version: 1.27 (minimum version 1.24)
Go version: go1.7.5
Git commit: c6d412e
Built: Tue Mar 28 00:40:02 2017
OS/Arch: windows/amd64
Experimental: true

any ideas? :)

@nikoo56

This comment has been minimized.

Show comment
Hide comment
@nikoo56

nikoo56 Jul 5, 2017

I am getting same error when I change the version in compose file to 2.1 I am getting this error: Creating network with default driver HNS failed with error: The parameter is incorrect. I am using vs2017, Windows container, Windows 10.

nikoo56 commented Jul 5, 2017

I am getting same error when I change the version in compose file to 2.1 I am getting this error: Creating network with default driver HNS failed with error: The parameter is incorrect. I am using vs2017, Windows container, Windows 10.

@David-Paterson

This comment has been minimized.

Show comment
Hide comment
@David-Paterson

David-Paterson Jul 6, 2017

I am also getting this error when I change to 2.1 (Windows 10 + VS 2017 Latest Docker + Windows Container)

Severity Code Description Project File Line Suppression State
Error MSB4018 The "PrepareForLaunch" task failed unexpectedly.
Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose2647930274_default" with the default driver
HNS failed with error : The parameter is incorrect. .

For more troubleshooting information, go to http://aka.ms/DockerToolsTroubleshooting ---> Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose2647930274_default" with the default driver
HNS failed with error : The parameter is incorrect.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.DockerComposeClient.d__18.MoveNext()
--- End of inner exception stack trace ---
at Microsoft.DotNet.Docker.DockerComposeClient.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.DockerWorkspace.d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.BuildTasks.DockerBaseTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() docker-compose C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets 192

David-Paterson commented Jul 6, 2017

I am also getting this error when I change to 2.1 (Windows 10 + VS 2017 Latest Docker + Windows Container)

Severity Code Description Project File Line Suppression State
Error MSB4018 The "PrepareForLaunch" task failed unexpectedly.
Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose2647930274_default" with the default driver
HNS failed with error : The parameter is incorrect. .

For more troubleshooting information, go to http://aka.ms/DockerToolsTroubleshooting ---> Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose2647930274_default" with the default driver
HNS failed with error : The parameter is incorrect.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.DockerComposeClient.d__18.MoveNext()
--- End of inner exception stack trace ---
at Microsoft.DotNet.Docker.DockerComposeClient.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.DockerWorkspace.d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.BuildTasks.DockerBaseTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() docker-compose C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets 192

@shin-

This comment has been minimized.

Show comment
Hide comment
@shin-

shin- Jul 6, 2017

Member

@David-Paterson @hugo1337 - This is a networking issue on Docker Windows, not a Compose issue. See #4482 and moby/moby#30280

Member

shin- commented Jul 6, 2017

@David-Paterson @hugo1337 - This is a networking issue on Docker Windows, not a Compose issue. See #4482 and moby/moby#30280

@shin-

This comment has been minimized.

Show comment
Hide comment
@shin-

shin- Jul 6, 2017

Member

I'll close this issue as the original problem has been fixed and it is generating a lot of noise.
I'll create a separate issue to address #4106 (comment)

Member

shin- commented Jul 6, 2017

I'll close this issue as the original problem has been fixed and it is generating a lot of noise.
I'll create a separate issue to address #4106 (comment)

@eanbowman

This comment has been minimized.

Show comment
Hide comment
@eanbowman

eanbowman Aug 31, 2017

I'm not having success with setting version: '2.1' on my docker-compose.yml

It still claims my version is 1.21 with a minimum version of 1.24

$ docker version
Client:
 Version:      17.06.1-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   874a737
 Built:        Thu Aug 17 22:48:20 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.06.1-ce
 API version:  1.30 (minimum version 1.24)
 Go version:   go1.8.3
 Git commit:   874a737
 Built:        Thu Aug 17 23:03:03 2017
 OS/Arch:      windows/amd64
 Experimental: true

$ docker-compose version
docker-compose version 1.14.0, build c7bdf9e3
docker-py version: 2.3.0
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.2j  26 Sep 2016
$ docker-compose up
client version 1.21 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version

docker-compose.yml:

version: '2.1'

volumes:
    database_data:
        driver: local

services:
  nginx:
      image: nginx:latest
      ports:
          - 8080:80
      volumes:
          - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
      volumes_from:
          - php
  php:
      build: ./docker/php/
      expose:
          - 9000
      volumes:
          - .:/var/www/html
  mysql:
      image: mysql:latest
      expose:
          - 3306
      volumes:
          - database_data:/var/lib/mysql
      environment:
          MYSQL_ROOT_PASSWORD: secret
          MYSQL_DATABASE: project
          MYSQL_USER: project
          MYSQL_PASSWORD: project

eanbowman commented Aug 31, 2017

I'm not having success with setting version: '2.1' on my docker-compose.yml

It still claims my version is 1.21 with a minimum version of 1.24

$ docker version
Client:
 Version:      17.06.1-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   874a737
 Built:        Thu Aug 17 22:48:20 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.06.1-ce
 API version:  1.30 (minimum version 1.24)
 Go version:   go1.8.3
 Git commit:   874a737
 Built:        Thu Aug 17 23:03:03 2017
 OS/Arch:      windows/amd64
 Experimental: true

$ docker-compose version
docker-compose version 1.14.0, build c7bdf9e3
docker-py version: 2.3.0
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.2j  26 Sep 2016
$ docker-compose up
client version 1.21 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version

docker-compose.yml:

version: '2.1'

volumes:
    database_data:
        driver: local

services:
  nginx:
      image: nginx:latest
      ports:
          - 8080:80
      volumes:
          - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
      volumes_from:
          - php
  php:
      build: ./docker/php/
      expose:
          - 9000
      volumes:
          - .:/var/www/html
  mysql:
      image: mysql:latest
      expose:
          - 3306
      volumes:
          - database_data:/var/lib/mysql
      environment:
          MYSQL_ROOT_PASSWORD: secret
          MYSQL_DATABASE: project
          MYSQL_USER: project
          MYSQL_PASSWORD: project
@eanbowman

This comment has been minimized.

Show comment
Hide comment
@eanbowman

eanbowman Aug 31, 2017

^^^ This is a fresh new install, and my first docker experience.

How is this easier again?

eanbowman commented Aug 31, 2017

^^^ This is a fresh new install, and my first docker experience.

How is this easier again?

@tapasudenia

This comment has been minimized.

Show comment
Hide comment
@tapasudenia

tapasudenia Dec 13, 2017

Hi Guys,
I am getting this error

Error MSB4018 The "PrepareForLaunch" task failed unexpectedly.
Microsoft.DotNet.Docker.CommandLineClientException: client version 1.22 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version

My Environment

  • Windows 10
  • Visual Studio 2015 with Docker support extension

docker version
Client:
Version: 17.09.0-ce
API version: 1.32
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:40:09 2017
OS/Arch: windows/amd64

Server:
Version: 17.09.0-ce
API version: 1.32 (minimum version 1.24)
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:50:27 2017
OS/Arch: windows/amd64
Experimental: true

docker-compose version
docker-compose version 1.16.1, build 6d1ac21
docker-py version: 2.5.1
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.2j 26 Sep 2016

How do I change the version to 2.x? Any other fix?

Thanks.

tapasudenia commented Dec 13, 2017

Hi Guys,
I am getting this error

Error MSB4018 The "PrepareForLaunch" task failed unexpectedly.
Microsoft.DotNet.Docker.CommandLineClientException: client version 1.22 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version

My Environment

  • Windows 10
  • Visual Studio 2015 with Docker support extension

docker version
Client:
Version: 17.09.0-ce
API version: 1.32
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:40:09 2017
OS/Arch: windows/amd64

Server:
Version: 17.09.0-ce
API version: 1.32 (minimum version 1.24)
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:50:27 2017
OS/Arch: windows/amd64
Experimental: true

docker-compose version
docker-compose version 1.16.1, build 6d1ac21
docker-py version: 2.5.1
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.2j 26 Sep 2016

How do I change the version to 2.x? Any other fix?

Thanks.

@tapasudenia

This comment has been minimized.

Show comment
Hide comment
@tapasudenia

tapasudenia Dec 13, 2017

Got it resolved by changing the version to 2.1 everywhere, in all the docker-compose files.

Now I am getting this error when I am trying to run docker for windows on windows host

Error: image operating system linux cannot be used

Any suggestions?
Thanks

tapasudenia commented Dec 13, 2017

Got it resolved by changing the version to 2.1 everywhere, in all the docker-compose files.

Now I am getting this error when I am trying to run docker for windows on windows host

Error: image operating system linux cannot be used

Any suggestions?
Thanks

@matas-valuzis

This comment has been minimized.

Show comment
Hide comment
@matas-valuzis

matas-valuzis Jan 9, 2018

Its kinda relevant and might help some people so I'm gonna post this here:

After recent "Docker for Windows" update or fresh install people get switched to Windows containers mode. If you are in this mode and try to run/build linux containers you'll probably get errors like:

client version 1.22 is too old. Minimum supported API version is 1.24, please up grade your client to a newer version

or

image operating system linux cannot be used

Make sure you switch to Linux containers mode if you want to use linux containers.
image

matas-valuzis commented Jan 9, 2018

Its kinda relevant and might help some people so I'm gonna post this here:

After recent "Docker for Windows" update or fresh install people get switched to Windows containers mode. If you are in this mode and try to run/build linux containers you'll probably get errors like:

client version 1.22 is too old. Minimum supported API version is 1.24, please up grade your client to a newer version

or

image operating system linux cannot be used

Make sure you switch to Linux containers mode if you want to use linux containers.
image

@eanbowman

This comment has been minimized.

Show comment
Hide comment
@eanbowman

eanbowman Jan 10, 2018

smacks forehead
WHAT?!
Really?!

eanbowman commented Jan 10, 2018

smacks forehead
WHAT?!
Really?!

@eanbowman

This comment has been minimized.

Show comment
Hide comment
@eanbowman

eanbowman Jan 10, 2018

I mean, I haven't installed this again anyway since HyperV prevents me from creating other VMs on the machine. So... that's pretty garbage.

eanbowman commented Jan 10, 2018

I mean, I haven't installed this again anyway since HyperV prevents me from creating other VMs on the machine. So... that's pretty garbage.

@skrishnablockchain

This comment has been minimized.

Show comment
Hide comment
@skrishnablockchain

skrishnablockchain Jun 19, 2018

My Environment

Windows 10

docker version
Client:
Version: 18.05.0-ce
API version: 1.37
Go version: go1.9.5
Git commit: f150324
Built: Wed May 9 22:12:05 2018
OS/Arch: windows/amd64
Experimental: false
Orchestrator: swarm

Server:
Engine:
Version: 18.05.0-ce
API version: 1.37 (minimum version 1.24)
Go version: go1.10.1
Git commit: f150324
Built: Wed May 9 22:29:00 2018
OS/Arch: windows/amd64
Experimental: true

client version 1.22 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version
ERROR !!!! Unable to start network

Please let me know the error resolve details.

skrishnablockchain commented Jun 19, 2018

My Environment

Windows 10

docker version
Client:
Version: 18.05.0-ce
API version: 1.37
Go version: go1.9.5
Git commit: f150324
Built: Wed May 9 22:12:05 2018
OS/Arch: windows/amd64
Experimental: false
Orchestrator: swarm

Server:
Engine:
Version: 18.05.0-ce
API version: 1.37 (minimum version 1.24)
Go version: go1.10.1
Git commit: f150324
Built: Wed May 9 22:29:00 2018
OS/Arch: windows/amd64
Experimental: true

client version 1.22 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version
ERROR !!!! Unable to start network

Please let me know the error resolve details.

@wessRibeiro

This comment has been minimized.

Show comment
Hide comment
@wessRibeiro

wessRibeiro Jul 25, 2018

Clique com o botão direito do mouse no icone do docker e escolha a opção "switch to linux containers" como mencionado mais acima dos comentários

wessRibeiro commented Jul 25, 2018

Clique com o botão direito do mouse no icone do docker e escolha a opção "switch to linux containers" como mencionado mais acima dos comentários

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment