spring-cloud / spring-cloud-netflix

Integration with Netflix OSS components
http://cloud.spring.io/spring-cloud-netflix/
Apache License 2.0
4.87k stars 2.44k forks source link

Zuul Exception: Use instance of closed #2194

Closed kenttanl closed 7 years ago

kenttanl commented 7 years ago

In https://github.com/spring-cloud/spring-cloud-netflix/issues/2179, 'WCMIS208' instance is closed, but Eureka is in "self-preservation mode", so it was not removed, but now, occasionally there will be such an exception:

...
org.apache.http.conn.HttpHostConnectException: Connect to WCMIS208:10015 [WCMIS208/10.16.72.21] failed: Connection refused
...

I think Zuul should skip instance of has been closed , or try again that until the encounter the healthy instance,so , Is there such the function? thank you

ryanjbaxter commented 7 years ago

I stil dont know what you mean by "closed". Zuul can be configured to retry failed requests http://cloud.spring.io/spring-cloud-static/Dalston.SR2/#retrying-failed-requests

kenttanl commented 7 years ago

Sorry my English, "closed" that mean is "stopped". I will try to do it like this, and now I restarted the gateway, that to solved this problem.

I will try to add the config:

client.ribbon.MaxAutoRetries
clientName.ribbon.retryableStatusCodes

to see if will encounter this problem again.

Thank you very much, and sorry my English again

ryanjbaxter commented 7 years ago

No problem :)