弹簧涡轮仪表板不工作
问题描述:
我在涡轮仪表板上工作时遇到了一些问题。由于我能够为给定的集群获取涡轮流,但无法在仪表板上看到任何东西,因为它正在加载,如下面的屏幕截图所示。如果缺少任何配置,请提供帮助。弹簧涡轮仪表板不工作
下面是我的配置:
config.properties
turbine.aggregator.clusterConfig=SpringHystrixDemo2
turbine.instanceUrlSuffix=:9080/hystrix.stream
turbine.EurekaInstanceDiscovery.hystrix2.instances=localhost
InstanceDiscovery.impl=com.netflix.turbine.discovery.EurekaInstanceDiscovery.class
turbine.InstanceMonitor.eventStream.skipLineLogic.enabled=false
Application.yml
server:
port: 8080
turbine:
aggregator:
clusterConfig: SPRINGHYSTRIXDEMO2
clusterNameExpression: new String("default")
appConfig: SpringHystrixDemo2
InstanceMonitor:
eventStream:
skipLineLogic:
enabled: false
bootstrap.yml
spring:
application:
name: SpringTurbine
cloud:
config:
discovery:
enabled: true
eureka:
instance:
nonSecurePort: ${server.port:8080}
client:
serviceUrl:
defaultZone: http://${eureka.host:localhost}:${eureka.port:8761}/eureka/
Application.java
@SpringBootApplication
@EnableHystrix
@EnableEurekaClient
@EnableHystrixDashboard
@EnableTurbine
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
对于集群SpringHystrixDemo2我已在不同的应用程序被配置它的其他端口上运行:
application.yml -
server:
port: 9080
hystrix:
command:
RemoteMessageClientCommand:
execution:
isolation:
thread:
timeoutInMilliseconds: 5000
RemoteMessageAnnotationClient:
execution:
isolation:
thread:
timeoutInMilliseconds: 5000
bootstrap.yml
spring:
application:
name: SpringHystrixDemo2
cloud:
config:
enabled: true
discovery:
enabled: true
serviceId: SPRINGCONFIGSERVER
eureka:
instance:
nonSecurePort: ${server.port:9080}
client:
serviceUrl:
defaultZone: http://${eureka.host:localhost}:${eureka.port:8761}/eureka/
Application.java - 这是来自hystrix仪表板服务。
@SpringBootApplication
@EnableHystrix
@EnableHystrixDashboard
@EnableEurekaClient
@EnableDiscoveryClient
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
我在8761端口上配置了eureka服务器。这是lisening所有其他尤里卡client.as
这就是我现在无法看到任何涡轮仪表板。因为它正在被加载。 是我脑海turbine stream view
答
的第一件事是,你可以声明一个管理端点是这样的:
management:
port: 9081
contextPath: /management
然后透平流将通过{yourHost}是入店:9081 /管理/涡轮机。流,而红椎仪表盘将在{} yourhost送达:9080 /椎
答
从我读过的和已知的,从配置
turbine.aggregator.clusterConfig=SpringHystrixDemo2
turbine.instanceUrlSuffix=:9080/hystrix.stream
turbine.EurekaInstanceDiscovery.hystrix2.instances=localhost InstanceDiscovery.impl=com.netflix.turbine.discovery.EurekaInstanceDiscovery.class
turbine.InstanceMonitor.eventStream.skipLineLogic.enabled=false
以下可能是问题。
你缺少一些配置,也许你还有一些额外的配置。
- 除非确实有多个实例,否则不需要“turbine.EurekaInstanceDiscovery.hystrix2.instances”。
- 您不需要“turbine.InstanceMonitor.eventStream.skipLineLogic.enabled”,因为它默认为false,如果您希望在具有高延迟的情况下使其成为true,则它是必需的。
- 你需要“turbine.appConfig =”。在你的情况下,我认为它的东西像SpringHystrixDemo2或者也许hystrix2 ...在这里使用适当的名称。
- 你需要“turbine.aggregator.clusterConfig =”这工作对我来说,只有当我在资本即HYSTRIX2
- 使用,如果你在你的服务,“turbine.instanceUrlSuffix.HYSTRIX2 =使用不同的管理端口:/锥。流
- 那么这个“turbine.instanceInsertPort =假”将被禁用涡轮默认端口插入..基本上,你告诉尤里卡不要试图寻找hystrix.strem当插入它自己的任何端口..
以下是我的物业
#turbine.clusterNameExpression=new String('default')
#turbine.clusterNameExpression="'default'"
turbine.instanceInsertPort=false
turbine.appConfig=service1
turbine.aggregator.clusterConfig=SERVICE1
turbine.instanceUrlSuffix.SERVICE1=:51512/hystrix.stream
#turbine.ConfigPropertyBasedDiscovery.USER.instances=service1-host1.abc.com,service1-host2.abc.com
InstanceDiscovery.impl=com.netflix.turbine.discovery.EurekaInstanceDiscovery.class
#for high latencies
#turbine.InstanceMonitor.eventStream.skipLineLogic.enabled=false
并试用涡轮机流
http://host:port/turbine.stream?cluster=SERVICE1