问题描述
我在Bluemix / IBM Containers中使用docker-compose部署和链接3个容器时遇到问题。我正在使用的撰写文件已经工作并且可以继续工作,但是非常不一致。如果失败,我将收到以下响应:
I'm having an issue deploying and linking 3 containers using docker-compose in Bluemix / IBM Containers. The compose file I am using has worked and continues to work but it is very inconsistent. When it fails, I get the following response:
Recreating xxxxx_1
Recreating yyyyy_1
Creating zzzzz_1
ERROR: for server 'message'
Traceback (most recent call last):
File "docker-compose", line 3, in <module>
File "compose/cli/main.py", line 64, in main
File "compose/cli/main.py", line 116, in perform_command
File "compose/cli/main.py", line 876, in up
File "compose/project.py", line 416, in up
File "compose/parallel.py", line 66, in parallel_execute
KeyError: 'message'
Failed to execute script docker-compose
推荐答案
Docker compose不会公开非常好的错误消息(基本上,当发生意外情况时,您会得到类似的奇怪堆栈跟踪)。我的猜测是时间到了-compose的默认超时预期是本地docker(也许是在非常快的计算机上),因此,如果启动得不是非常快,它有时会变得不满意。
Docker compose does not expose very good error messages (basically, when something happens it's not expecting, you get a weird stacktrace like that). My guess is that it's timing - the default timeouts on compose are expecting local docker (perhaps on very fast computers), so if things don't start very very fast, it sometimes becomes unhappy.
在Bluemix云中,容器具有SDN和其他设置,它们可能比在本地docker上花费更长的时间,因此启动非常快并不总是在compose的预期范围之内。
In the Bluemix cloud, the containers have SDN and other setup that can take a bit longer than on local docker, so that "starting very very fast" is not always within what compose expects.
尝试先执行 export COMPOSE_HTTP_TIMEOUT = 300
来提高超时时间,这应该很重要。
Try doing export COMPOSE_HTTP_TIMEOUT=300
first to bump the timeouts, that should help matters.
这篇关于在Bluemix中使用docker-compose时出现不一致的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!