具体原因见zookeeper SASL 认证错误排除_yangguorong123456的博客-CSDN博客
这里只贴出解决方法: 在连接zookeeper的Spring Boot启动类中添加
System.setProperty("zookeeper.sasl.client", "false")
具体例子如下
@SpringBootApplication
@EnableDiscoveryClient
public class MySpringApplication {
public static void main(String[] args) {
System.setProperty("zookeeper.sasl.client", "false");
SpringApplication.run(MySpringApplication .class, args);
}
}