当前位置:   article > 正文

java.lang.IllegalStateException: zookeeper not connected windows代码运行,和linux部署dubbo和zookeeper报错情况记录对比

zookeeper not connected

2024-03-03 03:30:14.856 【INFO】【main】【o.s.b.a.l.ConditionEvaluationReportLoggingListener】: 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2024-03-03 03:30:14.866 【ERROR】【main】【org.springframework.boot.SpringApplication】: Application run failed
java.lang.IllegalStateException: zookeeper not connected
    at org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.<init>(CuratorZookeeperClient.java:84)
    at org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperTransporter.createZookeeperClient(CuratorZookeeperTransporter.java:26)

首先推荐:pom.xm以来:

<dependency>
    <groupId>com.101tec</groupId>
    <artifactId>zkclient</artifactId>
    <version>0.10</version>
</dependency>

<dependency>
    <groupId>org.apache.dubbo</groupId>
    <artifactId>dubbo-spring-boot-starter</artifactId>
</dependency>

<!-- 使用zk 做注册中心,Dubbo 需要的依赖 -->
<dependency>
    <groupId>org.apache.dubbo</groupId>
    <artifactId>dubbo-dependencies-zookeeper</artifactId>
    <version>${dubbo.version}</version>
    <type>pom</type>
    <exclusions>
        <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </exclusion>
    </exclusions>
</dependency>


<dependency>
    <groupId>org.apache.curator</groupId>
    <artifactId>curator-framework</artifactId>
</dependency>

<dependency>
    <groupId>org.apache.curator</groupId>
    <artifactId>curator-recipes</artifactId>
</dependency>

报错处理:1:  Linux   a b c 部署zookeeper集群,d 部署dubbo; windows 启动服务,结果包此类错误,或其他错误;

                 2:Windows本地启动:单节点 zookeeper、dubbo  ; windows 启动服务,结果  ok,dubbo_web  ok

                 3: Linux 启动 d 启动:单节点 zookeeper、dubbo 【dubbo、zk同一台主机中】 ; windows 启动服务,结果 ok,dubbo_web  ok

                 4: Linux 启动启动:  a 单节点 zookeeper、d 上dubbo 【dubbo、zk同二台主机中】 ; windows 启动服务,结果包error,dubbo_web No;

总结来说:app ,dubbo,zookeeper通信问题;

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号