docker 容器里去关闭java服务,端口是19000。提示拒绝连接:
curl: (7) Failed to connect to 172.20.0.2 port 19000: Connection refused
需要把该docker容器的网卡设置为防火墙受信任
# 解决方案,把docker0网卡添加到trusted域
firewall-cmd --permanent --zone=trusted --change-interface=xxxxxdocker网卡
# 重启加载配置
firewall-cmd --reload
xxxxxdocker网卡根据docker里容器和外部几个网卡ip来判断使用的哪个虚拟网卡。
Follow up to close deal