hystrix.stream,management.port和Spring Cloud Turbine

时间:2016-04-07 13:43:28

标签: spring-boot spring-cloud hystrix turbine spring-cloud-netflix

我使用@EnableTurbine配置的微服务:

turbine:
  clusterNameExpression: new String('default')
  appConfig: bestallning

bestallning是@SpringCloudApplication,启用了hystrix.stream。它在eureka注册,涡轮机app可以找到它。但它的management.port设置为8092,server.port为8082.hystrix.stream绑定到management.port

Turbine现在尝试从bestallning的server.port获取hystrix.stream,而不是hystrix.stream绑定的management.port。

   Fetching instance list for apps: [bestallning]
   Fetching instances for app: bestallning
   Received instance list for app: bestallning, size=1
   Retrieved hosts from InstanceDiscovery: 1
   Found hosts that have been previously terminated: 0
   Hosts up:1, hosts down: 0
   Url for host: http://143.237.21.196:8082/hystrix.stream default
   Could not initiate connection to host, giving up: [{"timestamp":1460035761979,"status":404,"error":"Not Found","message":"No message available","path":"/hystrix.stream"}]
   Stopping InstanceMonitor for: 143.237.21.196 default

是否可以使用正确的端口让涡轮机查找hystrix.stream?

1 个答案:

答案 0 :(得分:3)

我认为您必须编写自己的InstanceDiscovery(并创建该类型的@Bean)。现在可能是现有实现中的一个有用功能,所以请在Spring Cloud Netflix中打开一个问题。