alibaba / nacos

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
https://nacos.io
Apache License 2.0
30.29k stars 12.84k forks source link

Put dubbo's dubbo.registry.address configuration into nacos startup error #889

Closed liunancun closed 5 years ago

liunancun commented 5 years ago

将dubbo的dubbo.registry.address配置放到nacos启动报错 Put dubbo's dubbo.registry.address configuration into nacos startup error

Issue Description

Type: bug report

Describe what happened (or what feature you want)

2019-03-12 16:41:35.297 INFO 16236 --- [ main] c.a.dubbo.common.logger.LoggerFactory : using logger: com.alibaba.dubbo.common.logger.slf4j.Slf4jLoggerAdapter 2019-03-12 16:41:35.300 INFO 16236 --- [ main] a.b.d.c.e.WelcomeLogoApplicationListener :

:: Dubbo Spring Boot (v0.2.0) : https://github.com/apache/incubator-dubbo-spring-boot-project :: Dubbo (v2.6.2) : https://github.com/apache/incubator-dubbo :: Google group : dev@dubbo.incubator.apache.org

2019-03-12 16:41:35.302 INFO 16236 --- [ main] e.OverrideDubboConfigApplicationListener : Dubbo Config was overridden by externalized configuration {dubbo.application.name=bessky-boot-service, dubbo.protocol.name=dubbo, dubbo.protocol.port=28000, dubbo.scan.basePackages=com.bessky}

