hystrix.stream、management.port 和 Spring 云涡轮机
hystrix.stream, management.port and Spring Cloud Turbine
我的带有@EnableTurbine 配置的微服务:
turbine:
clusterNameExpression: new String('default')
appConfig: bestallning
bestallning是一个@SpringCloudApplication,hystrix.stream启用。它在尤里卡注册,涡轮应用程序可以找到它。但它已将 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?
我认为您必须自己编写 InstanceDiscovery
(并创建该类型的 @Bean
)。尽管在现有实现中可能是一个有用的功能,所以请在 Spring Cloud Netflix 中打开一个问题。
我的带有@EnableTurbine 配置的微服务:
turbine:
clusterNameExpression: new String('default')
appConfig: bestallning
bestallning是一个@SpringCloudApplication,hystrix.stream启用。它在尤里卡注册,涡轮应用程序可以找到它。但它已将 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?
我认为您必须自己编写 InstanceDiscovery
(并创建该类型的 @Bean
)。尽管在现有实现中可能是一个有用的功能,所以请在 Spring Cloud Netflix 中打开一个问题。