1

I am new to microservices and just trying to create two microservices and register them to eureka. I am getting the below exception :

"com.netflix.client.ClientException: Load balancer does not have available server for client: forex-service".  Below is my configuration.

The eureka naming server class :

@SpringBootApplication @EnableEurekaServer public class MicroserviceEurekaNamingServerApplication {}

application.properties

spring.application.name=netflix-eureka-naming-server server.port=8761 eureka.client.register-with-eureka=false eureka.client.fetch-registry=false

Forex Service class:

@SpringBootApplication @EnableDiscoveryClient @EnableEurekaClient public class Forex2Microservice2Application {}

application.properties

spring.application.name=forex-service spring.jpa.show-sql=true spring.h2.console.enabled=true eureka.client.service-url.default-zone=http://localhost:8761/eureka

Currency Service class:

@SpringBootApplication @EnableFeignClients @EnableDiscoveryClient @EnableEurekaClient public class SpringBootMicroserviceCurrencyConversionApplication {}

application.properties

spring.application.name=currency-conversion-service server.port=8100 eureka.client.service-url.default-zone=http://localhost:8761/eureka

Feign Client

@FeignClient(name = "forex-service") @RibbonClient(name = "forex-service") public interface CurrencyExchangeServiceProxy {}

Thanks in advance.

New Bee
  • 1,007
  • 4
  • 18
  • 34

0 Answers0