I am getting the below error in the spring cloud project
2020-10-31 13:58:53.434 ERROR 17392 --- [ctor-http-nio-1] .a.w.r.e.DefaultErrorWebExceptionHandler :
Failed to handle request [GET http://localhost:9900/customers]
org.springframework.cloud.gateway.support.NotFoundException: Unable to find instance for customers
at org.springframework.cloud.gateway.filter.LoadBalancerClientFilter.filter(LoadBalancerClientFilter.java:73) ~[spring-cloud-gateway-core-2.0.4.BUILD-SNAPSHOT.jar:2.0.4.BUILD-SNAPSHOT]
at org.springframework.cloud.gateway.handler.FilteringWebHandler$GatewayFilterAdapter.filter(FilteringWebHandler.java:135) ~[spring-cloud-gateway-core-2.0.4.BUILD-SNAPSHOT.jar:2.0.4.BUILD-SNAPSHOT]
at org.springframework.cloud.gateway.filter.OrderedGatewayFilter.filter(OrderedGatewayFilter.java:44) ~[spring-cloud-gateway-core-2.0.4.BUILD-SNAPSHOT.jar:2.0.4.BUILD-SNAPSHOT]
at org.springframework.cloud.gateway.handler.FilteringWebHandler$DefaultGatewayFilterChain.lambda$filter$0(FilteringWebHandler.java:117) ~[spring-cloud-gateway-core-2.0.4.BUILD-SNAPSHOT.jar:2.0.4.BUILD-SNAPSHOT]
The client configuration in angular is as follows --
server:
port: 9900
logging:
level:
com.netflix.discovery: 'OFF'
com.netflix.zuul: 'OFF'
eureka:
instance:
leaseRenewalIntervalInSeconds: 10
client:
registryFetchIntervalSeconds: 5
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 60000
ribbon:
ServerListRefreshInterval: 5000
ConnectTimeout: 3000
ReadTimeout: 60000
spring:
cloud:
gateway:
routes:
- id: stores
uri: lb://stores
predicates:
- Path=/stores/**
- id: customers
uri: lb://customers
predicates:
- Path=/customers/**
- id: root
uri: no://op
predicates:
- Path=/
filters:
- RedirectTo=302, /index.html#/customers
management:
endpoints:
web:
exposure:
include: '*'