Invalid config event received: {version=0, server

Invalid config event received: {version=0, server

本文没有提供解决办法,这个错误不影响使用,可以忽略

使用 zookeeper 作为 SpringCloud 的注册中心报错信息如下:

2022-01-07 11:15:45.833 ERROR 14252 --- [ain-EventThread] o.a.c.framework.imps.EnsembleTracker     : Invalid config event received: {version=0, server.8=hadoop108:2888:3888:participant, server.7=hadoop107:2888:3888:participant, server.6=hadoop106:2888:3888:participant}
2022-01-07 11:15:45.834  INFO 14252 --- [ain-EventThread] o.a.c.framework.imps.EnsembleTracker     : New config event received: {version=0, server.8=hadoop108:2888:3888:participant, server.7=hadoop107:2888:3888:participant, server.6=hadoop106:2888:3888:participant}
2022-01-07 11:15:45.834 ERROR 14252 --- [ain-EventThread] o.a.c.framework.imps.EnsembleTracker     : Invalid config event received: {version=0, server.8=hadoop108:2888:3888:participant, server.7=hadoop107:2888:3888:participant, server.6=hadoop106:2888:3888:participant}

maven 配置的依赖:

<dependency>
    <groupId>org.springframework.cloudgroupId>
    <artifactId>spring-cloud-starter-zookeeper-discoveryartifactId>
dependency>

查看 maven 中 zookeeper 依赖的版本:
Invalid config event received: {version=0, server_第1张图片
zookeeper 集群有三台机器,zookeeper 的版本为 zookeeper-3.5.7 ,起初以为是 application.xml 中关于 zookeeper 连接配置错误,因为我的 zookeeper 是集群,配置改为如下:

spring:
  application:
    name: cloud-provider-payment
  cloud:
    zookeeper:
      connect-string: 192.168.10.106:2181,192.168.10.107:2181,192.168.10.108:2181

没有用!还是报错。
然后试了将 maven 中 zookeeper 依赖的版本改为和集群 zookeeper 上的一样:

<dependency>
    <groupId>org.springframework.cloudgroupId>
    <artifactId>spring-cloud-starter-zookeeper-discoveryartifactId>
    <exclusions>
        <exclusion>
            <groupId>org.apache.zookeepergroupId>
            <artifactId>zookeeperartifactId>
        exclusion>
    exclusions>
dependency>
<dependency>
    <groupId>org.apache.zookeepergroupId>
    <artifactId>zookeeperartifactId>
    <version>3.5.7version>
    <exclusions>
        <exclusion>
            <groupId>org.slf4jgroupId>
            <artifactId>slf4j-log4j12artifactId>
        exclusion>
    exclusions>
dependency>

还是没有用!
我没有解决办法,最后就放弃了,反正这个错误不会影响使用,可以忽略。

你可能感兴趣的:(#,SpringCloud,spring,cloud)