1 rancher下liferay服务 采用 应用公开主机端口8080冲突
由于rancherzhan占用8080端口,而liferay启动后,则会与rancher冲突,此之后无法访问rancher。
解决方案:
获取liferay容器IP:
(1)docker inspect 容器ID| grep IPAddress
(2)查看8080端口的规则
iptables -t nat -nL --line-number|grep 8080
(3)删除 所有关于该IP的规则
iptables -t nat -D DOCKER $num
删除中,可能出现
ERROR: iptables: Index of deletion too big
则直接:
iptables-save >/tmp/somefile
vi /tmp/somefile
iptables-restore < /tmp/somefile
把该IP有关的端口的全部注释掉即可。
之后去liferay去掉该公共的端口。
其他:iptables命令是linux上常用的防火墙软件,
iptables-save命令用于将linux内核中的iptables表导出到标准输出设备商,通常,使用shell中I/O重定向功能将其输出保存到指定文件中。
iptables-restore命令用来还原iptables-save命令所备份的iptables配置。
1978

被折叠的 条评论
为什么被折叠?



