• docker端口映射启动报错Error response from daemon: driver failed programming external connectivity on endpoint jms_guacamole


    问题描述:

    今天跳板机的一个guacamole用docker重新启动报错了

    [root@localhost opt]# docker start d82e9c342a
    Error response from daemon: driver failed programming external connectivity on endpoint jms_guacamole_test (159da3efb3893156f4d9bba946a9b):  (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8081 -j DNAT --to-destination 172.17.0.2:8081 ! -i docker0: iptables: No chain/target/match by that name.
     (exit status 1))

    问题原因:

    docker服务启动时定义的自定义链DOCKER由于某种原因被清掉

    重启docker服务及可重新生成自定义链DOCKER

    Chain PREROUTING (policy ACCEPT)
    target     prot opt source               destination        
    DOCKER     all  --  0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type LOCAL
    
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination        
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination        
    DOCKER     all  --  0.0.0.0/0           !127.0.0.0/8          ADDRTYPE match dst-type LOCAL
    
    Chain POSTROUTING (policy ACCEPT)
    target     prot opt source               destination        
    MASQUERADE  all  --  172.17.0.0/16        0.0.0.0/0          
    MASQUERADE  tcp  --  172.17.0.2           172.17.0.2           tcp dpt:8080
    
    Chain DOCKER (2 references)
    target     prot opt source               destination        
    RETURN     all  --  0.0.0.0/0            0.0.0.0/0          
    DNAT       tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8888 to:172.17.0.2:8080
    root@router:playbook#iptables -t nat -nL
    Chain PREROUTING (policy ACCEPT)
    target     prot opt source               destination        
    DOCKER     all  --  0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type LOCAL
    
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination        
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination        
    DOCKER     all  --  0.0.0.0/0           !127.0.0.0/8          ADDRTYPE match dst-type LOCAL
    
    Chain POSTROUTING (policy ACCEPT)
    target     prot opt source               destination        
    MASQUERADE  all  --  172.17.0.0/16        0.0.0.0/0          
    MASQUERADE  tcp  --  172.17.0.2           172.17.0.2           tcp dpt:8080
    
    Chain DOCKER (2 references)
    target     prot opt source               destination        
    RETURN     all  --  0.0.0.0/0            0.0.0.0/0          
    DNAT       tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8888 to:172.17.0.2:8080

    解决方法:

    重启docker服务后再启动容器

    systemctl restart docker
    
    docker start d82e9c342a
  • 相关阅读:
    HDU
    Groundhog Build Home
    The Moving Points
    Problem I. Count
    Problem E. TeaTree
    树的启发式合并
    Special Segments of Permutation
    网络流24题
    2015-2016 Northwestern European Regional Contest (NWERC 2015)
    The 2018 ACM-ICPC Asia Beijing Regional Contest
  • 原文地址:https://www.cnblogs.com/Sungeek/p/9995017.html
Copyright © 2020-2023  润新知