1

我的带有@EnableTurbine 配置的微服务:

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

bestallning 是一个@SpringCloudApplication, hystrix.stream 已启用。它在 eureka 中注册,并且涡轮应用程序可以找到它。但它的 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?

4

1 回答 1

3

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

于 2016-04-07T15:07:11.757 回答