如何查看 docker daemon状态

docker 执行一个命令经常超时!!!!!!!

想知道 docker daemon 到底在忙什么!

最新给 docker 安装了一个日志插件——loki 之后(docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions),执行 docker 命令经常超时

─➤  docker-compose down
Stopping authentication-service ... 
Stopping add-service            ... 
Stopping http-api-service       ... 

ERROR: for authentication-service  UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=70)

ERROR: for http-api-service  UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=70)

ERROR: for add-service  UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=70)
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.yaml 文件的内容:

version: "3"
services:
  add-service:
    container_name: add-service
    image: ponponon/test-nameko-for-rabbitmq:1.0.1
    env_file:
      - .env
    # logging:
    #   driver: json-file
    #   options:
    #     max-size: "20m"
    #     max-file: "1"
    logging:
      driver: loki
      options:
        loki-url: http://192.168.31.94:3100/loki/api/v1/push
        max-size: "20m"
        max-file: "1"
    command: nameko run services:AddService --config ./config.yaml --backdoor-port 5000



  authentication-service:
    container_name: authentication-service
    image: ponponon/test-nameko-for-rabbitmq:1.0.1
    env_file:
      - .env
    logging:
      driver: loki
      options:
        loki-url: http://192.168.31.94:3100/loki/api/v1/push
        max-size: "20m"
        max-file: "1"
    command: nameko run services:AuthenticationService --config ./config.yaml --backdoor-port 5000



  http-api-service:
    container_name: http-api-service
    image: ponponon/test-nameko-for-rabbitmq:1.0.1
    env_file:
      - .env
    logging:
      driver: loki
      options:
        loki-url: http://loki:3100/loki/api/v1/push
        max-size: "20m"
        max-file: "1"
    ports:
      - "5000:5000"
    command: python api.py

都是一些很简单的东西,平时都是不超过3秒钟就能搞定启动和停止,但是安装并使用这个插件之后,就是各种超时!!!

为什么?
这个破插件干了什么?
怎么排查?

阅读 1.3k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题