pulsarIO / realtime-analytics

Realtime analytics, this includes the core components of Pulsar pipeline.
Other
653 stars 125 forks source link

JMX on collector app #9

Closed mariusrugan closed 9 years ago

mariusrugan commented 9 years ago

Hi,

i'm trying to enable JMX on collector app to inspect stats i've tried adding in appwiring.xml

<context:component-scan base-package="com.ebay.pulsar.collector.servlet" />

<context:mbean-export default-domain="com.ebay.pulsar.collector"/>

but i cannot start the app:

14:08:25.024 [main] ERROR com.ebay.jetstream.application - Failed to start ApplicationUnable to register MBean [EPL] with key 'EPL'; nested exception is javax.management.MalformedObjectNameException: Key properties cannot be empty Failed to start application: org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [EPL] with key 'EPL'; nested exception is javax.management.MalformedObjectNameException: Key properties cannot be empty org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [EPL] with key 'EPL'; nested exception is javax.management.MalformedObjectNameException: Key properties cannot be empty

app startup params: -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=18002 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false

Any ideas for correct "wiring"? thanks

shmurthy62 commented 9 years ago

follow directors here - http://docs.spring.io/spring/docs/3.0.x/spring-framework-reference/html/jmx.html

shmurthy62 commented 9 years ago

follow directions here - http://docs.spring.io/spring/docs/3.0.x/spring-framework-reference/html/jmx.html

mariusrugan commented 9 years ago

Hi Sharad, thanks. i've sorted it out finally via

<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
    <property name="locateExistingServerIfPossible" value="true" />
</bean>

(bottom of https://github.com/MariusRugan/realtime-analytics/blob/develop/collector/buildsrc/JetstreamConf/appwiring.xml)

However, running it and inspecting it with jconsole, the object wasn't incrementing it's Atomic "stores" (e.g. counters). Was this intentional or a bug slipped in? Fixed now by wiring it as beans.

screen shot 2015-03-24 at 23 51 51

(this endeavour was ment to fix JMX so i can jconsole it in docker to see final step in testing traffic generator in docker)

xinglang commented 9 years ago

Actually we used Spring JMX annotations but we did not use jmx. You don't require to use jmx console to access it. All of beans exposed by the app can be accessed via a browser. When start the app, the -p port is the http port to access the monitoring page. I suggest to use that to monitor things rather than JMX.

Best regards, Xinglang

xinglang commented 9 years ago

Here is a screenshot:

image

mariusrugan commented 9 years ago

hi, thanks for the suggestion & clarification. will give it a try.

btw, i had this question in mind, related to the management port and what is served there. I thought i have a config problem given the fact the page is very different (unstyled) than the ones screenshoted on the pulsar demo (publisher/subscriber) but i see now your screenshot so probably i'm not missing anything.

Can't find the wiki link right now, but i've see it couple of times :)

On Wednesday, March 25, 2015, Xinglang Wang notifications@github.com wrote:

Here is a screenshot:

[image: image] https://cloud.githubusercontent.com/assets/9344876/6818242/646a5f7c-d2e7-11e4-9313-e7fc3c1c4ec6.png

— Reply to this email directly or view it on GitHub https://github.com/pulsarIO/realtime-analytics/issues/9#issuecomment-85824694 .

xinglang commented 9 years ago

I think you may mix the two screenshots: monitor page screenshot and dashboard screenshot.

Above is just for monitoring, it is very raw. :-)

The dashboard screenshot is more for reporting demo. here is the link: https://github.com/pulsarIO/realtime-analytics/wiki/PulsarIO-Demo

mariusrugan commented 9 years ago

thanks for clarification, was ref. to this https://github.com/pulsarIO/jetstream/wiki/images/configuration_screenshot.png but i know now it's not 'management' but jetstream specific bootstrap.

thanks again