docker-compose up超时与UnixHTTPConnectionPool [英] `docker-compose up` times out with UnixHTTPConnectionPool
问题描述
在我们的Jenkins代理中,我们正在运行大约几项(约20项)测试,其设置涉及为大量服务/容器运行 docker-compose up
( 14)。
In our Jenkins agents we are running about several (around 20) tests whose setup involves running docker-compose up
for a "big" number of services/containers (around 14).
我会不时出现以下错误:
From time to time, I'll get the following error:
ERROR: for testdb-data UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)
An HTTP request took too long to complete. Retry with --verbose to obtain debug information.
If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).
无法始终如一地重现此内容。而且我仍在尝试找出与我们的代理资源的充分使用是否相关。
Haven't been able to reproduce this consistently. And I'm still trying to figure out whether or not there is a correlation with our agent's resources being at full use.
docker -v
是 1.10.1
和 docker-compose -v
是 1.13 .1
。
是否有与之相关的任何想法?
Any ideas about what this may be related to?
推荐答案
重新启动docker服务:
Restarting docker service:
sudo systemctl restart docker
并设置 DOCKER_CLIENT_TIMEOUT
和 COMPOSE_HTTP_TIMEOUT
环境变量:
export DOCKER_CLIENT_TIMEOUT=120
export COMPOSE_HTTP_TIMEOUT=120
目前是两个解决方法。但是问题仍然在docker compose github中存在:
are two workarounds for now. But the issues are still open in docker compose github:
https://github.com/docker/compose/issues/3927
https://github.com/docker/compose/issues/4486
https://github.com/docker/compose/issues/3834
这篇关于docker-compose up超时与UnixHTTPConnectionPool的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!