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

check=false still doesn't take effect #3792

Closed
2 tasks done
suiyueqiannian opened this issue Apr 2, 2019 · 8 comments
Closed
2 tasks done

check=false still doesn't take effect #3792

suiyueqiannian opened this issue Apr 2, 2019 · 8 comments

Comments

@suiyueqiannian
Copy link

suiyueqiannian commented Apr 2, 2019

  • 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.1
  • Operating System version: windows7
  • Java version: 1.8
  • Dubbo Spring boot Starter: 2.7.0

Steps to reproduce this issue

dubbo:
  protocol:
    port: 20880
  registry:
    address: N/A
    check: false
  consumer:
    check: false

AppController:

@Reference(check = false)
    private UserService userService;

exception:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appController': Injection of @org.apache.dubbo.config.annotation.Reference dependencies is failed; nested exception is java.lang.IllegalStateException: No such any registry to reference com.epipe.ucloud.crm.service.sys.UserService on the consumer 192.168.3.177 use dubbo version 2.7.1, please config <dubbo:registry address="..." /> to your spring config.

check=false doesn't take effect

@CrazyHZM
Copy link
Member

CrazyHZM commented Apr 2, 2019

repeated #195
I tested it for no problem, can you describe it in more detail?

@suiyueqiannian
Copy link
Author

suiyueqiannian commented Apr 3, 2019

the provider does't be started, I just started the consumer, the consumer config in previous replies. And these are the more detail:

2019-04-03 10:09:44.010  INFO 8696 --- [           main] d.s.b.c.e.WelcomeLogoApplicationListener : 

 :: Dubbo Spring Boot (v2.7.0) : https://github.com/apache/incubator-dubbo-spring-boot-project
 :: Dubbo (v2.7.1) : https://github.com/apache/incubator-dubbo
 :: Discuss group : dev@dubbo.apache.org

2019-04-03 10:09:44.015  INFO 8696 --- [           main] e.OverrideDubboConfigApplicationListener : Dubbo Config was overridden by externalized configuration {dubbo.application.logger=slf4j, dubbo.application.name=consumer-webapi, dubbo.application.qos-enable=false, dubbo.config.multiple=true, dubbo.consumer.check=false, dubbo.consumer.timeout=5000, dubbo.consumer.version=1.0.0, dubbo.protocol.port=20880, dubbo.registry.address=N/A, dubbo.registry.check=false}
log4j:WARN No appenders could be found for logger (org.apache.dubbo.common.logger.LoggerFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

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

2019-04-03 10:09:44.181  INFO 8696 --- [           main] com.epipe.ucloud.crm.webapi.Application  : Starting Application on Administrator with PID 8696 (D:\gt\work\CRM\backend\trunk\ucloud-crm-app\crm-app-webapi\target\classes started by gongtao in D:\gt\work\CRM\backend\trunk\ucloud-crm-app)
2019-04-03 10:09:44.181  INFO 8696 --- [           main] com.epipe.ucloud.crm.webapi.Application  : The following profiles are active: dev
2019-04-03 10:09:44.738  INFO 8696 --- [           main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : org.apache.dubbo.config.ApplicationConfig#0, class : org.apache.dubbo.config.ApplicationConfig] has been registered.
2019-04-03 10:09:44.739  INFO 8696 --- [           main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [org.apache.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : org.apache.dubbo.config.ApplicationConfig#0] has been registered.
2019-04-03 10:09:44.740  INFO 8696 --- [           main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : org.apache.dubbo.config.RegistryConfig#0, class : org.apache.dubbo.config.RegistryConfig] has been registered.
2019-04-03 10:09:44.740  INFO 8696 --- [           main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [org.apache.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : org.apache.dubbo.config.RegistryConfig#0] has been registered.
2019-04-03 10:09:44.740  INFO 8696 --- [           main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : org.apache.dubbo.config.ProtocolConfig#0, class : org.apache.dubbo.config.ProtocolConfig] has been registered.
2019-04-03 10:09:44.740  INFO 8696 --- [           main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [org.apache.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : org.apache.dubbo.config.ProtocolConfig#0] has been registered.
2019-04-03 10:09:44.741  INFO 8696 --- [           main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The dubbo config bean definition [name : org.apache.dubbo.config.ConsumerConfig#0, class : org.apache.dubbo.config.ConsumerConfig] has been registered.
2019-04-03 10:09:44.741  INFO 8696 --- [           main] .a.d.c.s.c.a.DubboConfigBindingRegistrar : The BeanPostProcessor bean definition [org.apache.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor] for dubbo config bean [name : org.apache.dubbo.config.ConsumerConfig#0] has been registered.
2019-04-03 10:09:44.857  INFO 8696 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.apache.dubbo.spring.boot.autoconfigure.DubboAutoConfiguration' of type [org.apache.dubbo.spring.boot.autoconfigure.DubboAutoConfiguration$$EnhancerBySpringCGLIB$$5433a3e3] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-03 10:09:44.936  INFO 8696 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.apache.dubbo.spring.boot.autoconfigure.DubboRelaxedBinding2AutoConfiguration' of type [org.apache.dubbo.spring.boot.autoconfigure.DubboRelaxedBinding2AutoConfiguration$$EnhancerBySpringCGLIB$$e4edc8b3] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-03 10:09:44.954  INFO 8696 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [org.apache.dubbo.spring.boot.autoconfigure.BinderDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-03 10:09:44.959  INFO 8696 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [org.apache.dubbo.spring.boot.autoconfigure.BinderDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-03 10:09:44.960  INFO 8696 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [org.apache.dubbo.spring.boot.autoconfigure.BinderDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-03 10:09:44.962  INFO 8696 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'relaxedDubboConfigBinder' of type [org.apache.dubbo.spring.boot.autoconfigure.BinderDubboConfigBinder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-04-03 10:09:45.260  INFO 8696 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2019-04-03 10:09:45.272  INFO 8696 --- [           main] o.a.coyote.http11.Http11NioProtocol      : Initializing ProtocolHandler ["http-nio-8080"]
2019-04-03 10:09:45.280  INFO 8696 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-04-03 10:09:45.280  INFO 8696 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.16]
2019-04-03 10:09:45.371  INFO 8696 --- [           main] o.a.c.c.C.[.[localhost].[/webapi]        : Initializing Spring embedded WebApplicationContext
2019-04-03 10:09:45.372  INFO 8696 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1155 ms
2019-04-03 10:09:45.785  INFO 8696 --- [           main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : org.apache.dubbo.config.ConsumerConfig#0] have been binding by prefix of configuration properties : dubbo.consumer
2019-04-03 10:09:45.795  INFO 8696 --- [           main] o.a.dubbo.common.logger.LoggerFactory    : using logger: org.apache.dubbo.common.logger.slf4j.Slf4jLoggerAdapter
2019-04-03 10:09:45.797  INFO 8696 --- [           main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : org.apache.dubbo.config.ApplicationConfig#0] have been binding by prefix of configuration properties : dubbo.application
2019-04-03 10:09:45.804  INFO 8696 --- [           main] .f.a.DubboConfigBindingBeanPostProcessor : The properties of bean [name : org.apache.dubbo.config.RegistryConfig#0] have been binding by prefix of configuration properties : dubbo.registry
2019-04-03 10:09:45.806  INFO 8696 --- [           main] o.a.d.c.s.b.f.a.ReferenceBeanBuilder     : The bean[type:ReferenceBean] has been built.
2019-04-03 10:09:45.813  INFO 8696 --- [           main] o.a.dubbo.common.logger.LoggerFactory    : using logger: org.apache.dubbo.common.logger.slf4j.Slf4jLoggerAdapter
2019-04-03 10:09:45.819  WARN 8696 --- [           main] 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.1, current host: 192.168.3.177
2019-04-03 10:09:45.844  WARN 8696 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appController': Injection of @org.apache.dubbo.config.annotation.Reference dependencies is failed; nested exception is java.lang.IllegalStateException: No such any registry to reference com.epipe.ucloud.crm.service.sys.UserService on the consumer 192.168.3.177 use dubbo version 2.7.1, please config <dubbo:registry address="..." /> to your spring config.
2019-04-03 10:09:45.844  INFO 8696 --- [           main] f.a.ReferenceAnnotationBeanPostProcessor : class org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor was destroying!
2019-04-03 10:09:45.846  INFO 8696 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2019-04-03 10:09:45.856  INFO 8696 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-04-03 10:09:45.864 ERROR 8696 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appController': Injection of @org.apache.dubbo.config.annotation.Reference dependencies is failed; nested exception is java.lang.IllegalStateException: No such any registry to reference com.epipe.ucloud.crm.service.sys.UserService on the consumer 192.168.3.177 use dubbo version 2.7.1, please config <dubbo:registry address="..." /> to your spring config.
	at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor.postProcessPropertyValues(AnnotationInjectedBeanPostProcessor.java:133)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1400)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:849)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
	at com.epipe.ucloud.crm.webapi.Application.main(Application.java:15)
Caused by: java.lang.IllegalStateException: No such any registry to reference com.epipe.ucloud.crm.service.sys.UserService on the consumer 192.168.3.177 use dubbo version 2.7.1, please config <dubbo:registry address="..." /> to your spring config.
	at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:361)
	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:305)
	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:231)
	at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor$ReferenceBeanInvocationHandler.init(ReferenceAnnotationBeanPostProcessor.java:174)
	at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor$ReferenceBeanInvocationHandler.access$100(ReferenceAnnotationBeanPostProcessor.java:147)
	at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.buildInvocationHandler(ReferenceAnnotationBeanPostProcessor.java:141)
	at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.buildProxy(ReferenceAnnotationBeanPostProcessor.java:123)
	at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.doGetInjectedBean(ReferenceAnnotationBeanPostProcessor.java:117)
	at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.doGetInjectedBean(ReferenceAnnotationBeanPostProcessor.java:50)
	at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor.getInjectedObject(AnnotationInjectedBeanPostProcessor.java:342)
	at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor$AnnotatedFieldElement.inject(AnnotationInjectedBeanPostProcessor.java:522)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
	at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor.postProcessPropertyValues(AnnotationInjectedBeanPostProcessor.java:129)
	... 17 common frames omitted


Process finished with exit code 1

@CrazyHZM
Copy link
Member

CrazyHZM commented Apr 9, 2019

Is the registration center configured?

@suiyueqiannian
Copy link
Author

@CrazyHZM registry.address=N/A, I want to connect provider directly without registration center in the development environment

@CrazyHZM
Copy link
Member

Here should be the check of the registration center is invalid, let me take a look.

@CrazyHZM
Copy link
Member

If you want to connect directly, you can configure the url of the service directly in the reference or consumer tag.
However, I did find that the check in the registry is invalid, I will fix it, but it does not solve your problem, because if you do not specify the url of the service, there will be an error in the service reference.

@suiyueqiannian
Copy link
Author

@CrazyHZM yes, I known I can configure the url of the service directly in the reference tag, but can‘t configure the url of the service directly in consumer tag, I just want to configure the url of the service directly in global.

@CrazyHZM
Copy link
Member

Try it with the latest version, if you still have problems, you can reopen the issues

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

2 participants