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

Unsatisfied dependency expressed through method 'ribbonServerList' parameter 1 #832

Open gigaZhang opened 5 years ago

gigaZhang commented 5 years ago

The Nacos I used was deployed in the EDAs environment, and the ribbon load balancing configuration reported errors when restarting the server: 用的nacos部署在edas环境里,ribbon负载均衡的配置在重启服务器的时候会报错

:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'ribbonServerList' defined in org.springframework.cloud.alibaba.nacos.ribbon.NacosRibbonClientConfiguration: Unsatisfied dependency expressed through method 'ribbonServerList' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'nacosProperties': Singleton bean creation not allowed while singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)

我们鼓励使用英文,如果不能直接使用,可以使用翻译软件,您仍旧可以保留中文原文。 We recommend using English. If you are non-native English speaker, you can use the translation software.

Which Component eg. Nacos Discovery, Sentinel

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here. e.g. MacOS 、Java8 、 Version 0.2.1.RELEASE

gigaZhang commented 5 years ago

CentOS7 Java8 0.9.0.RELEASE

gigaZhang commented 5 years ago

ribbon: ReadTimeout: 3000 ConnectTimeout: 3000 nacos: enabled: true eager-load: enabled: true NFLoadBalancerRuleClassName: com.netflix.loadbalancer.AvailabilityFilteringRule NIWSServerListClassName: com.netflix.niws.loadbalancer.DiscoveryEnabledNIWSServerList MaxAutoRetries: 1 MaxAutoRetriesNextServer: 2 OkToRetryOnAllOperations: true ServerListRefreshInterval: 50

fangjian0423 commented 5 years ago

Did you use Spring Cloud Config ?

gigaZhang commented 5 years ago

no use

fangjian0423 commented 5 years ago

could you pls provide a project that reproduces the issue?