2

Spring boot version : 1.5.7.Release Spring Cloud version : Dalston.SR4

I'm testing zuul server with ribbon and I don't want to Eureka

I have added the following configuration in zuul server.

    #application.properties
    spring.application.name= gateway
    server.port=8089

    eureka.client.enabled=false
    ribbon.eureka.enabled=false

    zuul.ignored-services= "*"
    zuul.routes.sample-service.path=/samples/**
    zuul.routes.sample-service.serviceId=sample-service
    zuul.routes.sample-service.stripPrefix=false
    zuul.routes.sample-service.retryable=true
    zuul.routes.retryable=true
    zuul.retryable=true

    sample-service.ribbon.listOfServers= localhost:8081,localhost:8085
    sample-service.ribbon.eureka.enabled= false
    sample-service.ribbon.ServerListRefreshInterval= 100
    sample-service.ribbon.retryableStatusCodes= 500
    sample-service.ribbon.MaxAutoRetries= 0
    sample-service.ribbon.MaxAutoRetriesNextServer= 1
    sample-service.ribbon.OkToRetryOnAllOperations= true
    sample-service.ribbon.ReadTimeout= 10000
    sample-service.ribbon.ConnectTimeout= 10000
    sample-service.ribbon.EnablePrimeConnections= true
    zuul.ribbon-isolation-strategy=thread

    hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds= 30000

Question

Nomally zuul server is working well, but one of server is shutting down then response returned as following message. What is the debugging point in this case?

    {
        "timestamp": 1510040524144,
        "status": 500,
        "error": "Internal Server Error",
        "exception": "com.netflix.zuul.exception.ZuulException",
        "message": "TIMEOUT"
    }
Tw K
  • 70
  • 2
  • 8
  • Did you add the dependency of `spring-retry` into your pom for Zuul server> – LHCHIN Nov 07 '17 at 09:00
  • @LHCHIN Hi. sure. I have aleady did. org.springframework.retry spring-retry – Tw K Nov 07 '17 at 09:21
  • Try to set the value of hystrix timeout larger than ribbon timeout such as 15000. – LHCHIN Nov 07 '17 at 09:34
  • @LHCHIN I have modified and test but it returned same message. – Tw K Nov 07 '17 at 09:47
  • I have added following code in the application.proerties and It's working.. hystrix.command.sample-service.execution.isolation.thread.timeoutInMilliseconds= 60000 – Tw K Nov 10 '17 at 06:41

1 Answers1

0

I have added following code in application.properties and it's working.

hystrix.command.sample-service.execution.isolation.thread.timeoutInMilliseconds= 60000

Thanks.

Tw K
  • 70
  • 2
  • 8
  • So there are two problems: (1) replace `default` with `sample-service` in your configuration. (2) Enlarge the value. Right? – LHCHIN Nov 10 '17 at 08:02