. _ _ /\ / '_ () \ \ \ \ ( ( )\ | ' | '| | ' \/ ` | \ \ \ \ \/ _)| |)| | | | | || (| | ) ) ) ) ' |__| .|| ||| |\, | / / / / =========|_|==============|__/=//// :: Spring Boot :: (v2.1.3.RELEASE)

2019-03-12 16:41:35.365 INFO 16236 --- [ main] c.b.s.BesskyBootServiceApplication : Starting BesskyBootServiceApplication on liunancun-PC with PID 16236 (E:\bessky\workspace\dubbo\bessky-boot-service\target\classes started by liunancun in E:\bessky\workspace\dubbo\bessky-boot-service) 2019-03-12 16:41:35.366 INFO 16236 --- [ main] c.b.s.BesskyBootServiceApplication : No active profile set, falling back to default profiles: default 2019-03-12 16:41:35.598 INFO 16236 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : com.alibaba.dubbo.config.ApplicationConfig#0, class : com.alibaba.dubbo.config.ApplicationConfig] has been registered. 2019-03-12 16:41:35.599 INFO 16236 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : com.alibaba.dubbo.config.ApplicationConfig#0] has been registered. 2019-03-12 16:41:35.599 INFO 16236 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : com.alibaba.dubbo.config.ProtocolConfig#0, class : com.alibaba.dubbo.config.ProtocolConfig] has been registered. 2019-03-12 16:41:35.599 INFO 16236 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : com.alibaba.dubbo.config.ProtocolConfig#0] has been registered. Tue Mar 12 16:41:35 CST 2019 sun.misc.Launcher$AppClassLoader@6d06d69c JM.Log:INFO Init JM logger with Slf4jLoggerFactory success, sun.misc.Launcher$AppClassLoader@6d06d69c Tue Mar 12 16:41:35 CST 2019 sun.misc.Launcher$AppClassLoader@6d06d69c JM.Log:INFO Log root path: C:\Users\liunancun\logs\ Tue Mar 12 16:41:35 CST 2019 sun.misc.Launcher$AppClassLoader@6d06d69c JM.Log:INFO Set nacos log path: C:\Users\liunancun\logs\nacos 2019-03-12 16:41:35.669 INFO 16236 --- [ main] c.a.n.client.identify.CredentialWatcher : [] [] [] No credential found 2019-03-12 16:41:35.807 INFO 16236 --- [ main] b.f.a.ServiceAnnotationBeanPostProcessor : [DUBBO] BeanNameGenerator bean can't be found in BeanFactory with name [org.springframework.context.annotation.internalConfigurationBeanNameGenerator], dubbo version: 2.6.2, current host: 192.168.97.8 2019-03-12 16:41:35.807 INFO 16236 --- [ main] b.f.a.ServiceAnnotationBeanPostProcessor : [DUBBO] BeanNameGenerator will be a instance of org.springframework.context.annotation.AnnotationBeanNameGenerator , it maybe a potential problem on bean name generation., dubbo version: 2.6.2, current host: 192.168.97.8 2019-03-12 16:41:35.819 WARN 16236 --- [ main] b.f.a.ServiceAnnotationBeanPostProcessor : [DUBBO] The BeanDefinition[Root bean: class [com.alibaba.dubbo.config.spring.ServiceBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] of ServiceBean has been registered with name : ServiceBean:helloServiceImpl:com.bessky.hello.service.HelloService, dubbo version: 2.6.2, current host: 192.168.97.8 2019-03-12 16:41:35.819 INFO 16236 --- [ main] b.f.a.ServiceAnnotationBeanPostProcessor : [DUBBO] 1 annotated Dubbo's @Service Components { [Bean definition with name 'helloServiceImpl': Generic bean: class [com.bessky.service.impl.HelloServiceImpl]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in file [E:\bessky\workspace\dubbo\bessky-boot-service\target\classes\com\bessky\service\impl\HelloServiceImpl.class]] } were scanned under package[com.bessky], dubbo version: 2.6.2, current host: 192.168.97.8 2019-03-12 16:41:35.819 INFO 16236 --- [ main] o.s.c.a.ConfigurationClassPostProcessor : Cannot enhance @Configuration bean definition 'com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration' since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as 'static'. 2019-03-12 16:41:35.904 INFO 16236 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-03-12 16:41:35.905 INFO 16236 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-03-12 16:41:35.936 INFO 16236 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : com.alibaba.dubbo.config.ApplicationConfig#0] have been binding by prefix of configuration properties : dubbo.application 2019-03-12 16:41:35.945 INFO 16236 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : com.alibaba.dubbo.config.ProtocolConfig#0] have been binding by prefix of configuration properties : dubbo.protocol 2019-03-12 16:41:36.234 INFO 16236 --- [ main] .LoggingNacosConfigMetadataEventListener : Nacos Config Metadata : dataId='dubbo.properties', groupId='DEFAULT_GROUP', beanName='besskyBootServiceApplication', bean='null', beanType='class com.bessky.service.BesskyBootServiceApplication', annotatedElement='null', xmlResource='null', nacosProperties='{serverAddr=192.168.99.201:8848, encode=UTF-8}', nacosPropertiesAttributes='{encode=${nacos.encode:UTF-8}, endpoint=${nacos.endpoint:}, namespace=${nacos.namespace:}, accessKey=${nacos.access-key:}, secretKey=${nacos.secret-key:}, serverAddr=${nacos.server-addr:}, contextPath=${nacos.context-path:}, clusterName=${nacos.cluster-name:}}', source='org.springframework.core.type.StandardAnnotationMetadata@6497b078', timestamp='1552380095768' 2019-03-12 16:41:36.238 INFO 16236 --- [ main] com.alibaba.dubbo.config.AbstractConfig : [DUBBO] The service ready on spring started. service: com.bessky.hello.service.HelloService, dubbo version: 2.6.2, current host: 192.168.97.8 2019-03-12 16:41:36.243 INFO 16236 --- [ main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2019-03-12 16:41:36.247 ERROR 16236 --- [ main] o.s.boot.SpringApplication : Application run failed

java.lang.IllegalStateException: No such any registry to export service in provider 192.168.97.8 use dubbo version 2.6.2, Please add to your spring config. If you want unregister, please set at com.alibaba.dubbo.config.AbstractInterfaceConfig.checkRegistry(AbstractInterfaceConfig.java:120) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:310) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:216) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:123) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:49) ~[dubbo-2.6.2.jar:2.6.2] at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:896) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at com.bessky.service.BesskyBootServiceApplication.main(BesskyBootServiceApplication.java:12) [classes/:na]

2019-03-12 16:41:36.250 INFO 16236 --- [ main] .c.NacosValueAnnotationBeanPostProcessor : class com.alibaba.nacos.spring.context.annotation.config.NacosValueAnnotationBeanPostProcessor was destroying! 2019-03-12 16:41:36.250 INFO 16236 --- [ main] AnnotationNacosInjectedBeanPostProcessor : class com.alibaba.nacos.spring.beans.factory.annotation.AnnotationNacosInjectedBeanPostProcessor was destroying! 2019-03-12 16:41:36.250 INFO 16236 --- [ main] f.a.ReferenceAnnotationBeanPostProcessor : class com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor was destroying! 2019-03-12 16:41:36.251 INFO 16236 --- [bboShutdownHook] com.alibaba.dubbo.config.AbstractConfig : [DUBBO] Run shutdown hook now., dubbo version: 2.6.2, current host: 192.168.97.8 2019-03-12 16:41:36.252 INFO 16236 --- [bboShutdownHook] c.a.d.r.support.AbstractRegistryFactory : [DUBBO] Close all registries [], dubbo version: 2.6.2, current host: 192.168.97.8

Describe what you expected to happen

启动成功 Successful startup

How to reproduce it (as minimally and precisely as possible)

  1. Nacos creates a new dubbo.properties configuration item, type: dubbo.registry.address=zookeeper://192.168.99.230:2181 (Nacos新建dubbo.properties配置项,键入内容为:dubbo.registry.address=zookeeper://192.168.99.230:2181)
  2. Create a new SpringBoot project locally, the application.properties content is: (本地新建SpringBoot项目,application.properties内容为:) nacos.config.server-addr=192.168.99.201:8848 dubbo.application.name=bessky-boot-service dubbo.protocol.name=dubbo dubbo.protocol.port=28000 dubbo.scan.basePackages=com.bessky
  3. The startup class is as follows: (启动类如下:) @SpringBootApplication @NacosPropertySource(dataId = "dubbo.properties") public class BesskyBootServiceApplication { public static void main(String[] args) { SpringApplication.run(BesskyBootServiceApplication.class, args); } } 4.The contents of the pom.xml file are as follows: (pom.xml文件内容如下:) <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    4.0.0 org.springframework.boot spring-boot-starter-parent 2.1.3.RELEASE com.bessky bessky-boot-service 0.0.1-SNAPSHOT 1.8 org.springframework.boot spring-boot-starter com.alibaba.boot dubbo-spring-boot-starter 0.2.0 com.alibaba.boot nacos-config-spring-boot-starter 0.2.1 com.bessky bessky-api 0.0.1-SNAPSHOT org.springframework.boot spring-boot-starter-test test org.springframework.boot spring-boot-maven-plugin

nacos-bot commented 5 years ago

Hi @liunancun, we detect non-English characters in the issue. This comment is an auto translation from @nacos-bot to help other users to understand this issue. We encourage you to describe your issue in English which is more friendly to other users.

Put dubbo's dubbo.registry.address configuration into nacos startup error

Put dubbo's dubbo.registry.address configuration into nacos startup error Put dubbo's dubbo.registry.address configuration into nacos startup error

Issue Description

Type: bug report

Describe what happened (or what feature you want)

2019-03-12 16:41:35.297 INFO 16236 --- [ main] c.a.dubbo.common.logger.LoggerFactory : using logger: com.alibaba.dubbo.common.logger.slf4j.Slf4jLoggerAdapter 2019-03-12 16:41:35.300 INFO 16236 --- [ main] a.b.d.c.e.WelcomeLogoApplicationListener :

:: Dubbo Spring Boot (v0.2.0) : https://github.com/apache/incubator-dubbo-spring-boot-project :: Dubbo (v2.6.2) : https://github.com/apache/incubator-dubbo :: Google group : dev@dubbo.incubator.apache.org

2019-03-12 16:41:35.302 INFO 16236 --- [ main] e.OverrideDubboConfigApplicationListener : Dubbo Config was overridden by externalized configuration {dubbo.application.name=bessky-boot-service, dubbo.protocol.name=dubbo, dubbo.protocol.port=28000, dubbo.scan.basePackages=com.bessky}

. _ _ /\ / '_ () \ \ \ \ ( ( )\ | ' | '| | ' \/ ` | \ \ \ \ \/ _)| |)| | | | | || (| | ) ) ) ) ' |__| .|| ||| |\, | / / / / =========|_|==============|__/=//// :: Spring Boot :: (v2.1.3.RELEASE)

