关于Error contacting service. It is probably not running错误的解决办法

来源:互联网 发布:机房机柜网络整改 编辑:程序博客网 时间:2024/05/16 04:52

如果zookeeper启动时出现Error contacting service. It is probably not running的错误的时候,一般情况下问题存在于防火墙开启的原因,关闭防火墙就可以了。CentOS 7默认使用的是firewall作为防火墙,使用iptables必须重新设置一下。

Centos7 关闭防火墙
CentOS 7.0默认使用的是firewall作为防火墙,使用iptables必须重新设置一下
1、直接关闭防火墙
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
2、设置 iptables service
yum -y install iptables-services
如果要修改防火墙配置,如增加防火墙端口3306
vi /etc/sysconfig/iptables 
增加规则
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
保存退出后
systemctl restart iptables.service #重启防火墙使配置生效
systemctl enable iptables.service #设置防火墙开机启动
最后重启系统使设置生效即可。


阅读全文
0 0