zookeeper下载启动后:Client port found: 2181. Client address: localhost. Client SSL: false. Error contacti

1.我官网下载的版本zookeeper下载启动后:Client port found: 2181. Client address: localhost. Client SSL: false. Error contacti_第1张图片
1)在linux平台解压下载的zookeeper-3.4.10.tar.gz
2)进⼊conf⽬录,cp zoo_sample.cfg zoo.cfg (复制一个config文件,第一个是模板,第二个是我们的conf文件)
3) 进⼊bin⽬录,启动zk服务
启动 ./zkServer.sh start (默认端口 2181 用不着改)
停⽌ ./zkServer.sh stop
查看状态 ./zkServer.sh status
启动了单节点模式
报出了这个问题:zookeeper下载启动后:Client port found: 2181. Client address: localhost. Client SSL: false. Error contacti_第2张图片
这个问题怎么解决呢?
1.关闭防火墙
systemctl stop firewalld.service,重启zookeeper
systemctl status firewalld.service 查看是否关闭
然而没有卵用:zookeeper下载启动后:Client port found: 2181. Client address: localhost. Client SSL: false. Error contacti_第3张图片
2.zookeeper依赖于java,用的时候会自动找JAVA_HOME,所以在配置zookeeper前,一定要配置好java环境
配置环境:

vim /etc/profile

shift + g 到最后

# jdk1.8环境变量 java_home 是安装jdk的目录和版本号
export JAVA_HOME=/usr/local/software/jdk1.8.0_144
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin

最后刷新就可以用了

source /etc/profile

出现版本号成功
zookeeper下载启动后:Client port found: 2181. Client address: localhost. Client SSL: false. Error contacti_第4张图片
和这个没有关系

3.和Tomcat是否是冲突:查看tomcat端口
确实启动了tomcatzookeeper下载启动后:Client port found: 2181. Client address: localhost. Client SSL: false. Error contacti_第5张图片
把端口关闭试试: kill -9 tomcat端口号
成功单例模式启动zookeeper下载启动后:Client port found: 2181. Client address: localhost. Client SSL: false. Error contacti_第6张图片

你可能感兴趣的:(一天一个小bug,zookeeper,ssl,java)