2019-03-12 16:41:35.365 INFO 16236 --- [ main] c.b.s.BesskyBootServiceApplication : Starting BesskyBootServiceApplication on liunancun-PC with PID 16236 (E:\bessky\workspace\dubbo\bessky-boot-service\target\classes started by liunancun in E:\bessky\workspace\dubbo\bessky-boot-service) 2019-03-12 16:41:35.366 INFO 16236 --- [ main] c.b.s.BesskyBootServiceApplication : No active profile set, falling back to default profiles: default 2019-03-12 16:41:35.598 INFO 16236 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : com.alibaba.dubbo.config.ApplicationConfig#0, class : com.alibaba.dubbo.config.ApplicationConfig] has been registered. 2019-03-12 16:41:35.599 INFO 16236 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : com.alibaba.dubbo.config.ApplicationConfig#0] has been registered. 2019-03-12 16:41:35.599 INFO 16236 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : com.alibaba.dubbo.config.ProtocolConfig#0, class : com.alibaba.dubbo.config.ProtocolConfig] has been registered. 2019-03-12 16:41:35.599 INFO 16236 --- [ main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : com.alibaba.dubbo.config.ProtocolConfig#0] has been registered. Tue Mar 12 16:41:35 CST 2019 sun.misc.Launcher$AppClassLoader@6d06d69c JM.Log:INFO Init JM logger with Slf4jLoggerFactory success, sun.misc.Launcher$AppClassLoader@6d06d69c Tue Mar 12 16:41:35 CST 2019 sun.misc.Launcher$AppClassLoader@6d06d69c JM.Log:INFO Log root path: C:\Users\liunancun\logs\ Tue Mar 12 16:41:35 CST 2019 sun.misc.Launcher$AppClassLoader@6d06d69c JM.Log:INFO Set nacos log path: C:\Users\liunancun\logs\nacos 2019-03-12 16:41:35.669 INFO 16236 --- [ main] c.a.n.client.identify.CredentialWatcher : [] [] [] No credential found 2019-03-12 16:41:35.807 INFO 16236 --- [ main] b.f.a.ServiceAnnotationBeanPostProcessor : [DUBBO] BeanNameGenerator bean can't be found in BeanFactory with name [org.springframework.context.annotation.internalConfigurationBeanNameGenerator], dubbo version: 2.6.2, current host: 192.168.97.8 2019-03-12 16:41:35.807 INFO 16236 --- [ main] b.f.a.ServiceAnnotationBeanPostProcessor : [DUBBO] BeanNameGenerator will be a instance of org.springframework.context.annotation.AnnotationBeanNameGenerator , it maybe a potential problem on bean name generation., dubbo version: 2.6.2, current host: 192.168.97.8 2019-03-12 16:41:35.819 WARN 16236 --- [ main] b.f.a.ServiceAnnotationBeanPostProcessor : [DUBBO] The BeanDefinition[Root bean: class [com.alibaba.dubbo.config.spring.ServiceBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] of ServiceBean has been registered with name : ServiceBean:helloServiceImpl:com.bessky.hello.service.HelloService, dubbo version: 2.6.2, current host: 192.168.97.8 2019-03-12 16:41:35.819 INFO 16236 --- [ main] b.f.a.ServiceAnnotationBeanPostProcessor : [DUBBO] 1 annotated Dubbo's @Service Components { [Bean definition with name 'helloServiceImpl': Generic bean: class [com.bessky.service.impl.HelloServiceImpl]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in file [E:\bessky\workspace\dubbo\bessky-boot-service\target\classes\com\bessky\service\impl\HelloServiceImpl.class]] } were scanned under package[com.bessky], dubbo version: 2.6.2, current host: 192.168.97.8 2019-03-12 16:41:35.819 INFO 16236 --- [ main] o.s.c.a.ConfigurationClassPostProcessor : Cannot enhance @Configuration bean definition 'com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration' since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as 'static'. 2019-03-12 16:41:35.904 INFO 16236 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-03-12 16:41:35.905 INFO 16236 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [com.alibaba.boot.dubbo.autoconfigure.RelaxedDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-03-12 16:41:35.936 INFO 16236 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : com.alibaba.dubbo.config.ApplicationConfig#0] have been binding by prefix of configuration properties : dubbo.application 2019-03-12 16:41:35.945 INFO 16236 --- [ main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : com.alibaba.dubbo.config.ProtocolConfig#0] have been binding by prefix of configuration properties : dubbo.protocol 2019-03-12 16:41:36.234 INFO 16236 --- [ main] .LoggingNacosConfigMetadataEventListener : Nacos Config Metadata : dataId='dubbo.properties', groupId='DEFAULT_GROUP', beanName='besskyBootServiceApplication', bean='null', beanType='class com.bessky.service.BesskyBootServiceApplication', annotatedElement='null', xmlResource='null', nacosProperties='{serverAddr=192.168.99.201:8848, encode=UTF-8}', nacosPropertiesAttributes='{encode=${nacos.encode:UTF-8}, endpoint=${nacos.endpoint:}, namespace=${nacos.namespace:}, accessKey=${nacos.access-key:}, secretKey=${nacos.secret-key:}, serverAddr=${nacos.server-addr:}, contextPath=${nacos.context-path:}, clusterName=${nacos.cluster-name:}}', source='org.springframework.core.type.StandardAnnotationMetadata@6497b078', timestamp='1552380095768' 2019-03-12 16:41:36.238 INFO 16236 --- [ main] com.alibaba.dubbo.config.AbstractConfig : [DUBBO] The service ready on spring started. service: com.bessky.hello.service.HelloService, dubbo version: 2.6.2, current host: 192.168.97.8 2019-03-12 16:41:36.243 INFO 16236 --- [ main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2019-03-12 16:41:36.247 ERROR 16236 --- [ main] o.s.boot.SpringApplication : Application run failed

