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

EventPublishingServiceDiscovery add error log #8066

Merged
merged 2 commits into from Jun 21, 2021

Conversation

lkxiaolou
Copy link

@lkxiaolou lkxiaolou commented Jun 16, 2021

What is the purpose of the change

to solve #8061

such as

2021-06-16 16:58:02,210 [main] ERROR org.apache.dubbo.registry.client.EventPublishingServiceDiscovery (EventPublishingServiceDiscovery.java:287) -  [DUBBO] Execute action throws and dispatch a ServiceDiscoveryExceptionEvent, dubbo version: 2.7.12, current host: 172.23.233.52
java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: org/apache/curator/x/discovery/ServiceDiscovery
	at org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscovery.doRegister(ZookeeperServiceDiscovery.java:92)
	at org.apache.dubbo.registry.client.AbstractServiceDiscovery.register(AbstractServiceDiscovery.java:33)
	at org.apache.dubbo.registry.client.EventPublishingServiceDiscovery.lambda$register$0(EventPublishingServiceDiscovery.java:159)
	at org.apache.dubbo.registry.client.EventPublishingServiceDiscovery.executeWithEvents(EventPublishingServiceDiscovery.java:285)
	at org.apache.dubbo.registry.client.EventPublishingServiceDiscovery.register(EventPublishingServiceDiscovery.java:157)
	at org.apache.dubbo.config.bootstrap.DubboBootstrap.lambda$doRegisterServiceInstance$21(DubboBootstrap.java:1192)
	at java.util.ArrayList.forEach(ArrayList.java:1259)
	at org.apache.dubbo.config.bootstrap.DubboBootstrap.doRegisterServiceInstance(DubboBootstrap.java:1185)
	at org.apache.dubbo.config.bootstrap.DubboBootstrap.registerServiceInstance(DubboBootstrap.java:1163)
	at org.apache.dubbo.config.bootstrap.DubboBootstrap.start(DubboBootstrap.java:892)
	at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onContextRefreshedEvent(DubboBootstrapApplicationListener.java:70)
	at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationContextEvent(DubboBootstrapApplicationListener.java:63)
	at com.alibaba.spring.context.OnceApplicationContextEventListener.onApplicationEvent(OnceApplicationContextEventListener.java:52)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:404)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:361)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:898)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:554)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
	at com.didichuxing.provider.Provider.main(Provider.java:16)
Caused by: java.lang.NoClassDefFoundError: org/apache/curator/x/discovery/ServiceDiscovery
	... 28 more
Caused by: java.lang.ClassNotFoundException: org.apache.curator.x.discovery.ServiceDiscovery
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	... 28 more
2021-06-16 16:58:02,211 [main] INFO  dubbo.registry.client.event.listener.LoggingEventListener (LoggingEventListener.java:82) -  [DUBBO] DefaultServiceInstance{id='172.23.233.52:20880', serviceName='ddog-my-demo-p0', host='172.23.233.52', port=20880, enabled=true, healthy=true, metadata={dubbo.metadata-service.url-params={"dubbo":{"version":"1.0.0","dubbo":"2.0.2","release":"2.7.12","port":"20881"}}, dubbo.endpoints=[{"port":20880,"protocol":"dubbo"}], dubbo.metadata.revision=8493DD40425FC5C216651D0B576A621B, dubbo.metadata.storage-type=local}} has been registered into org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscovery@2f37f1f9., dubbo version: 2.7.12, current host: 172.23.233.52
2021-06-16 16:58:02,213 [Dubbo-framework-scheduler-thread-1] ERROR org.apache.dubbo.config.bootstrap.DubboBootstrap (DubboBootstrap.java:1172) -  [DUBBO] refresh metadata and instance failed, dubbo version: 2.7.12, current host: 172.23.233.52
java.lang.NullPointerException
	at org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.calInstanceRevision(ServiceInstanceMetadataUtils.java:249)
	at org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.lambda$refreshMetadataAndInstance$6(ServiceInstanceMetadataUtils.java:272)
	at java.util.ArrayList.forEach(ArrayList.java:1259)
	at org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.refreshMetadataAndInstance(ServiceInstanceMetadataUtils.java:271)
	at org.apache.dubbo.config.bootstrap.DubboBootstrap.lambda$registerServiceInstance$20(DubboBootstrap.java:1170)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

@codecov-commenter
Copy link

codecov-commenter commented Jun 16, 2021

Codecov Report

Merging #8066 (1a70092) into master (8892a36) will increase coverage by 0.06%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #8066      +/-   ##
============================================
+ Coverage     61.16%   61.22%   +0.06%     
  Complexity      491      491              
============================================
  Files          1091     1091              
  Lines         43953    43954       +1     
  Branches       6417     6417              
============================================
+ Hits          26882    26909      +27     
+ Misses        14088    14061      -27     
- Partials       2983     2984       +1     
Impacted Files Coverage Δ
...gistry/client/EventPublishingServiceDiscovery.java 72.83% <0.00%> (-0.92%) ⬇️
...ting/exchange/support/header/HeartbeatHandler.java 90.69% <0.00%> (-2.33%) ⬇️
...apache/dubbo/common/extension/ExtensionLoader.java 81.23% <0.00%> (+0.42%) ⬆️
...g/apache/dubbo/registry/consul/ConsulRegistry.java 60.58% <0.00%> (+0.58%) ⬆️
...he/dubbo/registry/multicast/MulticastRegistry.java 70.23% <0.00%> (+0.93%) ⬆️
...ting/zookeeper/curator/CuratorZookeeperClient.java 70.68% <0.00%> (+1.14%) ⬆️
...e/dubbo/remoting/transport/netty4/NettyClient.java 71.01% <0.00%> (+1.44%) ⬆️
.../dubbo/remoting/transport/netty4/NettyChannel.java 64.35% <0.00%> (+1.98%) ⬆️
...rg/apache/dubbo/rpc/protocol/dubbo/DubboCodec.java 74.10% <0.00%> (+3.57%) ⬆️
...dubbo/remoting/exchange/support/DefaultFuture.java 87.17% <0.00%> (+6.83%) ⬆️
... and 1 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 8892a36...1a70092. Read the comment docs.

@AlbumenJ AlbumenJ merged commit 271921a into apache:master Jun 21, 2021
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