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 2022/05/16 15:14:53 UTC

[GitHub] [dubbo] saleson opened a new issue, #10045: provider 接口级注册+consumer APPLICATION_FIRST类型的服务发现无法正常RPC调用

saleson opened a new issue, #10045:
URL: https://github.com/apache/dubbo/issues/10045

   
   
   ### Environment
   
   * Dubbo version: 3.0.8
   * Operating System version: mac
   * Java version: 1.8
   
   ### Steps to reproduce this issue
   
   1. provider 接口级注册方式启动
   2. consumer 服务发现方式设置为APPLICATION_FIRST
   3. consumer调用provider暴露的dubbo service接口
   
   Pls. provide [GitHub address] to reproduce this issue.
   
   ### Expected Behavior
   
   正常调用成功
   
   ### Actual Behavior
   
   首次报java.lang.UnsupportedOperationException, 之后都报java.lang.NullPointerException
   
   If there is an exception, please attach the exception trace:
   
   ```
   2022-05-16 23:11:40.833  INFO 11071 --- [           main] o.a.d.s.d.consumer.ConsumerApplication   : Started ConsumerApplication in 5.516 seconds (JVM running for 7.158)
   2022-05-16 23:11:40.839  INFO 11071 --- [pool-1-thread-1] .b.c.e.AwaitingNonWebApplicationListener :  [Dubbo] Current Spring Boot Application is await...
   df
   [16/05/22 23:12:02:806 CST] main  INFO metadata.MetadataServiceNameMapping:  [DUBBO] org.apache.dubbo.springboot.demo.DemoService mapping to null instructed by local cache., dubbo version: 3.0.8.1-SNAPSHOT, current host: 192.168.43.36
   [16/05/22 23:12:02:827 CST] main  INFO migration.MigrationRuleListener:  [DUBBO] Listening for migration rules on dataId dubbo-springboot-demo-consumer.migration, group DUBBO_SERVICEDISCOVERY_MIGRATION, dubbo version: 3.0.8.1-SNAPSHOT, current host: 192.168.43.36
   [16/05/22 23:12:02:931 CST] main  INFO zookeeper.ZookeeperRegistry:  [DUBBO] Subscribe: dubbo://192.168.43.36/org.apache.dubbo.springboot.demo.DemoService?application=dubbo-springboot-demo-consumer&background=false&category=providers,configurators,routers&dubbo=2.0.2&interface=org.apache.dubbo.springboot.demo.DemoService&methods=sayHello,sayHelloAsync&pid=11071&protocol=dubbo&qos.enable=false&release=3.0.8.1-SNAPSHOT&side=consumer&sticky=false&timestamp=1652713922780, dubbo version: 3.0.8.1-SNAPSHOT, current host: 192.168.43.36
   [16/05/22 23:12:02:946 CST] main  INFO zookeeper.ZookeeperRegistry:  [DUBBO] Notify urls for subscribe url dubbo://192.168.43.36/org.apache.dubbo.springboot.demo.DemoService?application=dubbo-springboot-demo-consumer&background=false&category=providers,configurators,routers&dubbo=2.0.2&interface=org.apache.dubbo.springboot.demo.DemoService&methods=sayHello,sayHelloAsync&pid=11071&protocol=dubbo&qos.enable=false&release=3.0.8.1-SNAPSHOT&side=consumer&sticky=false&timestamp=1652713922780, url size: 3, dubbo version: 3.0.8.1-SNAPSHOT, current host: 192.168.43.36
   [16/05/22 23:12:02:952 CST] main  WARN integration.RegistryDirectory:  [DUBBO] Serviceorg.apache.dubbo.springboot.demo.DemoService received empty address list with no EMPTY protocol set, trigger empty protection., dubbo version: 3.0.8.1-SNAPSHOT, current host: 192.168.43.36
   [16/05/22 23:12:02:955 CST] Dubbo-framework-shared-handler-thread-2  WARN zookeeper.ZookeeperRegistry:  [DUBBO] Failed to save registry cache file, will retry, cause: null, dubbo version: 3.0.8.1-SNAPSHOT, current host: 192.168.43.36
   java.nio.channels.OverlappingFileLockException
   	at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255)
   	at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152)
   	at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1107)
   	at java.nio.channels.FileChannel.tryLock(FileChannel.java:1155)
   	at org.apache.dubbo.registry.support.AbstractRegistry.doSaveProperties(AbstractRegistry.java:192)
   	at org.apache.dubbo.registry.support.AbstractRegistry$SaveProperties.run(AbstractRegistry.java:587)
   	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:750)
   [16/05/22 23:12:02:959 CST] Dubbo-framework-shared-handler-thread-2  WARN zookeeper.ZookeeperRegistry:  [DUBBO] Failed to delete lock file [dubbo-registry-dubbo-springboot-demo-consumer-127.0.0.1-2181.cache.lock], dubbo version: 3.0.8.1-SNAPSHOT, current host: 192.168.43.36
   [16/05/22 23:12:03:013 CST] NettyClientWorker-4-1  INFO netty4.NettyClientHandler:  [DUBBO] The connection of /192.168.43.36:55098 -> /192.168.43.36:20882 is established., dubbo version: 3.0.8.1-SNAPSHOT, current host: 192.168.43.36
   [16/05/22 23:12:03:030 CST] main  INFO transport.AbstractClient:  [DUBBO] Successfully connect to server /192.168.43.36:20882 from NettyClient 192.168.43.36 using dubbo version 3.0.8.1-SNAPSHOT, channel is NettyChannel [channel=[id: 0x9b800e88, L:/192.168.43.36:55098 - R:/192.168.43.36:20882]], dubbo version: 3.0.8.1-SNAPSHOT, current host: 192.168.43.36
   [16/05/22 23:12:03:030 CST] main  INFO transport.AbstractClient:  [DUBBO] Start NettyClient /192.168.43.36 connect to the server /192.168.43.36:20882, dubbo version: 3.0.8.1-SNAPSHOT, current host: 192.168.43.36
   [16/05/22 23:12:03:161 CST] main  INFO client.ServiceDiscoveryRegistry:  [DUBBO] Trying to subscribe from apps dubbo-springboot-demo-provider for service key org.apache.dubbo.springboot.demo.DemoService:dubbo, , dubbo version: 3.0.8.1-SNAPSHOT, current host: 192.168.43.36
   [16/05/22 23:12:03:186 CST] main  INFO listener.ServiceInstancesChangedListener:  [DUBBO] Received instance notification, serviceName: dubbo-springboot-demo-provider, instances: 0, dubbo version: 3.0.8.1-SNAPSHOT, current host: 192.168.43.36
   [16/05/22 23:12:03:186 CST] main  INFO listener.ServiceInstancesChangedListener:  [DUBBO] 0 unique working revisions: , dubbo version: 3.0.8.1-SNAPSHOT, current host: 192.168.43.36
   java.lang.UnsupportedOperationException
   	at java.util.AbstractList.add(AbstractList.java:148)
   	at java.util.AbstractList.add(AbstractList.java:108)
   	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.toUrlsWithEmpty(ServiceInstancesChangedListener.java:429)
   	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.lambda$notifyAddressChanged$5(ServiceInstancesChangedListener.java:395)
   	at java.util.concurrent.ConcurrentHashMap.forEach(ConcurrentHashMap.java:1597)
   	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.notifyAddressChanged(ServiceInstancesChangedListener.java:388)
   	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.doOnEvent(ServiceInstancesChangedListener.java:199)
   	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.onEvent(ServiceInstancesChangedListener.java:112)
   	at org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscovery.registerServiceWatcher(ZookeeperServiceDiscovery.java:171)
   	at org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscovery.lambda$addServiceInstancesChangedListener$3(ZookeeperServiceDiscovery.java:120)
   	at java.lang.Iterable.forEach(Iterable.java:75)
   	at org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscovery.addServiceInstancesChangedListener(ZookeeperServiceDiscovery.java:120)
   	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.subscribeURLs(ServiceDiscoveryRegistry.java:322)
   	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.doSubscribe(ServiceDiscoveryRegistry.java:216)
   	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.subscribe(ServiceDiscoveryRegistry.java:184)
   	at org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:111)
   	at org.apache.dubbo.registry.integration.DynamicDirectory.subscribe(DynamicDirectory.java:180)
   	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.subscribe(ServiceDiscoveryRegistryDirectory.java:107)
   	at org.apache.dubbo.registry.integration.RegistryProtocol.doCreateInvoker(RegistryProtocol.java:570)
   	at org.apache.dubbo.registry.integration.InterfaceCompatibleRegistryProtocol.getServiceDiscoveryInvoker(InterfaceCompatibleRegistryProtocol.java:65)
   	at org.apache.dubbo.registry.client.migration.MigrationInvoker.refreshServiceDiscoveryInvoker(MigrationInvoker.java:436)
   	at org.apache.dubbo.registry.client.migration.MigrationInvoker.migrateToApplicationFirstInvoker(MigrationInvoker.java:244)
   	at org.apache.dubbo.registry.client.migration.MigrationRuleHandler.refreshInvoker(MigrationRuleHandler.java:73)
   	at org.apache.dubbo.registry.client.migration.MigrationRuleHandler.doMigrate(MigrationRuleHandler.java:57)
   	at org.apache.dubbo.registry.client.migration.MigrationRuleListener.onRefer(MigrationRuleListener.java:243)
   	at org.apache.dubbo.registry.integration.RegistryProtocol.interceptInvoker(RegistryProtocol.java:535)
   	at org.apache.dubbo.registry.integration.RegistryProtocol.doRefer(RegistryProtocol.java:505)
   	at org.apache.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:487)
   	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:74)
   	at org.apache.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:83)
   	at org.apache.dubbo.rpc.cluster.filter.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:71)
   	at org.apache.dubbo.rpc.protocol.ProtocolSerializationWrapper.refer(ProtocolSerializationWrapper.java:52)
   	at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java)
   	at org.apache.dubbo.config.ReferenceConfig.createInvokerForRemote(ReferenceConfig.java:494)
   	at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:397)
   	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:285)
   	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:219)
   	at org.apache.dubbo.config.spring.ReferenceBean.getCallProxy(ReferenceBean.java:349)
   	at org.apache.dubbo.config.spring.ReferenceBean.access$100(ReferenceBean.java:99)
   	at org.apache.dubbo.config.spring.ReferenceBean$DubboReferenceLazyInitTargetSource.createObject(ReferenceBean.java:356)
   	at org.springframework.aop.target.AbstractLazyCreationTargetSource.getTarget(AbstractLazyCreationTargetSource.java:88)
   	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:192)
   	at com.sun.proxy.$Proxy54.sayHello(Unknown Source)
   	at org.apache.dubbo.springboot.demo.consumer.ConsumerApplication.doSayHello(ConsumerApplication.java:58)
   	at org.apache.dubbo.springboot.demo.consumer.ConsumerApplication.main(ConsumerApplication.java:49)
   adf
   java.lang.NullPointerException
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
   	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:205)
   	at com.sun.proxy.$Proxy54.sayHello(Unknown Source)
   	at org.apache.dubbo.springboot.demo.consumer.ConsumerApplication.doSayHello(ConsumerApplication.java:58)
   	at org.apache.dubbo.springboot.demo.consumer.ConsumerApplication.main(ConsumerApplication.java:49)
   adf
   java.lang.NullPointerException
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
   	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:205)
   	at com.sun.proxy.$Proxy54.sayHello(Unknown Source)
   	at org.apache.dubbo.springboot.demo.consumer.ConsumerApplication.doSayHello(ConsumerApplication.java:58)
   	at org.apache.dubbo.springboot.demo.consumer.ConsumerApplication.main(ConsumerApplication.java:49)
   ```
   


-- 
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.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] guohao closed issue #10045: provider 接口级注册+consumer APPLICATION_FIRST类型的服务发现无法正常RPC调用

Posted by GitBox <gi...@apache.org>.
guohao closed issue #10045: provider 接口级注册+consumer APPLICATION_FIRST类型的服务发现无法正常RPC调用
URL: https://github.com/apache/dubbo/issues/10045


-- 
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