Spring-cloud-netflix: Zuul Retry not working for 401 response in spring boot

Created on 31 Jul 2017  路  7Comments  路  Source: spring-cloud/spring-cloud-netflix

hi @ryanjbaxter I have a problem with zuul. I am using Zuul with Spring boot and my front end is angular. My intention now is to retry whenever I get a 401 response and this is not happening. I have tried the following

ribbon.eureka.enabled=false
zuul.retryable=true
spring.cloud.loadbalancer.retry.enabled=true
ribbon.OkToRetryOnAllOperations=true
ribbon.MaxAutoRetries=3
ribbon.MaxAutoRetriesNextServer=3

but they r not workin....Pls do help and thanks in advance

Most helpful comment

I had similar problem. Did you included spring-retry dependency. I also had to include hystrix and increase the hystrix timeout.

All 7 comments

Have you tried specifying specific response codes to retry? http://cloud.spring.io/spring-cloud-static/Dalston.SR2/#_configuration

Yes I have tired that too
ribbon.retryableStatusCodes=401

How do I find my clientName

clientName = serviceId

I am a beginner to zuul ... I am using localhost...this is my url..http://localhost:8887/#!/gameSinglePlayer...so how will I find the server id or what is the server id...I read ur posts in many issues but could not figure that out..thanks in advance

The serviceId is the the ID the service registers with (via service discovery ie Eureka). Doesn't look like you are using Eureka since you are setting ribbon.eureka.enabled=false. What does your Zuul configuration look like? Can you perhaps provide a sample?

I had similar problem. Did you included spring-retry dependency. I also had to include hystrix and increase the hystrix timeout.

This module has entered maintenance mode. This means that the Spring Cloud team will no longer be adding new features to the module. We will fix blocker bugs and security issues, and we will also consider and review small pull requests from the community.

Was this page helpful?
0 / 5 - 0 ratings