2014-09-05 52 views
9

我一直在停止並啓動這個容器沒有問題。然後我突然發現這個奇怪的錯誤。停止和啓動容器時奇怪的碼頭錯誤

見下文

[email protected] /vol/jenkins/war/WEB-INF/lib $ docker ps 
CONTAINER ID  IMAGE       COMMAND    CREATED    STATUS    PORTS     NAMES 
241d05c8d14f  joshuacalloway/jenkins:latest "/usr/bin/supervisor 5 weeks ago   Up 6 days   0.0.0.0:80->8080/tcp jenkins    
[email protected] /vol/jenkins/war/WEB-INF/lib $ docker stop 241 
241 
[email protected] /vol/jenkins/war/WEB-INF/lib $ docker start 241 
241 
[email protected] /vol/jenkins/war/WEB-INF/lib $ docker stop 241 
241 
[email protected] /vol/jenkins/war/WEB-INF/lib $ docker start 241 
Error response from daemon: Cannot start container 241: Unit docker-241d05c8d14f0b9f18d4f8647ac76a27097354aab5d92f1aaa6c9789a85e6e3d.scope already exists. 
2014/09/05 00:27:39 Error: failed to start one or more containers 
[email protected] /vol/jenkins/war/WEB-INF/lib $ docker start 241 
Error response from daemon: Cannot start container 241: Unit docker-241d05c8d14f0b9f18d4f8647ac76a27097354aab5d92f1aaa6c9789a85e6e3d.scope already exists. 
2014/09/05 00:27:47 Error: failed to start one or more containers 
+0

你明白了什麼,當你'泊塢窗ps','碼頭工人PS -a'和'泊塢窗logs'容器? – 2014-09-05 11:41:02

回答

15

命令的歷史,是一個問題detailed here。在此期間,你可以解決辦法是這樣的:

sudo systemctl stop docker-241d05c8d14f0b9f18d4f8647ac76a27097354aab5d92f1aaa6c9789a85e6e3d.scope

然後開始YOUT容器

+0

@jcalloway爲什麼不接受這個答案? – 2015-03-12 00:08:31

+0

好吧,看起來這可能是解決方案。我會在下次發生錯誤時嘗試它 – jcalloway 2015-04-03 21:03:54