我建议您检查以下配置步骤:
1) Hystrix 仪表板中的流 URL 应该是:
http://localhost:{turbine app port}/turbine.stream?cluster={configured cluster in properties file}
该 url 应指向具有以下功能的应用程序的端口@EnableTurbine
您的主类中的注释。
2) 检查您是否收到以下回复:
http://localhost:{client app port}/actuator/hystrix.stream
(使用您的浏览器)(这应该来自您已启用 hystrix 的应用程序@EnableCircuitBreaker
)
如果您收到 ping,那么至少您的 hystrix 流是可以访问的。如果没有,请检查您是否有:org.springframework.boot:spring-boot-starter-actuator
在你的客户端依赖项和
确保您在应用程序的 application.properties 文件中设置了以下属性@EnableCircuitBreaker
在主类中:
management.endpoints.web.exposure.include= hystrix.stream, info, health
再次检查网址。
3)一旦您收到回复hystrix.stream
,您现在可以在涡轮机应用程序属性文件上配置集群:
turbine:
appConfig: {serviceId in lower case}
aggregator:
clusterConfig: {above serviceId in upper case}
运行应用程序后,检查您是否已正确配置集群:
http://localhost:{turbine app port}/clusters
你不应该得到“[]
如果一切顺利的话,在您的浏览器上显示“。
一旦您在集群端点上看到响应,当您将其指向涡轮机应用程序时,您现在就可以在仪表板上看到详细信息