Spring Cloud Gray 采坑记录

实例状态问题

若实例添加为灰度实例,并且Gray StatusCLOSEInstance StatusDOWN,那么会报:

1
java.lang.RuntimeException: com.netflix.client.ClientException: Load balancer does not have available server for client

解决方法:将实例的Instance StatusUP,注意状态生效的时长为1min

若需要支持DOWN状态也能正常转发,则gray-server需要配置

1
2
3
4
gray:
server:
instance:
normalInstanceStatus: STARTING,UP,DOWN
  • 正常的实例状态,默认为STARTING, UP
  • 实例状态分别是STARTING, UP, OUT_OF_SERVICE, DOWN, UNKNOWN

参考:https://github.com/SpringCloud/spring-cloud-gray/blob/master/doc/guide/gray-server-properties.md

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2021 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :