linux下启动zookeeper成功
[root@root bin]# ./zkServer.sh status
JMX enabled by default
Using config: /root/soft/zookeeper-3.4.6/bin/../conf/zoo.cfg
Mode: standalone
在启动服务层工程后,再启动表现层工程tomcat服务器报错
Caused by: java.lang.IllegalStateException: Failed to check the status of the service cn.campus.service.ItemService. No provider available for the service cn.campus.service.ItemService from the url zookeeper://192.168.17.129:2181/com.alibaba.dubbo.registry
解决方案:多数是因为linux系统下的防火墙未关闭造成表现层向zookeeper请求服务无法请求成功,需要关闭防火墙
查看自己使用的是centos6.*还是centOS7.*版本的系统
centOS6系列版本的命令
关闭命令: service iptables stop
永久关闭防火墙:chkconfig iptables off
[root@root ~]# service iptables stop
iptables:将链设置为政策 ACCEPT:filter [确定]
iptables:清除防火墙规则: [确定]
iptables:正在卸载模块: [确定]
[root@root ~]# service iptables status
iptables:未运行防火墙。
centOS7系列版本的命令
查看防火墙状态:firewall-cmd --state
关闭防火墙:systemctl stop firewalld.service