You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/07 06:10:12 UTC

[GitHub] [dubbo] niejian opened a new issue #8709: dubbo-3.0.2.1 zookeeper not connected

niejian opened a new issue #8709:
URL: https://github.com/apache/dubbo/issues/8709


   - [x] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   - [x] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 3.0.2.1
   * Operating System version: macos
   * Java version: 1.8
   * springboot version: 2.1.7
   * zk-server version: 3.4.14
   * `curator` version: 4.2.0/4.0.2
   * `zk-client` version: 3.4.14
   
   ### Steps to reproduce this issue
   本地环境,debug模式启动没问题,非debug模式启动就提示`zookeeper not connected`
   参照:https://github.com/apache/dubbo/issues/5378 ,不管是在配置文件中添加超时时间还是在连接地址上添加timeout参数都无效。
   配置信息:
   ```properties
   spring.application.name=demo-3.0
   server.port=9988
   dubbo.application.name=${spring.application.name}
   dubbo.protocol.port=20881
   dubbo.scan.base-packages=cn.com.dubbo.demo.provider.service
   dubbo.registry.protocol=dubbo
   dubbo.registry.timeout=60000
   #dubbo.registry.address=zookeeper://192.168.240.15:2181|nacos://192.168.240.53:8848
   dubbo.registry.address=zookeeper://192.168.240.58:2182?timeout=60000|zookeeper://192.168.240.15:2181?timeout=60000
   #dubbo.registry.address=zookeeper://localhost:2181
   dubbo.application.logger=log4j2
   #dubbo.config-center.address=zookeeper://127.0.0.1:2181
   #dubbo.metadata-report.address=zookeeper://127.0.0.1:2181
   dubbo.config-center.timeout=60000
   dubbo.config-center.address=zookeeper://192.168.240.58:2182?timeout=60000
   dubbo.metadata-report.address=zookeeper://192.168.240.58:2182?timeout=60000
   dubbo.metadata-report.timeout=60000
   # 可选值 interface、instance、all,默认是 all,即接口级地址、应用级地址都注册
   dubbo.application.register-mode=all
   #dubbo.application.service-discovery.migration=FORCE_APPLICATION
   # FORCE_INTERFACE,只消费接口级地址,如无地址则报错,单订阅 2.x 地址
   # APPLICATION_FIRST,智能决策接口级/应用级地址,双订阅
   # FORCE_APPLICATION,只消费应用级地址,如无地址则报错,单订阅 3.x 地址
   dubbo.application.service-discovery.migration=APPLICATION_FIRST
   ```
   
   
   Pls. provide [GitHub address] to reproduce this issue.
   https://github.com/niejian/dubbo-3.0-demo
   **demo-3.0-provider 模块**
   ### Expected Result
   正常启动
   What do you expected from the above steps?
   
   ### Actual Result
   
   What actually happens?
   
   If there is an exception, please attach the exception trace:
   
   ```
   
   java.lang.IllegalStateException: zookeeper not connected
   	at org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.<init>(CuratorZookeeperClient.java:87) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperTransporter.createZookeeperClient(CuratorZookeeperTransporter.java:26) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.remoting.zookeeper.AbstractZookeeperTransporter.connect(AbstractZookeeperTransporter.java:69) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.registry.zookeeper.ZookeeperRegistry.<init>(ZookeeperRegistry.java:81) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.registry.zookeeper.ZookeeperRegistryFactory.createRegistry(ZookeeperRegistryFactory.java:43) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.registry.support.AbstractRegistryFactory.getRegistry(AbstractRegistryFactory.java:159) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.registry.RegistryFactoryWrapper.getRegistry(RegistryFactoryWrapper.java:34) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.registry.RegistryFactory$Adaptive.getRegistry(RegistryFactory$Adaptive.java) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.registry.integration.RegistryProtocol.getRegistry(RegistryProtocol.java:359) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:214) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:64) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.rpc.cluster.filter.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:60) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.rpc.protocol.ProtocolSerializationWrapper.export(ProtocolSerializationWrapper.java:46) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.qos.protocol.QosProtocolWrapper.export(QosProtocolWrapper.java:64) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.ServiceConfig.doExportUrl(ServiceConfig.java:612) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.ServiceConfig.exportRemote(ServiceConfig.java:586) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.ServiceConfig.exportUrl(ServiceConfig.java:546) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:379) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:366) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:342) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:233) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.bootstrap.DubboBootstrap.exportServices(DubboBootstrap.java:1411) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.bootstrap.DubboBootstrap.doStart(DubboBootstrap.java:1143) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.bootstrap.DubboBootstrap.start(DubboBootstrap.java:1119) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onContextRefreshedEvent(DubboBootstrapApplicationListener.java:109) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationContextEvent(DubboBootstrapApplicationListener.java:101) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationEvent(DubboBootstrapApplicationListener.java:78) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
   	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
   	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
   	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
   	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:896) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
   	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:162) ~[spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
   	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
   	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
   	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
   	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
   	at cn.com.dubbo.demo.provider.DubboProviderBootstrap.main(DubboProviderBootstrap.java:15) [classes/:na]
   Caused by: java.lang.IllegalStateException: zookeeper not connected
   	at org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.<init>(CuratorZookeeperClient.java:84) ~[dubbo-3.0.2.1.jar:3.0.2.1]
   	... 42 common frames omitted
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] niejian commented on issue #8709: dubbo-3.0.2.1 zookeeper not connected

Posted by GitBox <gi...@apache.org>.
niejian commented on issue #8709:
URL: https://github.com/apache/dubbo/issues/8709#issuecomment-914873810


   配置改为如下:
   将多个注册中心通过配置 `dubbo.registries` 分别配置,项目能启动成功,并且可以调用到15注册中心的服务。但是有一个疑问就是在**dubbo版本2.6.6,多个注册中心可以用 `|`分割,也能实现`registries`功能,为什么3.0.2.1就不行了**
   ```properties
   dubbo.registry.protocol=dubbo
   dubbo.registry.timeout=60000
   dubbo.registries.test.id=58-registry
   dubbo.registries.test.address=zookeeper://192.168.240.58:2182
   dubbo.registries.test.default=true
   dubbo.registries.test.timeout=60000
   
   dubbo.registries.test2.id=15-registry
   dubbo.registries.test2.address=zookeeper://192.168.240.15:2181
   dubbo.registries.test2.timeout=60000
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] niejian commented on issue #8709: dubbo-3.0.2.1 zookeeper not connected

Posted by GitBox <gi...@apache.org>.
niejian commented on issue #8709:
URL: https://github.com/apache/dubbo/issues/8709#issuecomment-915889690


   重置mac网络


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] niejian closed issue #8709: dubbo-3.0.2.1 zookeeper not connected

Posted by GitBox <gi...@apache.org>.
niejian closed issue #8709:
URL: https://github.com/apache/dubbo/issues/8709


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org