当前位置:   article > 正文

springboot整合dubbo 启动后自动关闭_org.apache.zookeeper.clientcnxn : eventthread shut

org.apache.zookeeper.clientcnxn : eventthread shut down for session:

dubbo 2.6

springboot 2.1.4

zookeeper 3.4.12

 

报错日志如果下:

2021-03-28 16:35:07.154  INFO 37228 --- [clientConnector] org.apache.zookeeper.ZooKeeper           : Client environment:user.dir=D:\dianyou\dianyou_space\space_im_newserver2\imbase_soa\imBase_group
2021-03-28 16:35:07.155  INFO 37228 --- [clientConnector] org.apache.zookeeper.ZooKeeper           : Initiating client connection, connectString=47.106.149.190:2181 sessionTimeout=30000 watcher=org.I0Itec.zkclient.ZkClient@34ee756f
2021-03-28 16:35:07.165  INFO 37228 --- [clientConnector] org.I0Itec.zkclient.ZkClient             : Waiting for keeper state SyncConnected
2021-03-28 16:35:07.169  INFO 37228 --- [6.149.190:2181)] org.apache.zookeeper.ClientCnxn          : Opening socket connection to server 47.106.149.190/47.106.149.190:2181. Will not attempt to authenticate using SASL (unknown error)
2021-03-28 16:35:07.180  INFO 37228 --- [6.149.190:2181)] org.apache.zookeeper.ClientCnxn          : Socket connection established to 47.106.149.190/47.106.149.190:2181, initiating session
2021-03-28 16:35:07.197  INFO 37228 --- [6.149.190:2181)] org.apache.zookeeper.ClientCnxn          : Session establishment complete on server 47.106.149.190/47.106.149.190:2181, sessionid = 0x1004ebd4de30020, negotiated timeout = 30000
2021-03-28 16:35:07.199  INFO 37228 --- [tor-EventThread] org.I0Itec.zkclient.ZkClient             : zookeeper state changed (SyncConnected)
2021-03-28 16:35:07.203  INFO 37228 --- [           main] c.a.d.r.zookeeper.ZookeeperRegistry      :  [DUBBO] Register: dubbo://192.168.1.101:20886/com.wenzi.imbase.spi.service.StudentService?anyhost=true&application=im-base-group&bean.name=providers:dubbo:com.wenzi.imbase.spi.service.StudentService&default.retries=0&default.service.filter=regerProviderFilter&default.timeout=6000&dubbo=2.0.2&generic=false&interface=com.wenzi.imbase.spi.service.StudentService&methods=getStudentListByName&pid=37228&serialization=hessian2&side=provider×tamp=1616920505964, dubbo version: 2.6.6, current host: 192.168.1.101
2021-03-28 16:35:07.243  INFO 37228 --- [           main] c.a.d.r.zookeeper.ZookeeperRegistry      :  [DUBBO] Subscribe: provider://192.168.1.101:20886/com.wenzi.imbase.spi.service.StudentService?anyhost=true&application=im-base-group&bean.name=providers:dubbo:com.wenzi.imbase.spi.service.StudentService&category=configurators&check=false&default.retries=0&default.service.filter=regerProviderFilter&default.timeout=6000&dubbo=2.0.2&generic=false&interface=com.wenzi.imbase.spi.service.StudentService&methods=getStudentListByName&pid=37228&serialization=hessian2&side=provider×tamp=1616920505964, dubbo version: 2.6.6, current host: 192.168.1.101
2021-03-28 16:35:07.290  INFO 37228 --- [           main] c.a.d.r.zookeeper.ZookeeperRegistry      :  [DUBBO] Notify urls for subscribe url provider://192.168.1.101:20886/com.wenzi.imbase.spi.service.StudentService?anyhost=true&application=im-base-group&bean.name=providers:dubbo:com.wenzi.imbase.spi.service.StudentService&category=configurators&check=false&default.retries=0&default.service.filter=regerProviderFilter&default.timeout=6000&dubbo=2.0.2&generic=false&interface=com.wenzi.imbase.spi.service.StudentService&methods=getStudentListByName&pid=37228&serialization=hessian2&side=provider×tamp=1616920505964, urls: [empty://192.168.1.101:20886/com.wenzi.imbase.spi.service.StudentService?anyhost=true&application=im-base-group&bean.name=providers:dubbo:com.wenzi.imbase.spi.service.StudentService&category=configurators&check=false&default.retries=0&default.service.filter=regerProviderFilter&default.timeout=6000&dubbo=2.0.2&generic=false&interface=com.wenzi.imbase.spi.service.StudentService&methods=getStudentListByName&pid=37228&serialization=hessian2&side=provider×tamp=1616920505964], dubbo version: 2.6.6, current host: 192.168.1.101
2021-03-28 16:35:07.345  INFO 37228 --- [           main] c.w.imbaseGroup.ImBaseGroupApplication   : Started ImBaseGroupApplication in 7.563 seconds (JVM running for 8.06)
2021-03-28 16:35:07.365  INFO 37228 --- [           main] c.r.dubbo.config.DubboAutoConfiguration  : 服务提供者导出完毕,共导出1个类实例!
2021-03-28 16:35:07.395  INFO 37228 --- [       Thread-4] c.a.d.r.support.AbstractRegistryFactory  :  [DUBBO] Close all registries [zookeeper://47.106.149.190:2181/com.alibaba.dubbo.registry.RegistryService?application=im-base-group&check=false&client=zkclient&dubbo=2.0.2&interface=com.alibaba.dubbo.registry.RegistryService&pid=37228&qos.accept.foreign.ip=false&qos.enable=false&qos.port=0×tamp=1616920505960], dubbo version: 2.6.6, current host: 192.168.1.101
2021-03-28 16:35:07.395  INFO 37228 --- [       Thread-4] c.a.d.r.zookeeper.ZookeeperRegistry      :  [DUBBO] Destroy registry:zookeeper://47.106.149.190:2181/com.alibaba.dubbo.registry.RegistryService?application=im-base-group&check=false&client=zkclient&dubbo=2.0.2&interface=com.alibaba.dubbo.registry.RegistryService&pid=37228&qos.accept.foreign.ip=false&qos.enable=false&qos.port=0×tamp=1616920505960, dubbo version: 2.6.6, current host: 192.168.1.101
2021-03-28 16:35:07.397  INFO 37228 --- [bboShutdownHook] c.a.dubbo.config.DubboShutdownHook       :  [DUBBO] Run shutdown hook now., dubbo version: 2.6.6, current host: 192.168.1.101
2021-03-28 16:35:07.397  INFO 37228 --- [       Thread-4] c.a.d.r.zookeeper.ZookeeperRegistry      :  [DUBBO] Unregister: dubbo://192.168.1.101:20886/com.wenzi.imbase.spi.service.StudentService?anyhost=true&application=im-base-group&bean.name=providers:dubbo:com.wenzi.imbase.spi.service.StudentService&default.retries=0&default.service.filter=regerProviderFilter&default.timeout=6000&dubbo=2.0.2&generic=false&interface=com.wenzi.imbase.spi.service.StudentService&methods=getStudentListByName&pid=37228&serialization=hessian2&side=provider×tamp=1616920505964, dubbo version: 2.6.6, current host: 192.168.1.101
2021-03-28 16:35:07.430  INFO 37228 --- [       Thread-4] c.a.d.r.zookeeper.ZookeeperRegistry      :  [DUBBO] Destroy unregister url dubbo://192.168.1.101:20886/com.wenzi.imbase.spi.service.StudentService?anyhost=true&application=im-base-group&bean.name=providers:dubbo:com.wenzi.imbase.spi.service.StudentService&default.retries=0&default.service.filter=regerProviderFilter&default.timeout=6000&dubbo=2.0.2&generic=false&interface=com.wenzi.imbase.spi.service.StudentService&methods=getStudentListByName&pid=37228&serialization=hessian2&side=provider×tamp=1616920505964, dubbo version: 2.6.6, current host: 192.168.1.101
2021-03-28 16:35:07.430  INFO 37228 --- [       Thread-4] c.a.d.r.zookeeper.ZookeeperRegistry      :  [DUBBO] Unsubscribe: provider://192.168.1.101:20886/com.wenzi.imbase.spi.service.StudentService?anyhost=true&application=im-base-group&bean.name=providers:dubbo:com.wenzi.imbase.spi.service.StudentService&category=configurators&check=false&default.retries=0&default.service.filter=regerProviderFilter&default.timeout=6000&dubbo=2.0.2&generic=false&interface=com.wenzi.imbase.spi.service.StudentService&methods=getStudentListByName&pid=37228&serialization=hessian2&side=provider×tamp=1616920505964, dubbo version: 2.6.6, current host: 192.168.1.101
2021-03-28 16:35:07.431  INFO 37228 --- [       Thread-4] c.a.d.r.zookeeper.ZookeeperRegistry      :  [DUBBO] Destroy unsubscribe url provider://192.168.1.101:20886/com.wenzi.imbase.spi.service.StudentService?anyhost=true&application=im-base-group&bean.name=providers:dubbo:com.wenzi.imbase.spi.service.StudentService&category=configurators&check=false&default.retries=0&default.service.filter=regerProviderFilter&default.timeout=6000&dubbo=2.0.2&generic=false&interface=com.wenzi.imbase.spi.service.StudentService&methods=getStudentListByName&pid=37228&serialization=hessian2&side=provider×tamp=1616920505964, dubbo version: 2.6.6, current host: 192.168.1.101
2021-03-28 16:35:07.431  INFO 37228 --- [06.149.190:2181] org.I0Itec.zkclient.ZkEventThread        : Terminate ZkClient event thread.
2021-03-28 16:35:07.450  INFO 37228 --- [tor-EventThread] org.apache.zookeeper.ClientCnxn          : EventThread shut down for session: 0x1004ebd4de30020
2021-03-28 16:35:07.450  INFO 37228 --- [       Thread-4] org.apache.zookeeper.ZooKeeper           : Session: 0x1004ebd4de30020 closed
2021-03-28 16:35:07.450  INFO 37228 --- [       Thread-4] c.a.d.rpc.protocol.dubbo.DubboProtocol   :  [DUBBO] Close dubbo server: /192.168.1.101:20886, dubbo version: 2.6.6, current host: 192.168.1.101
2021-03-28 16:35:07.451  INFO 37228 --- [       Thread-4] c.a.d.remoting.transport.AbstractServer  :  [DUBBO] Close NettyServer bind /0.0.0.0:20886, export /192.168.1.101:20886, dubbo version: 2.6.6, current host: 192.168.1.101
2021-03-28 16:35:07.453  INFO 37228 --- [       Thread-4] c.a.d.rpc.protocol.dubbo.DubboProtocol   :  [DUBBO] Unexport service: dubbo://192.168.1.101:20886/com.wenzi.imbase.spi.service.StudentService?anyhost=true&application=im-base-group&bean.name=providers:dubbo:com.wenzi.imbase.spi.service.StudentService&bind.ip=192.168.1.101&bind.port=20886&default.retries=0&default.service.filter=regerProviderFilter&default.timeout=6000&dubbo=2.0.2&generic=false&interface=com.wenzi.imbase.spi.service.StudentService&methods=getStudentListByName&pid=37228&qos.accept.foreign.ip=false&qos.enable=false&qos.port=0&serialization=hessian2&side=provider×tamp=1616920505964, dubbo version: 2.6.6, current host: 192.168.1.101
2021-03-28 16:35:07.454  INFO 37228 --- [       Thread-4] c.a.d.rpc.protocol.injvm.InjvmProtocol   :  [DUBBO] Unexport service: injvm://127.0.0.1/com.wenzi.imbase.spi.service.StudentService?anyhost=true&application=im-base-group&bean.name=providers:dubbo:com.wenzi.imbase.spi.service.StudentService&bind.ip=192.168.1.101&bind.port=20886&default.retries=0&default.service.filter=regerProviderFilter&default.timeout=6000&dubbo=2.0.2&generic=false&interface=com.wenzi.imbase.spi.service.StudentService&methods=getStudentListByName&pid=37228&qos.accept.foreign.ip=false&qos.enable=false&qos.port=0&serialization=hessian2&side=provider×tamp=1616920505964, dubbo version: 2.6.6, current host: 192.168.1.101
2021-03-28 16:35:07.457  INFO 37228 --- [       Thread-4] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} closed
2021-03-28 16:35:07.470  INFO 37228 --- [       Thread-4] .b.f.a.InjectAnnotationBeanPostProcessor : class com.alibaba.dubbo.config.spring.beans.factory.annotation.InjectAnnotationBeanPostProcessor was destroying!
2021-03-28 16:35:07.470  INFO 37228 --- [       Thread-4] f.a.ReferenceAnnotationBeanPostProcessor : class com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor was destroying!
2021-03-28 16:35:07.470  INFO 37228 --- [       Thread-4] com.reger.dubbo.config.AnnotationBean    : dubbo开始关闭....

 

解决方案:

在pom文件中加上web依赖就可以了

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

 

 

 


 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/94764
推荐阅读
相关标签
  

闽ICP备14008679号