Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

SpringCloud Feign consumption Eureka service reported an error

Shulou Source: shulou.com Published: 2022-06-03 05:24:55 11月24日 Update

SpringCloud Feign consumption Eureka Service report com.netflix.client.ClientException: Load balancer does not have available server for client: user

With regard to this mistake, I searched a lot on the Internet, and I threw out the problems I encountered.

I put the call to the external system in a child model of client, using packet scanning.

Feign com.netflix.client.ClientException: Load balancer does not have available server for client: user appears

@ SpringBootApplication (exclude = {DataSourceAutoConfiguration.class}) @ ComponentScan (basePackages = "com.XXX") @ Slf4j@Configuration@EnableScheduling@EnableTransactionManagement@EnableEurekaClient@EnableFeignClients (basePackages = "com.XXX.client")

Then change it to this class scanning mode and run and call OK.

@ SpringBootApplication (exclude = {DataSourceAutoConfiguration.class}) @ ComponentScan (basePackages = "com.XXX") @ Slf4j@Configuration@EnableScheduling@EnableTransactionManagement@EnableEurekaClient@EnableFeignClients (basePackageClasses = {com.XXX.client.base.AccountClient.class, com.XXX.client.base.ExchangeOtcClient.class, com.XXX.client.mkt.MktClient.class})

Why is this happening? I haven't figured it out yet. Write it down first.

Tags: Mode service consumption search system error problem operation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft MySQL Xiaomi OPPO Reno Docker