title: Unable to connect to Command Metric Stream in Spring Cloud + Hystrix + Turbine - MIME type ("text/plain") that is not "text/event-stream"
body: <p>I already went through the link: <a href="https://stackoverflow.com/questions/49792290/unable-to-connect-to-command-metric-stream-for-hystrix-dashboard-with-spring-clo">Unable to connect to Command Metric Stream for Hystrix Dashboard with Spring Cloud</a> and tried few options, but nothing worked out for yet.
  I am developing <strong>Spring Cloud Code + Hystrix + Turbine</strong>.</p>
  
  <p>Could you please let me know what is the issue ? I am using Spring Boot <code>v2.0.4.RELEASE</code>.</p>
  
  <p><a href="https://i.stack.imgur.com/cyfZb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cyfZb.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/OgZUc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OgZUc.png" alt="enter image description here"></a></p>
  
  <p><strong>HystrixDashboardApplication.java</strong></p>
  
  <pre><code>@EnableTurbine
  @EnableHystrixDashboard
  @SpringBootApplication
  public class HystrixDashboardApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(HystrixDashboardApplication.class, args);
      }
  }
  </code></pre>
  
  <p><strong>pom.xml</strong></p>
  
  <pre><code>&lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.0.4.RELEASE&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
          &lt;spring-cloud.version&gt;Finchley.SR1&lt;/spring-cloud.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter-netflix-hystrix-dashboard&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter-netflix-turbine&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-cloud-dependencies&lt;/artifactId&gt;
                  &lt;version&gt;${spring-cloud.version}&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
  </code></pre>
  
  <p><code>tollrate-billboard</code> application has the following code
  <strong>TollrateBillboardApplication.java</strong></p>
  
  <pre><code>@EnableCircuitBreaker
  @SpringBootApplication
  @EnableEurekaClient
  public class TollrateBillboardApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(TollrateBillboardApplication.class, args);
      }
  }
  </code></pre>
  
  <p><strong>DashboardController.java</strong></p>
  
  <pre><code>@Controller
  public class DashboardController {
  
      @LoadBalanced
      @Bean
      public RestTemplate restTemplate(RestTemplateBuilder builder) {
          return builder.build();
      }
  
      @Autowired
      private RestTemplate restTemplate;
  
      @HystrixCommand(fallbackMethod = "getTollRateBackup")
      @RequestMapping("/dashboard")
      public String GetTollRate(@RequestParam int stationId, Model m) {
  
          TollRate tr = restTemplate.getForObject("http://pluralsight-toll-service/tollrate/" + stationId, TollRate.class);
          System.out.println("stationId: " + stationId);
          m.addAttribute("rate", tr.getCurrentRate());
          return "dashboard";
      }
  
      public String getTollRateBackup(@RequestParam int stationId, Model m) { 
          System.out.println("Fallback operation called");
          m.addAttribute("rate", "1.00");
          return "dashboard";
      }
  }
  </code></pre>
  
  <p><strong>bootstrap.properties</strong></p>
  
  <pre><code>spring.application.name=pluralsight-tollrate-billboard
  </code></pre>
  
  <p><strong>application.properties</strong></p>
  
  <pre><code>server.port=8082
  # eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka/
  eureka.client.register-with-eureka=true
  eureka.client.fetch-registry=true
  
  #http://cloud.spring.io/spring-cloud-static/Finchley.RELEASE/single/spring-cloud.html#_environment_changes
  management.endpoints.web.exposure.include=hystrix.stream
  </code></pre>
  
  <p><strong>CURL Command Result:</strong></p>
  
  <pre><code>curl "http://localhost:8085/clusters"
  </code></pre>
  
  <p><strong>output</strong></p>
  
  <pre><code>[
      {
          "name": "PLURALSIGHT-FASTPASS-CONSOLE",
          "link": "http://localhost:8085/turbine.stream?cluster=PLURALSIGHT-FASTPASS-CONSOLE"
      },
      {
          "name": "PLURALSIGHT-TOLLRATE-BILLBOARD",
          "link": "http://localhost:8085/turbine.stream?cluster=PLURALSIGHT-TOLLRATE-BILLBOARD"
      }
  ]
  </code></pre>
  
  <p><strong>EDIT-1::</strong>, I am using "hystrix-turbine"</p>
  
  <pre><code>@EnableTurbineStream
  @SpringBootApplication
  public class HystrixTurbineApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(HystrixTurbineApplication.class, args);
      }
  }
  </code></pre>
  
  <p>Now, I'm getting below error:</p>
  
  <pre><code>2018-09-03 22:23:45.808  WARN 2820 --- [nio-8085-exec-5] ashboardConfiguration$ProxyStreamServlet : Failed opening connection to http://localhost:8085/turbine.stream?cluster=PLURALSIGHT-FASTPASS-CONSOLE : 404 : HTTP/1.1 404 
  2018-09-03 22:23:45.808  WARN 2820 --- [nio-8085-exec-2] ashboardConfiguration$ProxyStreamServlet : Failed opening connection to http://localhost:8085/turbine.stream?cluster=PLURALSIGHT-FASTPASS-CONSOLE : 404 : HTTP/1.1 404 
  </code></pre>