Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix zk service discovery, create parent node if absent #7304

Merged

Conversation

chickenlj
Copy link
Contributor

Below is exception from dubbo-samples

2021-03-02T05:24:01.2519009Z Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'greeter': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: registerServiceWatcher create path=/services/demo-provider fail.
2021-03-02T05:24:01.2523291Z 	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:185)
2021-03-02T05:24:01.2528113Z 	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
2021-03-02T05:24:01.2532435Z 	at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1646)
2021-03-02T05:24:01.2535888Z 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
2021-03-02T05:24:01.2538784Z 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
2021-03-02T05:24:01.2541887Z 	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:211)
2021-03-02T05:24:01.2545645Z 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1312)
2021-03-02T05:24:01.2550073Z 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1278)
2021-03-02T05:24:01.2554484Z 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1097)
2021-03-02T05:24:01.2558700Z 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062)
2021-03-02T05:24:01.2563168Z 	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)
2021-03-02T05:24:01.2565627Z 	... 35 more
2021-03-02T05:24:01.2566755Z Caused by: java.lang.IllegalStateException: registerServiceWatcher create path=/services/demo-provider fail.
2021-03-02T05:24:01.2569499Z 	at org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscovery.registerServiceWatcher(ZookeeperServiceDiscovery.java:191)
2021-03-02T05:24:01.2573280Z 	at org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscovery.lambda$addServiceInstancesChangedListener$6(ZookeeperServiceDiscovery.java:160)
2021-03-02T05:24:01.2575551Z 	at java.lang.Iterable.forEach(Iterable.java:75)
2021-03-02T05:24:01.2578382Z 	at org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscovery.addServiceInstancesChangedListener(ZookeeperServiceDiscovery.java:160)
2021-03-02T05:24:01.2583462Z 	at org.apache.dubbo.registry.client.EventPublishingServiceDiscovery.addServiceInstancesChangedListener(EventPublishingServiceDiscovery.java:222)
2021-03-02T05:24:01.2588558Z 	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.registerServiceInstancesChangedListener(ServiceDiscoveryRegistry.java:357)
2021-03-02T05:24:01.2592495Z 	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.subscribeURLs(ServiceDiscoveryRegistry.java:332)
2021-03-02T05:24:01.2595465Z 	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.doSubscribe(ServiceDiscoveryRegistry.java:273)
2021-03-02T05:24:01.2598346Z 	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.subscribe(ServiceDiscoveryRegistry.java:257)
2021-03-02T05:24:01.2600984Z 	at org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:105)
2021-03-02T05:24:01.2603367Z 	at org.apache.dubbo.registry.integration.DynamicDirectory.subscribe(DynamicDirectory.java:151)
2021-03-02T05:24:01.2605980Z 	at org.apache.dubbo.registry.integration.RegistryProtocol.doCreateInvoker(RegistryProtocol.java:498)
2021-03-02T05:24:01.2610123Z 	at org.apache.dubbo.registry.integration.InterfaceCompatibleRegistryProtocol.getServiceDiscoveryInvoker(InterfaceCompatibleRegistryProtocol.java:65)
2021-03-02T05:24:01.2614911Z 	at org.apache.dubbo.registry.client.migration.MigrationInvoker.refreshServiceDiscoveryInvoker(MigrationInvoker.java:291)
2021-03-02T05:24:01.2619078Z 	at org.apache.dubbo.registry.client.migration.MigrationInvoker.migrateToServiceDiscoveryInvoker(MigrationInvoker.java:112)
2021-03-02T05:24:01.2622692Z 	at org.apache.dubbo.registry.client.migration.MigrationRuleHandler.doMigrate(MigrationRuleHandler.java:60)
2021-03-02T05:24:01.2625706Z 	at org.apache.dubbo.registry.client.migration.MigrationRuleListener.onRefer(MigrationRuleListener.java:103)
2021-03-02T05:24:01.2628626Z 	at org.apache.dubbo.registry.integration.RegistryProtocol.interceptInvoker(RegistryProtocol.java:471)
2021-03-02T05:24:01.2631177Z 	at org.apache.dubbo.registry.integration.RegistryProtocol.doRefer(RegistryProtocol.java:457)
2021-03-02T05:24:01.2633438Z 	at org.apache.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:451)
2021-03-02T05:24:01.2635742Z 	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:72)
2021-03-02T05:24:01.2638024Z 	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:80)
2021-03-02T05:24:01.2640182Z 	at org.apache.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:73)
2021-03-02T05:24:01.2641839Z 	at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java)
2021-03-02T05:24:01.2643265Z 	at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:367)
2021-03-02T05:24:01.2644924Z 	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:305)
2021-03-02T05:24:01.2646406Z 	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:204)
2021-03-02T05:24:01.2648050Z 	at org.apache.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:68)
2021-03-02T05:24:01.2651436Z 	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:178)

@codecov-io
Copy link

codecov-io commented Mar 3, 2021

Codecov Report

Merging #7304 (4ac42ff) into master (51d5a88) will increase coverage by 0.07%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #7304      +/-   ##
============================================
+ Coverage     58.92%   59.00%   +0.07%     
  Complexity      462      462              
============================================
  Files          1044     1044              
  Lines         42455    42472      +17     
  Branches       6222     6228       +6     
============================================
+ Hits          25017    25060      +43     
+ Misses        14619    14608      -11     
+ Partials       2819     2804      -15     
Impacted Files Coverage Δ Complexity Δ
.../registry/zookeeper/ZookeeperServiceDiscovery.java 33.33% <0.00%> (ø) 0.00 <0.00> (ø)
...pache/dubbo/registry/support/AbstractRegistry.java 78.14% <0.00%> (-2.97%) 0.00% <0.00%> (ø%)
...rg/apache/dubbo/rpc/protocol/AbstractExporter.java 60.00% <0.00%> (-1.12%) 0.00% <0.00%> (ø%)
...ache/dubbo/rpc/protocol/AbstractProxyProtocol.java 58.75% <0.00%> (-0.51%) 0.00% <0.00%> (ø%)
.../apache/dubbo/config/bootstrap/DubboBootstrap.java 42.02% <0.00%> (-0.10%) 0.00% <0.00%> (ø%)
...rg/apache/dubbo/common/timer/HashedWheelTimer.java 79.38% <0.00%> (ø) 0.00% <0.00%> (ø%)
.../rpc/cluster/router/condition/ConditionRouter.java 68.75% <0.00%> (ø) 0.00% <0.00%> (ø%)
...apache/dubbo/rpc/protocol/dubbo/DubboExporter.java 100.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
...apache/dubbo/rpc/protocol/injvm/InjvmExporter.java 100.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
.../dubbo/rpc/protocol/grpc/DubboHandlerRegistry.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51d5a88...4ac42ff. Read the comment docs.

Copy link
Member

@AlbumenJ AlbumenJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@chickenlj chickenlj merged commit 28fdc5d into apache:master Mar 3, 2021
@chickenlj chickenlj deleted the fix-zookeeper-servicediscovery-path branch March 30, 2021 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants