I am making an application using Spring Boot 2.3.12, Java 11 and Spring Cloud Hoxton.SR11. I added Eureka and Hystrix services. When I call 'http://localhost:8080/actuator/hystrix.stream' I get a stream of messages like data: {"type": "ping"}
.
But when I insert this path into 'http://localhost:9195/hystrix/' I get an error message 'Unable to connect to Command Metric Stream.' and WARN-log 'Origin parameter: http://localhost:8080/actuator/hystrix.stream is not in the allowed list of proxy host names. If it should be allowed add it to hystrix.dashboard.proxyStreamAllowList'.
I added this to gateway properties.yaml:
management:
endpoints:
web:
exposure:
include: hystrix.stream, info, health
hystrix:
dashboard:
proxy-stream-allow-list: "*"
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 10000
Additional info:
- I added
spring-boot-starter-actuator
to pom.xml of gateway-service. I also addedspring-cloud-starter-circuitbreaker-reactor-resilience4j
. - IntelliJ IDEA marked
proxy-stream-allow-list
andtimeoutInMilliseconds
as 'Cannot resolve configuration property' - These links didn't help: Unable to connect to Command Metric Stream in hystrix dashboard, Unable to connect to Command Metric Stream for Hystrix Dashboard with Spring Cloud, Hystrix: Unable to connect to Command Metric Stream, Hystrix Dashboard Issue in Spring Boot, Unable to connect to Command Metric Stream. in Hystrix Dashboard issue.
UPDATE 2:
I use Hystrix Dashboard as separate new Java module. This module contains application.properties:
server.port=9195
And main class:
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
@SpringBootApplication
@EnableHystrixDashboard
public class HystrixDashboardApplication {
public static void main(String[] args) {
SpringApplication.run(HystrixDashboardApplication.class, args);
}
}