Skip to content

Consumer will lose subscribed service information when use Nacos as registry center #5871

@tswstarplanet

Description

@tswstarplanet
  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.7-SNAPSHOT
  • Operating System version: MacOS
  • Java version: OpenJDK 13

Steps to reproduce this issue

  1. Open the dubbo-demo-xml project
  2. Modify the registry center both of provider and consumer to Nacos;Open the check switch of consumer
  3. Run the provider
    4.Run the consumer

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

The rpc can work properly.

Actual Result

It fails.

If there is an exception, please attach the exception trace:

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service org.apache.dubbo.demo.DemoService. No provider available for the service org.apache.dubbo.demo.DemoService from the url nacos://127.0.0.1:8848/org.apache.dubbo.registry.RegistryService?application=demo-consumer&dubbo=2.0.2&init=false&interface=org.apache.dubbo.demo.DemoService&methods=sayHello,sayHelloAsync&pid=90344&qos.port=33333&register.ip=127.0.0.1&side=consumer&sticky=false&timestamp=1584323664330 to the consumer 127.0.0.1 use dubbo version 
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:177)
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1640)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1086)
	at org.apache.dubbo.demo.consumer.Application.main(Application.java:33)
Caused by: java.lang.IllegalStateException: Failed to check the status of the service org.apache.dubbo.demo.DemoService. No provider available for the service org.apache.dubbo.demo.DemoService from the url nacos://127.0.0.1:8848/org.apache.dubbo.registry.RegistryService?application=demo-consumer&dubbo=2.0.2&init=false&interface=org.apache.dubbo.demo.DemoService&methods=sayHello,sayHelloAsync&pid=90344&qos.port=33333&register.ip=127.0.0.1&side=consumer&sticky=false&timestamp=1584323664330 to the consumer 127.0.0.1 use dubbo version 
	at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:350)
	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:258)
	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:158)
	at org.apache.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:68)
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:170)
	... 6 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugBugs to being fixed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions