When attempting to use docker-compose
on Docker for Windows, when I run docker-compose up
I get the following error:
Creating network "core_default" with the default driver
Creating volume "core_redis" with local driver
Creating volume "core_mongo" with local driver
Creating core_redis_1
Creating core_mongo_1
ERROR: for redis HTTPConnectionPool(host='127.0.0.1', port=2375): Read timed out. (read timeout=60)
ERROR: for mongo HTTPConnectionPool(host='127.0.0.1', port=2375): Read timed out. (read timeout=60)
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 "contextlib.py", line 35, in __exit__
File "compose\cli\errors.py", line 56, in handle_connection_errors
TypeError: log_timeout_error() takes exactly 1 argument (0 given)
docker-compose returned -1
However, docker network ls
returns:
NETWORK ID NAME DRIVER SCOPE
ebbd865db905 bridge bridge local
92a7cb9266f4 host host local
b2005441d806 none null local
e48cd344017e core_default bridge local
And docker volume ls
returns:
DRIVER VOLUME NAME
local 291cbd550d937768a7380e33968014651be2061f72231a3b015bd3302d910a7a
local 311b7b623f4d0d08d76c9fb2d15d0860199bbd272cf8b863805fbd3dc381e85b
local 3ed4f2b282317550c99c52b80947505802af800a5b0f2814e2e6044bdd657501
local 54dc3ff7c8bb626dffb862f840887639d4a339595351062ae0a0c042b635e82f
local 844f306aa2cb8b7bab01848b5015b468bab07fa0ab09de21e46a52465aa7f240
local ba8b0ff02600901218a1bbf4f0213519ac1641dc11039e572f2d062854e9c416
local bbc29e0c1bbc4a5a3b174698400c69643fa663876a3f85629ae825c06e7b834b
local core_mongo
local core_redis
And docker ps -l
returns:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3c2c821aaa34 mongo "/entrypoint.sh mongo" 3 minutes ago Created core_mongo_1
9d70b43b1830 redis "docker-entrypoint.sh" 3 minutes ago Created core_redis_1
If I manually docker start
the containers, then everything starts working as expected with compose, but it appears that there is in issue within compose with the address it attempts to run the docker start
from.
It would be very nice for docker-compose
to work as expected as currently we're provisioning containers using Vagrant and I'd like to remove that tool from our developer dependencies if possible.
can you try to set longer timeout setting as follows?
$ export COMPOSE_HTTP_TIMEOUT=300
As this is Windows, I set that with $env:COMPOSE_HTTP_TIMEOUT = 300
but still get a timeout.
Same problem here.
Using docker (version 1.12.0, build 8eab29e), docker-compose (version 1.8.0, build d988a55) and Windows 10 (OS Build 14393.51).
+1
I'm having the same issue following the intro tutrial: https://docs.docker.com/compose/gettingstarted/#/step-2-create-a-docker-image
the redis service image seems to be created, but it doesn't start.
adding the detached mod flag docker-compose up -d
seems to allow the redis service to start. But the web service quits becuse it can't find the app.py file. This seems to be a different problem, perhaps with mounting the local directory. Investigating... #1616 seems similar.
Had the same issue here.
I just had to close and re-open Docker for Windows and it work again now.
E:\Lab\Docker\server>docker-compose up
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 "contextlib.py", line 35, in __exit__
File "compose\cli\errors.py", line 56, in handle_connection_errors
TypeError: log_timeout_error() takes exactly 1 argument (0 given)
docker-compose returned -1
[Close Docker for Windows]
[Open Docker for Windows]
E:\Lab\Docker\server>docker-compose up
Removing server_db_1
Recreating 1cb206d26bcb_server_db_1
Recreating server_web_1
Windows 10 Pro Version 10.0.14393
Docker for Windows version 1.12.0-stable (build: 5968) 9cd1dc2
Docker version 1.12.0, build 8eab29e
Docker-compose version 1.8.0, build d988a55
@takuya2000 That solved it for me, although I had to increase it a little more
$ export COMPOSE_HTTP_TIMEOUT=3000000000000
I've previously also had other timeout related issues. It seems timeouts in docker are set for superfast computers! I should probably upgrade...
@Becold That doesn't look like the same error
@Becold - that error appears to be if you have set the COMPOSE_HTTP_TIMEOUT
variable to an invalid value. I was able to reproduce that error by following @laggingreflex proposed number (which is apparently too big) but setting it to a smaller value appears to have fixed the error you got.
That being said, even with the outrageously long timeout, I'm still not seeing any activity on the containers.
> $env:COMPOSE_HTTP_TIMEOUT = 3000000000000
> docker-compose up
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 "contextlib.py", line 35, in __exit__
File "compose\cli\errors.py", line 56, in handle_connection_errors
TypeError: log_timeout_error() takes exactly 1 argument (0 given)
docker-compose returned -1
> $env:COMPOSE_HTTP_TIMEOUT = 30000000
> docker-compose up
Creating network "foo" with the default driver
Having the same issue here, appears to be a recent thing, versions:-
docker
1.12.1, build 23cf638docker-compose
1.8.0, build d988a55Tried changing the timeout which just hangs without any activity.
Logs running with docker-compose --verbose
compose.cli.verbose_proxy.proxy_callable: docker inspect_container <- (u'3cc74bb16d267f1789eb641e200509433013c7cb9cf8692f1632748d3ae6db7d')
compose.cli.verbose_proxy.proxy_callable: docker inspect_container -> {u'AppArmorProfile': u'',
u'Args': [u'run', u'dev'],
u'Config': {u'AttachStderr': False,
u'AttachStdin': False,
u'AttachStdout': False,
u'Cmd': [u'npm', u'run', u'dev'],
u'Domainname': u'',
u'Entrypoint': None,
u'Env': [u'HTTP_PROXY=<proxyip>:8080',
u'http_proxy=<proxyip>:8080',
...
compose.parallel.feed_queue: Pending: set([<Service: xi>])
compose.parallel.feed_queue: Starting producer thread for <Service: xi>
compose.service.start_container_if_stopped: Starting docker_xi_1
compose.cli.verbose_proxy.proxy_callable: docker attach <- (u'3cc74bb16d267f1789eb641e200509433013c7cb9cf8692f1632748d3ae6db7d', stream=True, stderr=True, stdout=True)
compose.parallel.feed_queue: Pending: set([])
compose.parallel.feed_queue: Pending: set([])
compose.parallel.feed_queue: Pending: set([])
compose.parallel.feed_queue: Pending: set([])
compose.parallel.feed_queue: Pending: set([])
compose.parallel.feed_queue: Pending: set([])
compose.parallel.feed_queue: Pending: set([])
Last message repeats for a while until it dies:-
ERROR: for xi HTTPConnectionPool(host='localhost', port=8888): Read timed out. (read timeout=300)
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 "contextlib.py", line 35, in __exit__
File "compose\cli\errors.py", line 56, in handle_connection_errors
TypeError: log_timeout_error() takes exactly 1 argument (0 given)
docker-compose returned -1
Proxy is running and working on localhost:8888 and is specified in the Docker GUI app.
Wondering if it's something to do with the container being built with different --build-arg proxy information (the ENV variables in the container inspection), but can't see why since that proxy also works fine.
馃槶
Same issue here.
docker Version 1.12.1 (build: 12133)
macOS 10.12
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 "contextlib.py", line 35, in __exit__
File "compose/cli/errors.py", line 56, in handle_connection_errors
TypeError: log_timeout_error() takes exactly 1 argument (0 given)
docker-compose returned -1
Same issue here.
Docker version 1.12.1, build 23cf638
Windows 10
Same issue.
Docker Version 1.12.1
Windows 10 Pro
So after a bunch of additional digging, this appears to be an issue with Docker Compose and the Python shipped with Docker for Windows.
If I install the Docker CLI and Compose in Windows Subsystem for Linux and export DOCKER_HOST=":2375"
within WSL, Compose works as expected. However, I consistently get timeouts within Windows using CMD or Powershell.
I have the same issue.
Docker version 1.12.1 stable
Windows 10 Enterprise
FWIW docker-compose appears to magically have sprang back to life after upgrading to 1.12.3 (8488) here (win 10).
Docker 1.12.3 does seem to resolve this issue. I'll leave this open for some additional validation from other users, but this seems to be resolved.
For me the timeout issue is not fixed with Docker Version 1.12.3 (8488)
Windows 10 Enterprise 10.0.14393 Build 14393
also having timeout issues on linux within a jenkins build:
docker-compose version 1.8.1, build 878cff1
docker-py version: 1.10.3
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013
also have timeout issue with docker-compose : container are created but not started
config :
Client:
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built: Wed Oct 26 23:26:11 2016
OS/Arch: windows/amd64
Server:
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built: Wed Oct 26 23:26:11 2016
OS/Arch: linux/amd64
windows 10 pro Version 10.0.14393 Build 14393
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
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it had not recent activity during the stale period.
Most helpful comment
@takuya2000 That solved it for me, although I had to increase it a little more
I've previously also had other timeout related issues. It seems timeouts in docker are set for superfast computers! I should probably upgrade...
@Becold That doesn't look like the same error