docker swarm创建副本报错:open /proc/sys/net/ipv4/vs/expire_quiescent_template: no such file or directory“

查看 /var/log/message
完整报错如下:

time=“2023-11-27T23:18:56.742349853+08:00” level=error msg=“error reading the kernel parameter net.ipv4.vs.expire_quiescent_template” error=“open /proc/sys/net/ipv4/vs/expire_quiescent_template: no such file or directory”

解决方法如下:

  • 查看是否开启了 ip_vs

      lsmod | grep ip_vs			#无输出则没有开启
    
  • 开启 ip_vs

      modprobe ip_vs
    
  • 再次查看

      lsmod | grep ip_vs
    
    ip_vs                 145497  0 
    nf_conntrack          139264  7 ip_vs,nf_nat,nf_nat_ipv4,xt_conntrack,nf_nat_masquerade_ipv4,nf_conntrack_netlink,nf_conntrack_ipv4
    libcrc32c              12644  4 xfs,ip_vs,nf_nat,nf_conntrack
    
  • 重启docker

      systemctl restart docker
    

参考链接: https://www.cnblogs.com/zongliang-ya/p/17445302.html

你可能感兴趣的:(docker,docker,容器,运维)