summaryrefslogtreecommitdiff
path: root/compose/service.py
diff options
context:
space:
mode:
authorZuhayr Elahi <elahi.zuhayr@gmail.com>2019-10-08 16:27:56 -0700
committerNicolas De loof <nicolas.deloof@gmail.com>2019-10-10 07:08:42 +0200
commit3135a0a8392e4a70d98bde16e58fd28d17904e1d (patch)
tree1ba7cac6da56f5d8cf5003e365c949c00bce72d3 /compose/service.py
parentcdae06a89ced31765391a7ab2aa70b8bb75214f9 (diff)
Added log message to check compose file
Signed-off-by: Zuhayr Elahi <elahi.zuhayr@gmail.com>
Diffstat (limited to 'compose/service.py')
-rw-r--r--compose/service.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/compose/service.py b/compose/service.py
index 50d2c4b5..f036826f 100644
--- a/compose/service.py
+++ b/compose/service.py
@@ -623,6 +623,10 @@ class Service(object):
try:
container.start()
except APIError as ex:
+ if "driver failed programming external connectivity" in ex.explanation:
+ log.warn(
+ "Port is already in use, check the docker-compose file to see if the same" +
+ " port was allocated to multiple services")
raise OperationFailedError("Cannot start service %s: %s" % (self.name, ex.explanation))
return container