WARNING IPv4 forwarding is disabled. Networking will not work
2017-07-19 21:25:48    1286   
lightingfire
创建swarm cluster的时候报错:

WARNING: IPv4 forwarding is disabled. Networking will not work.
2016/05/20 09:15:35 Post https://discovery.hub.docker.com/v1/clusters: dial tcp: lookup discovery.hub.docker.com on 192.168.10.2:53: read udp 172.17.0.2:56087->192.168.10.2:53: i/o timeout


解决办法:
# vi /etc/sysctl.conf
或者
# vi /usr/lib/sysctl.d/00-system.conf
添加如下代码:
    net.ipv4.ip_forward=1

重启network服务
# systemctl restart network

查看是否修改成功
# sysctl net.ipv4.ip_forward

如果返回为“net.ipv4.ip_forward = 1”则表示成功了
 
 

 

by 刘迎光@萤火虫工作室
OpenBI交流群:495266201
MicroService 微服务交流群:217722918
mail: liuyg#liuyingguang.cn
博主首页(防止爬虫):http://blog.liuyingguang.cn
OpenBI问答社区:http://openbi.liuyingguang.cn/

Pre: Caused by: java.net.SocketException: Permission denied: recv failed

Next: linux打开 IP Forwarding


Table of content