I have a rest application(cxf based) which internally calls soap web services. I want to integrate hystrix in to my rest application.
1) Modified the below hystrix demo source code with our existing services data and deployed the rest application.
2) I downloaded hystrix-dashboard war file and deployed in to tomcat and I can see the hystrix dashboard home page.
Now when I am trying to monitor the stream by providing the hystrix integrated rest application url.Empty page with hystrix icon is getting displayed. When I look IE developer console, it shows below error
EventSource is not defined.
proxystream variable value = undefined
Note: both are deployed on same machine - localhost
Sorry, am able to view the proxyStream variable. But still error comes as 'EventSource is not defined'
//code snippet from ie developer console
var proxyStream = "../proxy.stream?origin=http://localhost:8080/hystrix/hystrix.stream;
// start the EventSource which will open a streaming connection to the server
var source = new EventSource(proxyStream);
Now am facing a new issue - 'Unable to connect to Command Metric Stream'.
when I hit the http://localhost:8080/hystrix/hystrix.stream url directly, it throws an error
"HTTP Status 503 - MaxConcurrentConnections reached: 5"
How to close the existing opened connections?
@Ahmed-A-Syed : It is happening since you browser is already tried to open connection to Hystrix stream and got error. There is a default limit of max 5 connections, after that you will get 503. (Please see handleRequest from HystrixSampleSseServlet).
Please restart you container to do the same or increase max number of concurrent connection using following property :
hystrix.config.stream.maxConcurrentConnections
To debug this, a good first step is to make sure that the metrics stream is available from the application using Hystrix.
Reboot that app to get it in a clean state, then try to directly curl the metrics stream. If that works, then the dashboard should work as well. Disclaimer: I'm not a front-end developer at all, so any sort of browser-specific issue will be very difficult for me to troubleshoot.
Thanks muktesh..am able to connection to hystrix stream and u are right Jacobs. I tried with a simple app and when i hit hystrix stream app without dashboard in the browser ..it prints
ping:
ping:
ping:
ping:
After that when i accessed the hystrix stream app on hystrix dashboard.. dashboard displays metrics.
Thanks a lot.
Great, thanks for letting us know
I am facing an issue with Hystrix metrics. I have a spring boot app and added actuator and HystrixCommand to my service and @EnableHystrixDashboard @EnableCircuitBreaker but still i am getting 404 http://localhost:8082/hystrix.stream i do see all other metrics of actuator on console but not the /hystrix.stream Any help is appreciated. Thanks a lot!
Most helpful comment
Thanks muktesh..am able to connection to hystrix stream and u are right Jacobs. I tried with a simple app and when i hit hystrix stream app without dashboard in the browser ..it prints
ping:
ping:
ping:
ping:
After that when i accessed the hystrix stream app on hystrix dashboard.. dashboard displays metrics.
Thanks a lot.