alibaba / spring-cloud-alibaba

Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.
https://sca.aliyun.com
Apache License 2.0
27.97k stars 8.34k forks source link

No valid ip found from environment master 最新版本昨天更新的 #1320

Open itlidaye opened 4 years ago

itlidaye commented 4 years ago

Connection refused (Connection refused), dubbo version: 2.7.4.1, current host: 192.168.0.171

java.net.ConnectException: Connection refused (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_131] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_131] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_131] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_131] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_131] at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_131] at org.apache.dubbo.config.ServiceConfig.findConfigedHosts(ServiceConfig.java:704) [dubbo-2.7.4.1.jar!/:2.7.4.1] at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:561) [dubbo-2.7.4.1.jar!/:2.7.4.1] at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:458) [dubbo-2.7.4.1.jar!/:2.7.4.1] at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:416) [dubbo-2.7.4.1.jar!/:2.7.4.1] at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:379) [dubbo-2.7.4.1.jar!/:2.7.4.1] at com.alibaba.cloud.dubbo.service.DubboMetadataServiceExporter.export(DubboMetadataServiceExporter.java:82) [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar!/:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.metadata.repository.DubboServiceMetadataRepository.getDubboMetadataServiceMetadata(DubboServiceMetadataRepository.java:328) [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar!/:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.metadata.repository.DubboServiceMetadataRepository$$FastClassBySpringCGLIB$$4ef4b7bd.invoke() [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar!/:2.2.1.BUILD-SNAPSHOT] at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) [spring-core-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139) [spring-tx-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at com.alibaba.cloud.dubbo.metadata.repository.DubboServiceMetadataRepository$$EnhancerBySpringCGLIB$$361eabe6.getDubboMetadataServiceMetadata() [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar!/:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.autoconfigure.DubboServiceRegistrationAutoConfiguration.attachDubboMetadataServiceMetadata(DubboServiceRegistrationAutoConfiguration.java:127) [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar!/:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.autoconfigure.DubboServiceRegistrationAutoConfiguration.attachDubboMetadataServiceMetadata(DubboServiceRegistrationAutoConfiguration.java:121) [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar!/:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.autoconfigure.DubboServiceRegistrationAutoConfiguration.onServiceInstancePreRegistered(DubboServiceRegistrationAutoConfiguration.java:112) [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar!/:2.2.1.BUILD-SNAPSHOT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131] at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:305) [spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:190) [spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:153) [spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) [spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) [spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) [spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) [spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) [spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at com.alibaba.cloud.dubbo.registry.DubboServiceRegistrationEventPublishingAspect.beforeRegister(DubboServiceRegistrationEventPublishingAspect.java:51) [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar!/:2.2.1.BUILD-SNAPSHOT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:626) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.aspectj.AspectJMethodBeforeAdvice.before(AspectJMethodBeforeAdvice.java:44) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:55) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.aspectj.AspectJAfterAdvice.invoke(AspectJAfterAdvice.java:47) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691) [spring-aop-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at com.alibaba.cloud.nacos.registry.NacosServiceRegistry$$EnhancerBySpringCGLIB$$40b7421e.register() [spring-cloud-starter-alibaba-nacos-discovery-2.2.1.BUILD-SNAPSHOT.jar!/:2.2.1.BUILD-SNAPSHOT] at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.register(AbstractAutoServiceRegistration.java:239) [spring-cloud-commons-2.2.0.RELEASE.jar!/:2.2.0.RELEASE] at com.alibaba.cloud.nacos.registry.NacosAutoServiceRegistration.register(NacosAutoServiceRegistration.java:76) [spring-cloud-starter-alibaba-nacos-discovery-2.2.1.BUILD-SNAPSHOT.jar!/:2.2.1.BUILD-SNAPSHOT] at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.start(AbstractAutoServiceRegistration.java:138) [spring-cloud-commons-2.2.0.RELEASE.jar!/:2.2.0.RELEASE] at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.bind(AbstractAutoServiceRegistration.java:101) [spring-cloud-commons-2.2.0.RELEASE.jar!/:2.2.0.RELEASE] at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.onApplicationEvent(AbstractAutoServiceRegistration.java:88) [spring-cloud-commons-2.2.0.RELEASE.jar!/:2.2.0.RELEASE] at org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration.onApplicationEvent(AbstractAutoServiceRegistration.java:47) [spring-cloud-commons-2.2.0.RELEASE.jar!/:2.2.0.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) [spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) [spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) [spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) [spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) [spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:165) [spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) [spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) [spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE] at com.shiku.mall.collect.CollectApplication.main(CollectApplication.java:24) [classes!/:1.0.1] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131] at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [collect-server-1.0.1.jar:1.0.1] at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [collect-server-1.0.1.jar:1.0.1] at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) [collect-server-1.0.1.jar:1.0.1] at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) [collect-server-1.0.1.jar:1.0.1]

2020-04-03 10:43:15.738 INFO 32465 --- [ main] org.apache.dubbo.config.AbstractConfig : [DUBBO] Export dubbo service com.alibaba.cloud.dubbo.service.DubboMetadataService to local registry url : injvm://127.0.0.1/com.alibaba.cloud.dubbo.service.DubboMetadataService?anyhost=true&application=collect-server&bind.ip=192.168.0.171&bind.port=20884&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&group=collect-server&heartbeat=5000&interface=com.alibaba.cloud.dubbo.service.DubboMetadataService&methods=getAllServiceKeys,getServiceRestMetadata,getExportedURLs,getAllExportedURLs&pid=32465&qos.enable=false&release=2.7.4.1&revision=2.2.1.BUILD-SNAPSHOT&serialization=fastjson&side=provider&timestamp=1585881795711&version=1.0.0, dubbo version: 2.7.4.1, current host: 192.168.0.171

itlidaye commented 4 years ago

No provider available from registry 192.168.0.171:9090 for service com.mall.shop.api.IShopRpcService on consumer 192.168.0.171 use dubbo version 2.7.4.1, please check status of providers(disabled, not registered or in blacklist).

itlidaye commented 4 years ago

The metadata of Dubbo service[key : com.shiku.mall.shop.api.IShopRpcService] still can't be found, it could effect the further Dubbo service invocation 2020-04-03 11:27:45.987 INFO 20568 --- [client.listener] c.a.c.d.registry.SpringCloudRegistry : The Dubbo Service URL[ID : provider://192.168.0.168:20882/com.shiku.mall.product.api.IProductRpcService] is being subscribed for service[name : member-server] 2020-04-03 11:27:45.987 INFO 20568 --- [client.listener] a.c.d.m.r.DubboServiceMetadataRepository : The metadata of Dubbo service[name : member-server] is about to be initialized 2020-04-03 11:27:45.992 WARN 20568 --- [client.listener] org.apache.dubbo.config.AbstractConfig : [DUBBO] There's no valid metadata config found, if you are using the simplified mode of registry url, please make sure you have a metadata address configured properly., dubbo version: 2.7.4.1, current host: 192.168.0.168 2020-04-03 11:27:45.993 INFO 20568 --- [client.listener] org.apache.dubbo.config.AbstractConfig : [DUBBO] There's no valid monitor config found, if you want to open monitor statistics for Dubbo, please make sure your monitor is configured properly., dubbo version: 2.7.4.1, current host: 192.168.0.168 2020-04-03 11:27:45.994 ERROR 20568 --- [client.listener] a.c.d.m.r.DubboServiceMetadataRepository : org.springframework.context.annotation.AnnotationConfigApplicationContext@3c9b9bf0 has been closed already

java.lang.IllegalStateException: org.springframework.context.annotation.AnnotationConfigApplicationContext@3c9b9bf0 has been closed already at org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:1092) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1125) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at com.alibaba.cloud.dubbo.registry.SpringCloudRegistryFactory.init(SpringCloudRegistryFactory.java:82) ~[spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.registry.SpringCloudRegistryFactory.getRegistry(SpringCloudRegistryFactory.java:94) ~[spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at org.apache.dubbo.registry.RegistryFactory$Adaptive.getRegistry(RegistryFactory$Adaptive.java) ~[dubbo-2.7.4.1.jar:2.7.4.1] at org.apache.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:380) ~[dubbo-2.7.4.1.jar:2.7.4.1] at org.apache.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:71) ~[dubbo-2.7.4.1.jar:2.7.4.1] at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:69) ~[dubbo-2.7.4.1.jar:2.7.4.1] at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:128) ~[dubbo-2.7.4.1.jar:2.7.4.1] at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java) ~[dubbo-2.7.4.1.jar:2.7.4.1] at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:396) ~[dubbo-2.7.4.1.jar:2.7.4.1] at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:329) ~[dubbo-2.7.4.1.jar:2.7.4.1] at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:250) ~[dubbo-2.7.4.1.jar:2.7.4.1] at com.alibaba.cloud.dubbo.service.DubboGenericServiceFactory.create(DubboGenericServiceFactory.java:81) ~[spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.service.DubboMetadataServiceInvocationHandler.(DubboMetadataServiceInvocationHandler.java:40) ~[spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.service.DubboMetadataServiceProxy.newProxy(DubboMetadataServiceProxy.java:92) ~[spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.service.DubboMetadataServiceProxy.lambda$initProxy$0(DubboMetadataServiceProxy.java:53) ~[spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) ~[na:1.8.0_144] at com.alibaba.cloud.dubbo.service.DubboMetadataServiceProxy.initProxy(DubboMetadataServiceProxy.java:52) ~[spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.metadata.repository.DubboServiceMetadataRepository.initDubboMetadataServiceProxy(DubboServiceMetadataRepository.java:681) [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.metadata.repository.DubboServiceMetadataRepository.initSubscribedDubboMetadataService(DubboServiceMetadataRepository.java:649) [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.metadata.repository.DubboServiceMetadataRepository.initializeMetadata(DubboServiceMetadataRepository.java:293) [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.metadata.repository.DubboServiceMetadataRepository$$FastClassBySpringCGLIB$$4ef4b7bd.invoke() [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) [spring-core-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771) [spring-aop-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) [spring-aop-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) [spring-aop-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139) [spring-tx-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) [spring-aop-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) [spring-aop-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691) [spring-aop-5.2.5.RELEASE.jar:5.2.5.RELEASE] at com.alibaba.cloud.dubbo.metadata.repository.DubboServiceMetadataRepository$$EnhancerBySpringCGLIB$$b23eebcf.initializeMetadata() [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.registry.AbstractSpringCloudRegistry.subscribeDubboServiceURL(AbstractSpringCloudRegistry.java:281) [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.registry.AbstractSpringCloudRegistry$1.onApplicationEvent(AbstractSpringCloudRegistry.java:204) [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.registry.AbstractSpringCloudRegistry$1.onApplicationEvent(AbstractSpringCloudRegistry.java:197) [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at com.alibaba.cloud.dubbo.autoconfigure.DubboServiceDiscoveryAutoConfiguration.dispatchServiceInstancesChangedEvent(DubboServiceDiscoveryAutoConfiguration.java:168) [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.autoconfigure.DubboServiceDiscoveryAutoConfiguration.access$200(DubboServiceDiscoveryAutoConfiguration.java:106) [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at com.alibaba.cloud.dubbo.autoconfigure.DubboServiceDiscoveryAutoConfiguration$NacosConfiguration.lambda$subscribeEventListener$1(DubboServiceDiscoveryAutoConfiguration.java:548) [spring-cloud-starter-dubbo-2.2.1.BUILD-SNAPSHOT.jar:2.2.1.BUILD-SNAPSHOT] at com.alibaba.nacos.client.naming.core.EventDispatcher$Notifier.run(EventDispatcher.java:132) ~[nacos-client-1.2.1.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_144] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_144] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_144]

2020-04-03 11:27:45.995 WARN 20568 --- [client.listener] c.a.c.d.registry.SpringCloudRegistry : The metadata of Dubbo service[key : com.shiku.mall.product.api.IProductRpcService] still can't be found, it could effect the further Dubbo service invocation

lcg72 commented 4 years ago

没有服务提供者,需要设置check=false

itlidaye commented 4 years ago

Not found exported service 这个是什么问题呢

itlidaye commented 4 years ago

设置check=false 已经设置

dubbo: scan:

dubbo 服务扫描基准包

    base-packages: com.mall
protocol:
    # dubbo 协议
    name: dubbo
    serialization: fastjson
    # dubbo 协议端口( -1 表示自增端口,从 20880 开始)
    port: -1
    heartbeat: 5000
consumer:
    lazy: true
    check: false
    reconnect: true
    timeout: 15000
##registry:
# 挂载到 Spring Cloud 注册中心
    ##address: spring-cloud://192.168.0.171
cloud:
    interval: 1000
    retry-count: 1
lcg72 commented 4 years ago

你spring-cloud配置的注册中心是否正确

itlidaye commented 4 years ago

registry:

挂载到 Spring Cloud 注册中心

address: spring-cloud://192.168.0.171

这个注释了 这个没有配置 默认不就是 spring-cloud://localhost 内网多机使用集群这样有问题吗

lcg72 commented 4 years ago

默认是使用spring-cloud的配置,问题是你得配spring-cloud的注册中心,使用nacos或zookeeper

截屏2020-04-03 20 54 36
itlidaye commented 4 years ago

spring: application: name: order-server cloud: nacos: config: server-addr: 192.168.0.120:8848 namespace: 8dda34a5-5d9d-446e-a83f-347901486f92 ext-config: # 数组形式

common.yaml 内容

spring: cloud:

使用 Naoos 作为服务注册发现

nacos:
  discovery:
    enabled: true
    register-enabled: true
    server-addr: 192.168.0.120:8848
    cluster-name: local
    namespace: 8dda34a5-5d9d-446e-a83f-347901486f92

这个配置了 只是没有配置用户名和密码 我一般服务都是正常可以使用的,只是经常出现上面发的异常日志,然后dubbo 调用就不通了,异常后我服务重启就可以正常使用了,好像是不稳定还是怎么回事

lcg72 commented 4 years ago

你到nacos里面看下服务,没配用户名密码好像有问题,会掉,至少我的是这样。

itlidaye commented 4 years ago

nacos 下服务是正常的,只是dubbo rpc 经常用一段时间就断了

andaren commented 4 years ago

the same question!

The metadata of Dubbo service[key : myService] still can't be found, it could effect the further Dubbo service invocation

the configuration like this

spring:
  cloud:
    nacos:
      #####################
      # 注册中心
      #####################
      discovery:
        server-addr: 192.168.1.133:8848
        # 命名空间
        namespace: d5b4d75e-b175-47ed-831c-84edeaa8556c
        ip:
        port: 18900
        weight: 1
        enabled: true

# DUBBO 配置
dubbo:
  cloud:
    subscribed-services: tms-data-center
  registry:
    # 挂载到 Spring Cloud 注册中心
    address: spring-cloud://192.168.1.133
    check: false
  protocol:
    # dubbo 协议
    name: dubbo
    # dubbo 协议端口( -1 表示自增端口,从 20880 开始)
    port: -1
  monitor:
    protocol: register
  consumer:
    check:  false
    timeout: 3000

and it says No provider available for the service when i call the consumer

pom like this


       <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-dubbo</artifactId>
        </dependency>

       <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
        </dependency>