WARNING:IPv4 forwarding is disabled. Networking will not work. 报错解决办法

centos 7下harbor今天访问突然不能访问了,然后多次重启也不好使,仔细看日志发现了下边的警告

WARNING: IPv4 forwarding is disabled. Networking will not work.

需要做如下配置

解决办法:

vi /etc/sysctl.conf

net.ipv4.ip_forward=1 #添加这段代码

重启network服务

systemctl restart network && systemctl restart docker

查看是否修改成功 (备注:返回1,就是成功)

sysctl net.ipv4.ip_forward

net.ipv4.ip_forward = 1

systemctl start harbor.service
再重启启动harbor 访问就正常了。

你可能感兴趣的:(WARNING:IPv4 forwarding is disabled. Networking will not work. 报错解决办法)