1

While trying to upgrade from Spring boot 2.0.3 to 2.5.4, there's an issue with the RibbonLoadBalancerClient class from the spring-cloud-netflix-ribbon dependency which implements the ServiceInstanceChooser interface from spring-cloud-commons-3.0.3.jar.

What is the right version of the spring-cloud-netflix-ribbon to use with this configuration? I dont see 3.0.3 version of the netflix depndencies available.

enter image description here

I'm getting above exception while running the app due to conflict of the dependencies.

Dependencies after the upgrade.

Dependency Version
Srping Cloud 2020.0.3
Spring Boot 2.5.4
netflix-ribbon 2.2.9.RELEASE
netflix-zuul 2.2.9.RELEASE
netflix-core 2.2.9.RELEASE
netflix-eureka-client 3.0.3
Spring Cloud Commons 3.0.3

Dependencies before the upgrade.

Dependency Version
Srping Cloud Finchley.M9
Spring Boot 2.0.3.RELEASE
netflix-ribbon 2.0.0.M8
netflix-zuul 2.0.0.M8
netflix-core 2.0.0.M8
netflix-eureka-client 2.0.0.M8

I see below issue reported on github, but the right versions of dependencies were not mentioned.

https://github.com/seata/seata/issues/3492

EDIT

After disabling the ribbon loadbalancer using spring.cloud.loadbalancer.ribbon.enabled: false in application.yaml rest api Calls are working for

NIWSServerListClassName: 
com.netflix.niws.loadbalancer.DiscoveryEnabledNIWSServerList
    ServerListRefreshInterval: 1000

But not working for

NIWSServerListClassName: 

com.netflix.loadbalancer.ConfigurationBasedServerList
    listOfServers: gateway-servicelist.com:443

Is there any limitation on the type of NIWSServerListClassName that can be used with Spring Cloud Loadbalancer.

Nayeem
  • 681
  • 15
  • 35
  • 4
    Spring Cloud 2020.0.x removed support for ribbon. You need to upgrade to spring cloud loadbalancer. – spencergibb Oct 20 '21 at 20:30
  • Is Feign client/Resttemplate supported with Spring Cloud 2020.0.x for making rest calls? – Nayeem Oct 20 '21 at 20:52
  • 2
    It is, but with Spring Cloud LoadBalancer used for load-balancing requests and not Ribbon. – OlgaMaciaszek Oct 21 '21 at 14:54
  • @OlgaMaciaszek Is there any limitation on the type of NIWSServerListClassName that can be used with Spring Cloud Loadbalancer? Works with DiscoveryEnabledNIWSServerList but not with ConfigurationBasedServerList. – Nayeem Oct 21 '21 at 17:38
  • 1
    Those are from ribbon and therefore not supported anymore – spencergibb Oct 23 '21 at 14:27
  • 1
    Is there any reference documentation for Spring Cloud Loadbalancer? I can't find except for blog posts showing usage examples. I would like to read about all available parameters of Spring Cloud Loadbalancer. – Krzysztof Tomaszewski Apr 09 '22 at 10:22
  • You can take a look at these https://www.baeldung.com/spring-cloud-load-balancer https://piotrminkowski.com/2020/05/13/a-deep-dive-into-spring-cloud-load-balancer/ – Nayeem Apr 17 '22 at 20:42

0 Answers0