zoukankan      html  css  js  c++  java
  • docker-排除故障

    一、今天遇到一个问题,habor不能用了,经查看发现有几个容器异常,docker-compose restart 报如下错误

    [root@docker-121 harbor]# docker-compose restart
    Restarting nginx              ... done
    Restarting harbor-portal      ... done
    Restarting harbor-jobservice  ... done
    Restarting harbor-core        ... error
    Restarting redis              ... error
    Restarting registryctl        ... done
    Restarting registry           ... done
    Restarting harbor-db          ... done
    Restarting harbor-adminserver ... error
    Restarting harbor-log         ... done
    
    ERROR: for harbor-core  b'Cannot restart container befeaa491460cf4499145f45fe8d551d30fdcebd12c6c6cf3476312f7652655e: OCI runtime create failed: container with id exists: befeaa491460cf4499145f45fe8d551d30fdcebd12c6c6cf3476312f7652655e: unknown'
    
    ERROR: for redis  b'Cannot restart container 13f207ad59f93d0b3e620cf140d59fd03241440ce74008619f76310d2531aa50: failed to initialize logging driver: dial tcp 127.0.0.1:1514: connect: connection refused'
    
    ERROR: for harbor-adminserver  b'Cannot restart container 3abc06de3d8b808882ea6cfe0be474783740b6b9758e72f758c9dd1ac56c1f81: failed to initialize logging driver: dial tcp 127.0.0.1:1514: connect: connection refused'

    解决过程:

    1、harbor-core

    查找harbor-core的ID内容,删掉涉及runtime-runc的,重启即可
    [root@docker-121 harbor]# find / -name befeaa491460cf4499145f45fe8d551d30fdcebd12c6c6cf3476312f7652655e
    /run/docker/runtime-runc/moby/befeaa491460cf4499145f45fe8d551d30fdcebd12c6c6cf3476312f7652655e
    /var/lib/docker/containers/befeaa491460cf4499145f45fe8d551d30fdcebd12c6c6cf3476312f7652655e
    /var/lib/docker/image/overlay2/layerdb/mounts/befeaa491460cf4499145f45fe8d551d30fdcebd12c6c6cf3476312f7652655e
    [root@docker-121 harbor]# mv /run/docker/runtime-runc/moby/befeaa491460cf4499145f45fe8d551d30fdcebd12c6c6cf3476312f7652655e /tmp/

    2、dial tcp 127.0.0.1:1514: connect: connection refused

      类似这个问题多重启几次即可

  • 相关阅读:
    POJ 1095 Trees Made to Order 最详细的解题报告
    Producter and Consumer
    How to use the function of bind
    How to use the functions of apply and call
    Configurate vim tool
    #4713. 方程
    #4709. 树
    #4718. 管理
    #4710. 并
    #4707. 点分治
  • 原文地址:https://www.cnblogs.com/suminem/p/12461702.html
Copyright © 2011-2022 走看看