1.SpringBoot与Zookeeper的通信问题
注意关闭zookeeper服务的防火墙
临时关闭
systemctl stop firewalld
禁止开机启动
systemctl disable firewalld
2.包冲突问题
最常见的问题是slf4j与log4j的包冲突
解决方案:在zookeeper中去除对slf4j的依赖
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.4.10</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>