关闭防火墙后Zookeeper集群时还是出现java.net.NoRouteToHostException: 没有到主机的路由

https://blog.csdn.net/m200674067/article/details/79838630?utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control

这里引入了一个新的问题 SELinux

具体是什么请自行移步去看

https://baike.baidu.com/item/SELinux/8865268?fr=aladdin

知道了问题,解决方案自然也有了

查看SELinux状态:

1、/usr/sbin/sestatus -v ##如果SELinux status参数为enabled即为开启状态

SELinux status: enabled

2、getenforce ##也可以用这个命令检查

关闭SELinux:

1、临时关闭(不用重启机器):

setenforce 0 ##设置SELinux 成为permissive模式

##setenforce 1 设置SELinux 成为enforcing模式

2、修改配置文件需要重启机器:

修改/etc/selinux/config 文件

将SELINUX=enforcing改为SELINUX=disabled

重启机器即可


三台机器都进行如下操作,最后成功。

[ 尐鱼儿的QQ群:726994578 ] --- [ https://github.com/godmaybelieve ]
原文地址:https://www.cnblogs.com/yuyu666/p/14979482.html