Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to configure hystrix dashboard #1526

Open
bsushant-athena opened this issue Apr 5, 2017 · 14 comments
Open

Unable to configure hystrix dashboard #1526

bsushant-athena opened this issue Apr 5, 2017 · 14 comments

Comments

@bsushant-athena
Copy link

Hi,

I am new to Hystrix and trying to configure Hystrix dashboard for an application that i am developing. I had gone thru the documentation that is available in GitHub Wiki and was able to configure the application properly in my local environment. When i hit hystrix stream url "http://hostname:port/application/hystrix.stream", it is returning me the JSON data. But if i use the same URL in Hystrix Dashboard, it is not displaying any data in the dashboard.

I traced the request and found that the below link is not returning any response and getting failed.

Error message:

EventSource's response has a MIME type ("text/plain") that is not "text/event-stream". Aborting the connection.
Connection was closed on error: [object Event]

I tried searching in internet for this issue but was not able to find any solution. In addition to this problem, when hystrix dashboard is not able to establish the connection.
Can you please help me with the problems described above? Thanks.

-Sushant

@bsushant-athena
Copy link
Author

bsushant-athena commented Apr 5, 2017

Code:
@SpringBootApplication
@EnableSwagger2
@EnableHystrixDashboard
@EnableHystrix
public class Boot implements CommandLineRunner {

 @Override
 public void run(String... arg0) throws Exception {
 if (arg0.length > 0 && arg0[0].equals("exitcode")) {
 throw new ExitException();
 }
 }

 public static void main(String[] args) throws Exception {
 Map<String,String> pars = MultipleBoot.parseArgs(args);

 SpringApplication springApplication = new SpringApplication(Boot.class);
 springApplication.addListeners(new MultipleBoot.BootstrapConfigProviderListener(pars));
 springApplication.run(args);
 }

 class ExitException extends RuntimeException implements ExitCodeGenerator {
 private static final long serialVersionUID = 1L;

 @Override
 public int getExitCode() {
 return 10;
 }

 }


}

@bsushant-athena
Copy link
Author

Dependies:

org.springframework.cloud

spring-cloud-starter-parent

Angel.SR6



 org.springframework.cloud
 spring-cloud-starter-eureka-server
 
 
 org.springframework.boot
 spring-boot-starter-logging
 
 
 
 
 org.springframework.cloud
 spring-cloud-starter-zuul
 
 
 org.springframework.boot
 spring-boot-starter-logging
 
 
 

 org.springframework.cloud
 spring-cloud-starter-hystrix-dashboard


 org.springframework.boot
 spring-boot-starter-actuator


 org.springframework.cloud
 spring-cloud-starter-hystrix


@mattrjacobs
Copy link
Contributor

Can you look at your the Network tab in your Javascript devtools and find out what call is getting made by your dashboard web application?

@bsushant-athena
Copy link
Author

Request URL:http://localhost:18888/proxy.stream?origin=http%3A%2F%2Flocalhost%3A18888%2Fpublic%2Fhystrix.stream
Request Method:GET
Status Code:200 OK
Remote Address:[::1]:18888
Referrer Policy:no-referrer-when-downgrade

@mattrjacobs
Copy link
Contributor

mattrjacobs commented Apr 14, 2017

OK, what happens when you follow the link from Request URL?

When I run the dashboard locally against some cloud instance, I see the URL:
http://localhost:7979/hystrix-dashboard/proxy.stream?origin=`cloud Hystrix metrics stream`

Hitting that URL gives me back an SSE stream, and my dashboard works correctly

@bsushant-athena
Copy link
Author

when I followed the link from Request URL , I get a blank page.

@mattrjacobs
Copy link
Contributor

OK, then that's your problem. You mentioned previously that you can hit a standalone SSE metrics stream. That URL should be the same one that your dashboard is using.

@mrumpf
Copy link

mrumpf commented Sep 26, 2017

This might be related: #68
We are seeing this issue occasionally, which means one request works and the other one not. So the idea is that the Apache load-balancing proxy has a configuration issue on one node whereas the other seems to be correctly configured. Depending on which load-balancer you hit the sream gets interrupted or not.

@kevinojt
Copy link

kevinojt commented Apr 28, 2018

I have the same issue running https://github.com/sqshq/PiggyMetrics.
It works fine when calling turbine stream alone.

curl -v http://10.20.1.169:8989
* Rebuilt URL to: http://10.20.1.169:8989/
*   Trying 10.20.1.169...
* TCP_NODELAY set
* Connected to 10.20.1.169 (10.20.1.169) port 8989 (#0)
> GET / HTTP/1.1
> Host: 10.20.1.169:8989
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: text/event-stream
< Transfer-Encoding: chunked

But when I put the url in Hystrix Dashboard is gets wrong.

Console output

Stream: http%3A%2F%2F10.20.1.169%3A8989%2Fturbine.stream
monitor?stream=http%3A%2F%2F10.20.1.169%3A8989%2Fturbine.stream&delay=2000&title=hello:108 Command Stream: /proxy.stream?origin=http%3A%2F%2F10.20.1.169%3A8989%2Fturbine.stream&delay=2000
monitor?stream=http%3A%2F%2F10.20.1.169%3A8989%2Fturbine.stream&delay=2000&title=hello:1 EventSource's response has a MIME type ("text/plain") that is not "text/event-stream". Aborting the connection.
monitor?stream=http%3A%2F%2F10.20.1.169%3A8989%2Fturbine.stream&delay=2000&title=hello:136 Connection was closed on error: {"isTrusted":true}
monitor?stream=http%3A%2F%2F10.20.1.169%3A8989%2Fturbine.stream&delay=2000&title=hello:1 EventSource's response has a MIME type ("text/plain") that is not "text/event-stream". Aborting the connection.
monitor?stream=http%3A%2F%2F10.20.1.169%3A8989%2Fturbine.stream&delay=2000&title=hello:173 Connection was closed on error: [object Event]

The response headers missing 'Content-Type: text/event-stream'. So the EventSource treat it as 'text/plain'

Content-Length: 0
Date: Sat, 28 Apr 2018 03:58:58 GMT
Server: Apache-Coyote/1.1
X-Application-Context: monitoring

@IgorRamosBR
Copy link

I'm with the same issue. Any solution?

@javaHelper
Copy link

Any resolution to this issue ?

@javaHelper
Copy link

@rk1023
Copy link

rk1023 commented Aug 9, 2020

HystrixDashBoardError

Hystrix dashboard is not able to load data as shown in the attachment.
Any Solution ?

@pcdubaipc
Copy link

Still get same issue, anyone correct it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants