我们正在使用 netflix 涡轮机从集群中获取数据并显示在 hystrix 仪表板上。
我有一个名为PROD的集群,只有一个节点(192.168.33.17),其中 java 应用程序(hystrix)在端口 8989 上运行。
我们有涡轮节点,我们有以下配置:
config.properties 文件:
turbine.aggregator.clusterConfig=PROD
turbine.instanceUrlSuffix.PROD=/hystrix.stream
turbine.ConfigPropertyBasedDiscovery.PROD.instances=192.168.33.17:8989/hystrix-examples-webapp
InstanceDiscovery.impl=com.netflix.turbine.discovery.ConfigPropertyBasedDiscovery
并放置使用 JVM 属性指定的 config.properties 文件,例如 java -Darchaius.configurationSource.additionalUrls=file:///home/vagrant/config.properties -jar start.jar
当我们使用直接访问节点数据时
curl http://192.168.33.17:8989/hystrix-examples-webapp/hystrix.stream
那么响应是正确的,我们可以在仪表板上看到。
但是当我们使用涡轮机做同样的事情时,我们在仪表板上看不到任何响应,尽管我们得到了 ping 响应
curl http://192.168.33.13:8080/turbine/turbine.stream
回复:平
涡轮日志:
2016-08-22 17:40:11 INFO com.netflix.turbine.discovery.InstanceObservable$1:260 [InstanceObservable$1] [run]: Retrieved hosts from InstanceDiscovery: 1
2016-08-22 17:40:11 INFO com.netflix.turbine.discovery.InstanceObservable$1:272 [InstanceObservable$1] [run]: Found hosts that have been previously terminated: 0
2016-08-22 17:40:11 INFO com.netflix.turbine.discovery.InstanceObservable$1:289 [InstanceObservable$1] [run]: Hosts up:1, hosts down: 0
2016-08-22 17:41:11 INFO com.netflix.turbine.discovery.InstanceObservable$1:260 [InstanceObservable$1] [run]: Retrieved hosts from InstanceDiscovery: 1
2016-08-22 17:41:11 INFO com.netflix.turbine.discovery.InstanceObservable$1:272 [InstanceObservable$1] [run]: Found hosts that have been previously terminated: 0
2016-08-22 17:41:11 INFO com.netflix.turbine.discovery.InstanceObservable$1:289 [InstanceObservable$1] [run]: Hosts up:1, hosts down: 0
2016-08-22 17:42:11 INFO com.netflix.turbine.discovery.InstanceObservable$1:260 [InstanceObservable$1] [run]: Retrieved hosts from InstanceDiscovery: 1
2016-08-22 17:42:11 INFO com.netflix.turbine.discovery.InstanceObservable$1:272 [InstanceObservable$1] [run]: Found hosts that have been previously terminated: 0
2016-08-22 17:42:11 INFO com.netflix.turbine.discovery.InstanceObservable$1:289 [InstanceObservable$1] [run]: Hosts up:1, hosts down: 0
2016-08-22 17:43:11 INFO com.netflix.turbine.discovery.InstanceObservable$1:260 [InstanceObservable$1] [run]: Retrieved hosts from InstanceDiscovery: 1
2016-08-22 17:43:11 INFO com.netflix.turbine.discovery.InstanceObservable$1:272 [InstanceObservable$1] [run]: Found hosts that have been previously terminated: 0
2016-08-22 17:43:11 INFO com.netflix.turbine.discovery.InstanceObservable$1:289 [InstanceObservable$1] [run]: Hosts up:1, hosts down: 0
2016-08-22 17:44:11 INFO com.netflix.turbine.discovery.InstanceObservable$1:260 [InstanceObservable$1] [run]: Retrieved hosts from InstanceDiscovery: 1
2016-08-22 17:44:11 INFO com.netflix.turbine.discovery.InstanceObservable$1:272 [InstanceObservable$1] [run]: Found hosts that have been previously terminated: 0
2016-08-22 17:44:11 INFO com.netflix.turbine.discovery.InstanceObservable$1:289 [InstanceObservable$1] [run]: Hosts up:1, hosts down: 0
20
那么,我们是否缺少任何配置?