Home>Article>Operation and Maintenance> How to solve the problem that docker's port cannot access tcp6
How to solve the problem that docker's port cannot access tcp6?
1. Problem background
[root@dc02 ~]# sudo docker run -p 5601:5601 -p 9200:9200 -p 5044:5044 -it --name elk elk:v2WARNING: IPv4 forwarding is disabled. Networking will not work. * Starting periodic command scheduler cron [ OK ] * Starting Elasticsearch Server [ OK ]
cannot be accessed in the browser
2. Solution
[root@dc02 log]# vim /usr/lib/sysctl.d/00-system.conf 加入一行 net.ipv4.ip_forward=1重启网络 [root@dc02 log]# systemctl restart network 测试网络连通性 [root@dc02 log]# ping baidu.com PING baidu.com (123.125.115.110) 56(84) bytes of data.64 bytes from 123.125.115.110: icmp_seq=1 ttl=128 time=3.61 ms64 bytes from 123.125.115.110: icmp_seq=2 ttl=128 time=2.73 ms 重启docker [root@dc02 log]# systemctl restart docker.service
Related recommendations:docker tutorial
The above is the detailed content of How to solve the problem that docker's port cannot access tcp6. For more information, please follow other related articles on the PHP Chinese website!