开发者社区 > 云原生 > 正文

升级到Dubbo to 2.7.13 报错

环境信息

Dubbo version: 2.7.13 Operating System version: win10 Java version: 1.8 nacos:2.0.0

步骤重现

Upgrade Dubbo 2.7.10 -> 2.7.13 dubbo-registry-nacos 2.7.10 -> 2.7.13 dubbo-spring-boot-starter 2.7.10 -> 2.7.13 nacos-client 1.33 -> 1.4.2 spring-context-support -> 1.0.11

期待结果

没有报错

现执行情况

2021-09-10 15:33:55.238 [yourproject-server-1.0.0] [8e05ea8b36274a6688513c873705f01c] ERROR ServiceInstancesChangedListener:187 - [DUBBO] Failed to load service metadata, metadata type is local, dubbo version: 2.7.13, current host: 192.168.83.115 java.lang.IllegalStateException: You have enabled introspection service discovery mode for instance DefaultServiceInstance{id='192.168.83.115#8089#DEFAULT#DEFAULT_GROUP@@common-file-server', serviceName='common-file-server', host='192.168.83.115', port=8089, enabled=true, healthy=true, metadata={spring.application.group.key=group, spring.application.name=common-file-server, spring.application.register.control.enabled=true, spring.boot.version=2.2.10.RELEASE, spring.application.discovery.version=6.0.1, spring.application.discovery.plugin=Nacos, version=3.3.0, spring.application.config.rest.control.enabled=true, spring.application.context-path=/common-file-server, spring.application.type=service, spring.application.discovery.control.enabled=true, region=xxx, preserved.register.source=SPRING_CLOUD, group=GRAY-GROUP}}, but no metadata service can build from it. at org.apache.dubbo.registry.client.metadata.MetadataUtils.lambda$getMetadataServiceProxy$0(MetadataUtils.java:90) at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) at org.apache.dubbo.registry.client.metadata.MetadataUtils.getMetadataServiceProxy(MetadataUtils.java:74) at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.getMetadataInfo(ServiceInstancesChangedListener.java:180) at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.onEvent(ServiceInstancesChangedListener.java:116) at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.lambda$subscribeURLs$3(ServiceDiscoveryRegistry.java:337) at java.lang.Iterable.forEach(Iterable.java:75) at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.subscribeURLs(ServiceDiscoveryRegistry.java:334) at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.doSubscribe(ServiceDiscoveryRegistry.java:269) at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.subscribe(ServiceDiscoveryRegistry.java:256) at org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:105) at org.apache.dubbo.registry.integration.DynamicDirectory.subscribe(DynamicDirectory.java:154) at org.apache.dubbo.registry.integration.RegistryProtocol.doCreateInvoker(RegistryProtocol.java:525) at org.apache.dubbo.registry.integration.InterfaceCompatibleRegistryProtocol.getServiceDiscoveryInvoker(InterfaceCompatibleRegistryProtocol.java:77) at org.apache.dubbo.registry.client.migration.MigrationInvoker.refreshServiceDiscoveryInvoker(MigrationInvoker.java:295) at org.apache.dubbo.registry.client.migration.MigrationInvoker.migrateToServiceDiscoveryInvoker(MigrationInvoker.java:112) at org.apache.dubbo.registry.client.migration.MigrationRuleHandler.doMigrate(MigrationRuleHandler.java:58) at org.apache.dubbo.registry.client.migration.MigrationRuleListener.onRefer(MigrationRuleListener.java:103) at org.apache.dubbo.registry.integration.RegistryProtocol.interceptInvoker(RegistryProtocol.java:498) at org.apache.dubbo.registry.integration.RegistryProtocol.doRefer(RegistryProtocol.java:483) at org.apache.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:477) at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:72) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:81) at org.apache.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:73) at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java) at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:378) at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:313) at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:206) at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.doGetInjectedBean(ReferenceAnnotationBeanPostProcessor.java:165) at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.getInjectedObject(AbstractAnnotationBeanPostProcessor.java:409) at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor$AnnotatedFieldElement.inject(AbstractAnnotationBeanPostProcessor.java:626) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130) at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:179) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1425) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) 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:1226) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)

原提问者GitHub用户

展开
收起
大圣东游 2023-05-11 19:59:04 204 0
1 条回答
写回答
取消 提交回答
  • 2.7.x 版本不建议开启应用级服务发现,开启需要同时保证元数据中心工作正常

    原回答者GitHub用户AlbumenJ

    2023-05-12 11:09:14
    赞同 展开评论 打赏

阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。

相关电子书

更多
Dubbo开源现状与2.7规划 立即下载
Dubbo分布式服务治理实战 立即下载
《Dubbo 3.0 前瞻》 立即下载