Hystrix: hystrix-stream shows ping message only and no data.

Created on 27 Nov 2015  Â·  20Comments  Â·  Source: Netflix/Hystrix

In my project, I can see the command is executed from the log but when I access the hystrix-stream, it always show "ping " and no data shown in dashboard. Do I need to explicitly call anything in the application for the metrics?

I configured the Metrics servlet in the web.xml:

  <servlet>
        <description></description>
        <display-name>HystrixMetricsStreamServlet</display-name>
        <servlet-name>HystrixMetricsStreamServlet</servlet-name>
        <servlet-class>com.netflix.hystrix.contrib.metrics.eventstream.HystrixMetricsStreamServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>HystrixMetricsStreamServlet</servlet-name>
        <url-pattern>/hystrix.stream</url-pattern>
    </servlet-mapping>
bug metrics question

Most helpful comment

Hello I have the same problem I see only onli ping: with no data when at this address:
http://localhost:9002/hystrix.stream

I have checked the versions and I have:
com.netflix.hystrix:hystrix-core:1.5.5
com.netflix.hystrix:hystrix-metrics-event-stream:1.5.5
com.netflix.hystrix:hystrix-serialization:1.5.5
and
org.springframework.boot:spring-boot-actuator:1.4.2.RELEASE
org.springframework.cloud:spring-cloud-netflix-core:1.2.0.RELEASE
org.springframework.cloud:spring-cloud-netflix-hystrix-dashboard:1.2.0.RELEASE

I have tried to call the rest API and the Circuit Breaker works but still I can't see any data more then ping:

Any Ideas?

All 20 comments

All of the data structures that get queried by the metrics stream get instantiated by commands getting constructed and executed. Have you executed any commands by the time you're checking the metrics stream?

Yes. I can see my command is actually executed but there is no metrics shown in no matter in the dashboard or call the /hystrix.stream directly. It always shows 'ping...'

I'll try to set up a fresh project with the metrics-stream to make sure the Wiki is still valid. AFAIK, it should be, but I'll report back what I find.

We are seeing the same issue with the latest servlet (showing Ping only). We tried with 1.3.x servlet and the stream is working fine. So the issue is with the latest servlet.

@willpowerforever / @billyy What versions of all hystrix libraries are you using? hystrix-core and hystrix-metrics-event-stream are the most helpful to debug this issue

I just checked with the engineer. hystrix-metrics is 1.4.21, but hystrix-core is 1.4.0-RC1. So I have asked her to try again with a GA version first.

My guess is that's the issue. We're running in production with 1.4.21 and everything seems stable. Please let me know if that resolves the issue

Using the same version 1.4.21 and the problem was resolved. You can close the issue.

@willpowerforever I believe this is the same root cause as you initially reported. Please re-open if you have more questions

spring boot parent version 1.4.0.RELEASE
added spring cloud starters of actuator + hystrix
both hystrix and hystrix dashboard version 1.1.5.RELEASE
/hystrix.stream produces "ping..." with no data
I see this is reported above, what is the fix ?

Hystrix is at 1.5.5, so I think those version numbers are for some Spring artifact. Can you check what hystrix jars you have on your classpath and what versions they have?

Hi,

I am still getting hystrix.stream printing this to web page

ping:
ping:
ping:
while turbine.stream prints out
: ping
data: {"reportingHostsLast10Seconds":0,"name":"meta","type":"meta","timestamp":1477236861758}

: ping
data: {"reportingHostsLast10Seconds":0,"name":"meta","type":"meta","timestamp":1477236864763}

: ping
data: {"reportingHostsLast10Seconds":0,"name":"meta","type":"meta","timestamp":1477236867765}

Here is the gradle dependencies of my project.

dependencies {
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-rest', version: '1.4.1.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '1.4.1.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: '1.4.1.RELEASE'

compile("org.postgresql:postgresql:9.4-1200-jdbc4")

compile group: 'org.hibernate', name: 'hibernate-validator', version: '5.3.0.Final'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '1.4.1.RELEASE'

compile group: 'com.google.code.gson', name: 'gson', version: '2.7'

compile group: 'io.springfox', name:'springfox-swagger2', version:'2.6.0'
compile group: 'io.springfox', name:'springfox-swagger-ui', version:'2.0.2'

compile group: 'joda-time', name:'joda-time', version:'2.1'
compile group: 'com.mangofactory', name: 'swagger-springmvc', version: '1.0.2'  
compile group: 'org.mockito', name: 'mockito-all', version: '1.9.5'

compile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
compile group: 'org.hamcrest', name: 'hamcrest-core', version: '1.3'
compile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'

compile group: 'com.netflix.hystrix', name: 'hystrix-javanica', version: '1.4.21'
compile group: 'com.netflix.hystrix', name: 'hystrix-metrics-event-stream', version:'1.4.21'
compile group: 'com.netflix.hystrix', name: 'hystrix-core', version:'1.4.21'

compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-hystrix-dashboard', version: '1.2.1.RELEASE'
compile group: 'org.springframework.cloud', name: 'spring-cloud-netflix-turbine', version:'1.2.1.RELEASE'

}

The service class looks something like this
@Service
public class XYZServiceImpl implements XYZService {
@Resource
private XYZRepository repository;

@Override
@Transactional
@HystrixCommand(fallbackMethod = "fallbackCreate")
public XYZ create(XYZ xyz) {
    XYZ xyzCreated = repository.save(xyz);
    return xyzCreated;
}
public XYZ fallbackCreate(XYZ xyz) {
    return null;
}

Ping means hystrix metrics servlet is running but you get data when you start making calls through Hystrix. Turbine is an aggregator service the jaon which you have shown is denoting that turbine is running fine. All you need is to make sure your calls are being made with some significant load and you will start seeing the data in hystrix.stream and turbine.

Thanks for the response. The problem was not in the code or gradle dependencies. The issue was with the database being down. once the database came up, and an API was accessed, then only the logs got started printed.

Yeah thats what my point was. Since calls were. Ot getting made through Hystrix. Glad your issue got resolved.

Hello I have the same problem I see only onli ping: with no data when at this address:
http://localhost:9002/hystrix.stream

I have checked the versions and I have:
com.netflix.hystrix:hystrix-core:1.5.5
com.netflix.hystrix:hystrix-metrics-event-stream:1.5.5
com.netflix.hystrix:hystrix-serialization:1.5.5
and
org.springframework.boot:spring-boot-actuator:1.4.2.RELEASE
org.springframework.cloud:spring-cloud-netflix-core:1.2.0.RELEASE
org.springframework.cloud:spring-cloud-netflix-hystrix-dashboard:1.2.0.RELEASE

I have tried to call the rest API and the Circuit Breaker works but still I can't see any data more then ping:

Any Ideas?

@carlitos081 It's hard to know what's going wrong with that set of information. Can you try out the hystrix-examples-webapp and see if that metrics stream is working as you expect? If so, then can you see what differences exist between that setup and yours?

I had the same problem. however, I started seeing data after making POST/GET calls to the server you are monitoring. Hope that helps

Our problem was actually using a beta version of hystrix. Once we updated
to newer release version, the problem went away.

On Fri, Dec 22, 2017 at 9:35 AM Marcus Chiu notifications@github.com
wrote:

I had the same problem. however, I started seeing data after making
POST/GET calls to the server you are monitoring. Hope that helps

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Netflix/Hystrix/issues/996#issuecomment-353643169,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADHgLGHvMcfrjD-hIA2WgDTVhhkP99sGks5tC-hNgaJpZM4Gqbw6
.

Was this page helpful?
0 / 5 - 0 ratings