Zuul ServiceId route is not working on CloudFoundry

16 views Asked by At

I am unable to call to microservices using zuul serviceId .

getting below error on cloudfoundry for zuul gateway.

"2024-01-31 11:52:29.285 ERROR 496 --- [ Thread-14] com.netflix.discovery.DiscoveryClient : DiscoveryClient_XYZ-ZUUL/XYZ-zuul:2ecdce4ee6ba542f777055b83ec2ac14 - de-registration failedCannot execute request on any known server "

Below are the routes details on bootstrap-system.yml file #Zuul gateway routes zuul: debug.request: true ignoreSecurityHeaders: false sensitiveHeaders: Content-Security-Policy, X-Content-Security-Policy, X-WebKit-CSP routes: # these two routes handled by zuul gateway itself; see controller classes gatewayLogout: path: /gatewaylogout url: "forward:" userExperience: path: /useraccesscheck url: "forward:" # sample route for zuulHost/xps/api to backend api on localhost actuator: path: /actuator/** url: "forward:/actuator" XYZ-api: path: /abc/XYZ/api/** serviceId: XYZ-API XYZ-ui: path: /abc/XYZ/** url: http://XYZ-ui.apps.system.pcf.test.com/abc/XYZ/

This serviceId: XYZ-API ( Eureka Service registry ) is used to run our services in multiple instance

Instead of serviceId if I replaced with url it's working fine but it will run only single instance

 XYZ-api:
  path: /abc/XYZ/api/**
  url: https://XYZ-api.apps.system.pcf.test.com/

Any suggestion will be appreciated.

0

There are 0 answers