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

Dubbo自动发现并消费原生Spring Cloud服务,调用方发现cloud服务后报but no metadata service can build from it. #409

Open
benxiaohaihh opened this issue Dec 25, 2021 · 0 comments

Comments

@benxiaohaihh
Copy link

Dubbo自动发现并消费原生Spring Cloud服务,以Consul为注册中心。
具体报错如下:
[25/12/21 21:14:00:493 CST] main INFO migration.MigrationRuleListener: [DUBBO] INIT, dubbo version: 2.7.13, current host: 192.168.27.1
[25/12/21 21:14:00:533 CST] main INFO client.ServiceDiscoveryRegistry: [DUBBO] org.apache.dubbo.samples.microservices.sc.rest.UserService mapping to spring-cloud-provider-for-dubbo instructed by provided-by set by user., dubbo version: 2.7.13, current host: 192.168.27.1
[25/12/21 21:14:00:793 CST] main INFO listener.ServiceInstancesChangedListener: [DUBBO] Received instance notification, serviceName: spring-cloud-provider-for-dubbo, instances: 1, dubbo version: 2.7.13, current host: 192.168.27.1
[25/12/21 21:14:00:809 CST] main ERROR listener.ServiceInstancesChangedListener: [DUBBO] Failed to load service metadata, metadata type is local, dubbo version: 2.7.13, current host: 192.168.27.1
java.lang.IllegalStateException: You have enabled introspection service discovery mode for instance DefaultServiceInstance{id='spring-cloud-provider-for-dubbo-9457c64541c350ec6efb99d6a568e609', serviceName='spring-cloud-provider-for-dubbo', host='LAPTOP-R1LFQ582', port=8099, enabled=true, healthy=true, metadata={}}, but no metadata service can build from it.
at org.apache.dubbo.registry.client.metadata.MetadataUtils.lambda$getMetadataServiceProxy$0(MetadataUtils.java:90)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
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.base/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.RegistryProtocol.getServiceDiscoveryInvoker(RegistryProtocol.java:505)
at org.apache.dubbo.registry.client.migration.MigrationInvoker.refreshServiceDiscoveryInvoker(MigrationInvoker.java:295)
at org.apache.dubbo.registry.client.migration.ServiceDiscoveryMigrationInvoker.migrateToServiceDiscoveryInvoker(ServiceDiscoveryMigrationInvoker.java:50)
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.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.ReferenceBean.getObject(ReferenceBean.java:68)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:178)
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:28)
[25/12/21 21:14:00:814 CST] main INFO listener.ServiceInstancesChangedListener: [DUBBO] MetadataInfo for instance LAPTOP-R1LFQ582:8099?revision=null is null, dubbo version: 2.7.13, current host: 192.168.27.1
[25/12/21 21:14:00:834 CST] main INFO config.ReferenceConfig: [DUBBO] Refer dubbo service org.apache.dubbo.samples.microservices.sc.rest.UserService from url rest://192.168.27.1/org.apache.dubbo.samples.microservices.sc.rest.UserService?application=dubbo-sc-consumer&check=false&dubbo=2.0.2&init=false&interface=org.apache.dubbo.samples.microservices.sc.rest.UserService&methods=getUser&pid=21868&protocol=rest&provided-by=spring-cloud-provider-for-dubbo&qos.port=33333&register.ip=192.168.27.1&release=2.7.13&side=consumer&sticky=false&timestamp=1640438039218, dubbo version: 2.7.13, current host: 192.168.27.1
[25/12/21 21:14:01:049 CST] main INFO support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: Bean 'userService' of type [org.apache.dubbo.common.bytecode.proxy0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[25/12/21 21:14:01:058 CST] Thread-0 INFO support.ClassPathXmlApplicationContext: Closing org.springframework.context.support.ClassPathXmlApplicationContext@2d928643: startup date [Sat Dec 25 21:13:55 CST 2021]; root of context hierarchy
Exception in thread "main" org.apache.dubbo.rpc.RpcException: No provider available from registry 127.0.0.1:8500 for service org.apache.dubbo.samples.microservices.sc.rest.UserService on consumer 192.168.27.1 use dubbo version 2.7.13, please check status of providers(disabled, not registered or in blacklist).
at org.apache.dubbo.registry.integration.DynamicDirectory.doList(DynamicDirectory.java:168)
at org.apache.dubbo.rpc.cluster.directory.AbstractDirectory.list(AbstractDirectory.java:99)
at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.list(AbstractClusterInvoker.java:297)
at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:262)
at org.apache.dubbo.rpc.cluster.interceptor.ClusterInterceptor.intercept(ClusterInterceptor.java:47)
at org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$InterceptorInvokerNode.invoke(AbstractCluster.java:92)
at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:93)
at org.apache.dubbo.registry.client.migration.ServiceDiscoveryMigrationInvoker.invoke(ServiceDiscoveryMigrationInvoker.java:59)
at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:96)
at org.apache.dubbo.common.bytecode.proxy0.getUser(proxy0.java)
at org.apache.dubbo.demo.consumer.Application.main(Application.java:29)
[25/12/21 21:14:01:060 CST] Thread-0 INFO config.DubboShutdownHook: [DUBBO] Run shutdown hook now., dubbo version: 2.7.13, current host: 192.168.27.1
[25/12/21 21:14:01:064 CST] Thread-0 INFO support.AbstractRegistryFactory: [DUBBO] Close all registries [org.apache.dubbo.registry.client.ServiceDiscoveryRegistry@71bd1be4], dubbo version: 2.7.13, current host: 192.168.27.1
[25/12/21 21:14:01:069 CST] Thread-0 INFO listener.LoggingEventListener: [DUBBO] org.apache.dubbo.registry.consul.ConsulServiceDiscovery@426b6a74 is stopping..., dubbo version: 2.7.13, current host: 192.168.27.1
[25/12/21 21:14:01:072 CST] Thread-0 INFO listener.LoggingEventListener: [DUBBO] org.apache.dubbo.registry.consul.ConsulServiceDiscovery@426b6a74 is stopped., dubbo version: 2.7.13, current host: 192.168.27.1
[25/12/21 21:14:01:077 CST] Thread-0 INFO bootstrap.DubboBootstrap: [DUBBO] DubboBootstrap is about to shutdown..., dubbo version: 2.7.13, current host: 192.168.27.1
[25/12/21 21:14:01:080 CST] Thread-0 INFO listener.LoggingEventListener: [DUBBO] Dubbo Service has been destroyed., dubbo version: 2.7.13, current host: 192.168.27.1
[25/12/21 21:14:01:082 CST] Thread-0 WARN config.DubboShutdownHook: [DUBBO] There's no ApplicationConfig specified., dubbo version: 2.7.13, current host: 192.168.27.1
java.lang.IllegalStateException: There's no ApplicationConfig specified.
at org.apache.dubbo.config.context.ConfigManager.lambda$getApplicationOrElseThrow$0(ConfigManager.java:90)
at java.base/java.util.Optional.orElseThrow(Optional.java:408)
at org.apache.dubbo.config.context.ConfigManager.getApplicationOrElseThrow(ConfigManager.java:90)
at org.apache.dubbo.rpc.model.ApplicationModel.getApplicationConfig(ApplicationModel.java:100)
at org.apache.dubbo.rpc.model.ApplicationModel.getName(ApplicationModel.java:104)
at org.apache.dubbo.rpc.model.ApplicationModel.getApplication(ApplicationModel.java:112)
at org.apache.dubbo.registry.integration.RegistryProtocol.destroy(RegistryProtocol.java:575)
at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.destroy(ProtocolListenerWrapper.java:82)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.destroy(ProtocolFilterWrapper.java:88)
at org.apache.dubbo.config.DubboShutdownHook.destroyProtocols(DubboShutdownHook.java:143)
at org.apache.dubbo.config.DubboShutdownHook.doDestroy(DubboShutdownHook.java:118)
at org.apache.dubbo.config.DubboShutdownHook.destroyAll(DubboShutdownHook.java:131)
at org.apache.dubbo.config.bootstrap.DubboBootstrap.destroy(DubboBootstrap.java:1280)
at org.apache.dubbo.common.function.ThrowableAction.execute(ThrowableAction.java:46)
at org.apache.dubbo.common.lang.ShutdownHookCallbacks.lambda$callback$0(ShutdownHookCallbacks.java:70)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at org.apache.dubbo.common.lang.ShutdownHookCallbacks.callback(ShutdownHookCallbacks.java:70)
at org.apache.dubbo.config.DubboShutdownHook.callback(DubboShutdownHook.java:84)
at org.apache.dubbo.config.DubboShutdownHook.run(DubboShutdownHook.java:72)
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onContextClosedEvent(DubboBootstrapApplicationListener.java:74)
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationContextEvent(DubboBootstrapApplicationListener.java:65)
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:393)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:991)
at org.springframework.context.support.AbstractApplicationContext$2.run(AbstractApplicationContext.java:929)
[25/12/21 21:14:01:084 CST] Thread-0 INFO listener.LoggingEventListener: [DUBBO] Dubbo Service has been destroyed., dubbo version: 2.7.13, current host: 192.168.27.1
[25/12/21 21:14:01:086 CST] Thread-0 INFO annotation.ReferenceAnnotationBeanPostProcessor: class org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor was destroying!

Process finished with exit code 1

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

No branches or pull requests

1 participant