1. 程式人生 > >解決docker(ERROR: No such container: )錯誤

解決docker(ERROR: No such container: )錯誤

簡介

今天在用docker搭建elk的時候因為機器效能不好導致了docker-compose建立容器超時然後

ERROR: for kibana  UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for logstash  UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for kibana  UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for logstash  UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)
ERROR: 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).

之後我使用docker-compose down就發生了下面的事情

ERROR: No such container: 42008d315b9b0eaea6fe2dc1448da76df2fd3f9e8c085427b21bb31be7b52873

操作

這個可能是因為你在建立容器的時候還沒有建立完成就中斷了操作造成的,你所需要做的就是刪除/var/lib/docker/containers下的42008d315b9b0eaea6fe2dc1448da76df2fd3f9e8c085427b21bb31be7b52873檔案然後再次執行docker-compose downdocker-compose up -d

就好了

歡迎關注Bboysoul的部落格www.bboy