java.lang.IllegalStateException: No such any registry to export service in provider 192.168.97.8 use dubbo version 2.6.2, Please add to your spring config. If you want unregister, please set at com.alibaba.dubbo.config.AbstractInterfaceConfig.checkRegistry(AbstractInterfaceConfig.java:120) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:310) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:216) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:123) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:49) ~[dubbo-2.6.2.jar:2.6.2] at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:896) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at com.bessky.service.BesskyBootServiceApplication.main(BesskyBootServiceApplication.java:12) [classes/:na]

2019-03-12 16:41:36.250 INFO 16236 --- [ main] .c.NacosValueAnnotationBeanPostProcessor : class com.alibaba.nacos.spring.context.annotation.config.NacosValueAnnotationBeanPostProcessor was destroying! 2019-03-12 16:41:36.250 INFO 16236 --- [ main] AnnotationNacosInjectedBeanPostProcessor : class com.alibaba.nacos.spring.beans.factory.annotation.AnnotationNacosInjectedBeanPostProcessor was destroying! 2019-03-12 16:41:36.250 INFO 16236 --- [ main] f.a.ReferenceAnnotationBeanPostProcessor : class com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor was destroying! 2019-03-12 16:41:36.251 INFO 16236 --- [bboShutdownHook] com.alibaba.dubbo.config.AbstractConfig : [DUBBO] Run shutdown hook now., dubbo version: 2.6.2, current host: 192.168.97.8 2019-03-12 16:41:36.252 INFO 16236 --- [bboShutdownHook] c.a.d.r.support.AbstractRegistryFactory : [DUBBO] Close all registries [], dubbo version: 2.6.2, current host: 192.168.97.8

