Zuul not forwarding requests to other micro-services

General Tech Bugs & Fixes 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I am using spring boot micro-services. I have configured eureka, zuul proxy and another microservice(account). If I am calling from account directly it is working fine. account and zuul server both showing on eureka.

When I try to hit using zuul proxy it is getting status code 200OK but not getting any result

Below is my configuration for zuul

Zuul.yml

server:
  port: 8076
eureka:
  client:
    registerWithEureka: true
    fetchRegistry: true
    serviceUrl:
      defaultZone: http://localhost:8078/eureka/
  instance:
    hostname: localhost
    health-check-url-path: /actuator/health
    status-page-url-path: /actuator/info
logging:
  level:
    com.netflix.discovery: 'ON'
    org.springframework.cloud: DEBUG
zuul:
  ignoredServices: '*'
  routes:
    account:
      serviceId: ACCOUNT
      url: http://192.168.0.62:8081/
      stripPrefix: false
      predicate:
      - Path=/accounts/**
  debug:
    requests: true
management:
  security:
    enabled: false
  endpoints:
    web:
      exposure:
        include: '*'

Console log so far

route matched=ZuulRoute{id='account', path='/account/**', serviceId='ACCOUNT', url='http://192.168.0.62:8081/', stripPrefix=false, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=false, } --------------------------- Mapped to org.springframework.cloud.netflix.zuul.web.ZuulController@7bb67520

log of actuator/env

"zuul.ignoredServices": {
"value": "*"
},
"zuul.routes.account.serviceId": {
"value": "ACCOUNT"
},
"zuul.routes.account.url": {
"value": "http://192.168.0.62:8081/"
},
"zuul.routes.account.stripPrefix": {
"value": false
},
"zuul.routes.account.predicate[0]": {
"value": "Path=/accounts/**"
},
"zuul.debug.requests": {
"value": true
},
"management.security.enabled": {
"value": false
},
"management.endpoints.web.exposure.include": {
"value": "*"
}

I am unable to get anything from here if something is mising, Kindly check and do let me know. any help will be useful

thanks.

If needed more info let me know.

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.