JMX sensor does not handle run-time exceptions

Description

If run-time exceptions occur during collecting of the JMX data, these will be propagated to outside of the JMX sensor. This causes not all data to be collected. JMX sensor should capture these as well and react by removing such attribute from actively checked list.

Trace:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 2017-10-05 15:37:29,014: 253663 [ervice-thread-2] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. java.lang.UnsupportedOperationException: Usage threshold is not supported at sun.management.MemoryPoolImpl.getUsageThreshold(MemoryPoolImpl.java:106) at sun.reflect.GeneratedMethodAccessor321.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) at sun.reflect.GeneratedMethodAccessor254.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:193) at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:175) at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:117) at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:54) at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) at com.sun.jmx.mbeanserver.PerInterface.getAttribute(PerInterface.java:83) at com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(MBeanSupport.java:206) at javax.management.StandardMBean.getAttribute(StandardMBean.java:372) at org.jboss.mx.server.RawDynamicInvoker.getAttribute(RawDynamicInvoker.java:117) at org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:565) at rocks.inspectit.agent.java.sensor.jmx.JmxSensor.collectData(JmxSensor.java:263) at rocks.inspectit.agent.java.sensor.jmx.JmxSensor.update(JmxSensor.java:235) at rocks.inspectit.agent.java.core.impl.CoreService$SensorRefresher.run(CoreService.java:284) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) at rocks.inspectit.agent.java.util.AgentAwareThread.run(AgentAwareThread.java:54)

Log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 15:40:49,154 INFO [STDOUT] 2017-10-05 15:40:49,154: [inspectIT] 453803 [ervice-thread-2] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:40:54,158 INFO [STDOUT] 2017-10-05 15:40:54,158: [inspectIT] 458807 [ervice-thread-0] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:40:59,162 INFO [STDOUT] 2017-10-05 15:40:59,161: [inspectIT] 463810 [ervice-thread-1] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:41:04,166 INFO [STDOUT] 2017-10-05 15:41:04,166: [inspectIT] 468815 [ervice-thread-2] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:41:09,170 INFO [STDOUT] 2017-10-05 15:41:09,169: [inspectIT] 473818 [ervice-thread-0] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:41:14,175 INFO [STDOUT] 2017-10-05 15:41:14,175: [inspectIT] 478824 [ervice-thread-1] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:41:19,179 INFO [STDOUT] 2017-10-05 15:41:19,179: [inspectIT] 483828 [ervice-thread-1] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:41:24,183 INFO [STDOUT] 2017-10-05 15:41:24,183: [inspectIT] 488832 [ervice-thread-2] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:41:29,188 INFO [STDOUT] 2017-10-05 15:41:29,188: [inspectIT] 493837 [ervice-thread-0] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:41:34,192 INFO [STDOUT] 2017-10-05 15:41:34,192: [inspectIT] 498841 [ervice-thread-1] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:41:39,197 INFO [STDOUT] 2017-10-05 15:41:39,197: [inspectIT] 503846 [ervice-thread-2] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:41:44,201 INFO [STDOUT] 2017-10-05 15:41:44,201: [inspectIT] 508850 [ervice-thread-0] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:41:49,205 INFO [STDOUT] 2017-10-05 15:41:49,204: [inspectIT] 513853 [ervice-thread-0] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:41:54,209 INFO [STDOUT] 2017-10-05 15:41:54,208: [inspectIT] 518857 [ervice-thread-1] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:41:59,212 INFO [STDOUT] 2017-10-05 15:41:59,212: [inspectIT] 523861 [ervice-thread-2] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:42:04,215 INFO [STDOUT] 2017-10-05 15:42:04,215: [inspectIT] 528864 [ervice-thread-0] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:42:09,221 INFO [STDOUT] 2017-10-05 15:42:09,221: [inspectIT] 533870 [ervice-thread-1] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:42:14,227 INFO [STDOUT] 2017-10-05 15:42:14,227: [inspectIT] 538876 [ervice-thread-2] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:42:19,231 INFO [STDOUT] 2017-10-05 15:42:19,231: [inspectIT] 543880 [ervice-thread-1] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:42:24,234 INFO [STDOUT] 2017-10-05 15:42:24,234: [inspectIT] 548883 [ervice-thread-2] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors. 15:42:29,238 INFO [STDOUT] 2017-10-05 15:42:29,238: [inspectIT] 553887 [ervice-thread-0] ERROR ent.java.core.impl.CoreService - Error occurred during refreshing of the system sensors.

Environment

None

Status

Assignee

Marius Oehler

Reporter

Ivan Senic

Labels

None

Pull Request

None

Integrator

Ivan Senic

Sprint

None

Fix versions

Affects versions

1.8.4

Priority

Medium
Configure