Describe what you expected to happen

Successful startup Successful startup

How to reproduce it (as minimally and precisely as possible)

  1. Nacos creates a new dubbo.properties configuration item, type: dubbo.registry.address=zookeeper://192.168.99.230:2181 (Nacos creates a new dubbo.properties configuration item, type: dubbo.registry.address=zookeeper://192.168.99.230:2181)
  2. Create a new SpringBoot project locally, the application.properties content is: (Locally create a new SpringBoot project, application.properties content is:) nacos.config.server-addr=192.168.99.201:8848 dubbo.application.name=bessky-boot-service dubbo.protocol.name=dubbo dubbo.protocol.port=28000 dubbo.scan.basePackages=com.bessky
  3. The startup class is as follows: (The startup class is as follows:) @SpringBootApplication @NacosPropertySource(dataId = "dubbo.properties") public class BesskyBootServiceApplication { public static void main(String[] args) { SpringApplication.run(BesskyBootServiceApplication.class, args); } } 4.The contents of the pom.xml file are as follows: (The contents of the pom.xml file are as follows:) <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    4.0.0 org.springframework.boot spring-boot-starter-parent 2.1.3.RELEASE com.bessky bessky-boot-service 0.0.1-SNAPSHOT 1.8 org.springframework.boot spring-boot-starter com.alibaba.boot dubbo-spring-boot-starter 0.2.0 com.alibaba.boot nacos-config-spring-boot-starter 0.2.1 com.bessky bessky-api 0.0.1-SNAPSHOT org.springframework.boot spring-boot-starter-test test org.springframework.boot spring-boot-maven-plugin

nkorange commented 5 years ago

Report it to https://github.com/dubbo/dubbo-registry-nacos please

itfinally commented 4 years ago

Same error, and that page has been lost, how to resolve this bug ?

nkorange commented 4 years ago

@itfinally That repository has been merged to dubbo .

chuntaojun commented 4 years ago

可以参考这个wiki解决:https://github.com/nacos-group/nacos-spring-boot-project/wiki/spring-boot-0.2.3-%E4%BB%A5%E5%8F%8A-0.1.3-%E7%89%88%E6%9C%AC%E6%96%B0%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8%E6%89%8B%E5%86%8C