'Hystrix Dashboard keeps loading in Spring boot Microservices

Hystrix dashboard keeps loading as in below image,I have no idea why this is happening.

enter image description here

Hystrix stream works fine as in below image,

enter image description here

Cloud API Gateway Code

This is pom.xml of Cloud API Gateway

<properties>
        <java.version>1.8</java.version>
        <spring-cloud.version>2021.0.2</spring-cloud.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
            <version>2.2.10.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-circuitbreaker-reactor-resilience4j</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-gateway</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>

This is Main Application of Cloud API Gateway

@EnableEurekaClient
@EnableHystrix
public class CloudApiGatewayApplication {

    public static void main(String[] args) {
        SpringApplication.run(CloudApiGatewayApplication.class, args);
    }

}

This is FallBack Controller of Cloud API Gateway

@RestController
public class FallBackMethodController {

    @PostMapping("/userServiceFallBack")
    public String userServiceFallBackMethod(){
        return "User Service is taking longer than Expected."+" Please try again later.";
    }
}

This is application.yml of Cloud API Gateway

server:
  port: 9191

spring:
  application:
    name: CLOUD-API-GATEWAY
  cloud:
    gateway:
      routes:
        #USER-SERVICE
        - id: USER-SERVICE
          uri: lb://USER-SERVICE
          predicates:
            - Path=/users/**
          filters:
            - name: CircuitBreaker
              args:
                name: USER-SERVICE
                fallbackuri: forward:/userServiceFallBack

hystrix:
  command:
    fallbackcmd:
      execution:
        isolation:
          thread:
            timeoutInMilliseconds: 4000

management:
  endpoints:
    web:
      exposure:
        include: "*"
      base-path: /actuator

eureka:
  client:
    registerWithEureka: true
    fetchRegistry: true
    service-url:
      defaultzone: http://localhost:8761/eureka/
  instance:
    hostname: localhost

Hystrix Dashboard Code

This is pom.xml of Hystrix Dashboard

<properties>
        <java.version>1.8</java.version>
        <spring-cloud.version>2021.0.2</spring-cloud.version>
    </properties>
    <dependencies>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
            <version>2.2.10.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

This is Main Application of Hystrix Dashboard

@SpringBootApplication
@EnableHystrixDashboard
@EnableEurekaClient
@EnableHystrix
public class HystrixDashboardApplication {

    public static void main(String[] args) {
        SpringApplication.run(HystrixDashboardApplication.class, args);
    }

}

This is application.yml of Hystrix Dashboard

server:
  port: 9295

spring:
  application:
    name: HYSTRIX-DASHBOARD

hystrix:
  dashboard:
    proxy-stream-allow-list: "*"


Solution 1:[1]

From my side was same (endless loading), before I have made a single request to my gateway. Can you try same?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Serhii Zhura