[INFRAUTILS-39] diagstatus : showSvcStatus() should not throw exceptions to CLI if service-descriptor is null Created: 09/May/18 Updated: 24/Aug/18 Resolved: 24/Aug/18 |
|
| Status: | Resolved |
| Project: | infrautils |
| Component/s: | diagstatus |
| Affects Version/s: | Fluorine |
| Fix Version/s: | Oxygen-SR3, Fluorine |
| Type: | Bug | Priority: | Medium |
| Reporter: | Faseela K | Assignee: | Chintan Apte |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Due to some bug, openflowplugin's service Descriptor was null, and in such scenarios, when we execute "showSvcStatus" the CLI was throwing some exception.
[vthapar@localhost odltools]$ cat ~/odldev/netvirt/karaf/target/assembly/data/log/karaf.log |grep SystemBootReady 2018-05-09T14:32:00,704 | DEBUG | Blueprint Extender: 3 | OpenFlowPluginProviderImpl | 405 - org.opendaylight.openflowplugin.impl - 0.7.0.SNAPSHOT | registered onSystemBootReady() listener for deferred startSwitchConnections() [vthapar@localhost odltools]$ netstat -an |grep 6653 [vthapar@localhost odltools]$
karaf@root()> diagstatus:showsvcstatus Timestamp: Wed May 09 14:34:05 IST 2018 Status retrieval JMX Operation failed for node 127.0.0.1~
2018-05-09T14:34:05,067 | ERROR | pipe-diagstatus:showsvcstatus | DiagStatusCommand | 292 - org.opendaylight.infrautils.diagstatus-shell - 1.4.0.SNAPSHOT | Exception while reaching Host 127.0.0.1 javax.management.RuntimeMBeanException: java.lang.NullPointerException at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:839) [?:?] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:852) [?:?] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:821) [?:?] at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) [?:?] at org.opendaylight.infrautils.diagstatus.MBeanUtils.invokeMBeanFunction(MBeanUtils.java:134) [290:org.opendaylight.infrautils.diagstatus-api:1.4.0.SNAPSHOT] at org.opendaylight.infrautils.diagstatus.shell.DiagStatusCommand.getLocalStatusSummary(DiagStatusCommand.java:71) [292:org.opendaylight.infrautils.diagstatus-shell:1.4.0.SNAPSHOT] at org.opendaylight.infrautils.diagstatus.shell.DiagStatusCommand.execute(DiagStatusCommand.java:49) [292:org.opendaylight.infrautils.diagstatus-shell:1.4.0.SNAPSHOT] |
| Comments |
| Comment by Michael Vorburger [ 09/May/18 ] |
|
k.faseela What is the correct Affects Version for this one? Just Fluorine, or also Oxygen? |
| Comment by Faseela K [ 09/May/18 ] |
|
it can be just Fluorine |
| Comment by Chintan Apte [ 10/May/18 ] |
|
This is the complete stack trace for the exception:- avax.management.RuntimeMBeanException: java.lang.NullPointerException at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:839) [?:?] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:852) [?:?] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:821) [?:?] at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) [?:?] at org.opendaylight.infrautils.diagstatus.MBeanUtils.invokeMBeanFunction(MBeanUtils.java:134) [290:org.opendaylight.infrautils.diagstatus-api:1.4.0.SNAPSHOT] at org.opendaylight.infrautils.diagstatus.shell.DiagStatusCommand.getLocalStatusSummary(DiagStatusCommand.java:71) [292:org.opendaylight.infrautils.diagstatus-shell:1.4.0.SNAPSHOT] at org.opendaylight.infrautils.diagstatus.shell.DiagStatusCommand.execute(DiagStatusCommand.java:49) [292:org.opendaylight.infrautils.diagstatus-shell:1.4.0.SNAPSHOT] at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:34) [49:org.apache.karaf.shell.core:4.1.5] at Proxy030589e5_46fe_4385_b6f3_3c0bb69d36f1.execute(Unknown Source) [?:?] at org.apache.karaf.shell.compat.CommandTracker$1.execute(CommandTracker.java:120) [49:org.apache.karaf.shell.core:4.1.5] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) [49:org.apache.karaf.shell.core:4.1.5] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) [49:org.apache.karaf.shell.core:4.1.5] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:571) [49:org.apache.karaf.shell.core:4.1.5] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:497) [49:org.apache.karaf.shell.core:4.1.5] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:386) [49:org.apache.karaf.shell.core:4.1.5] at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417) [49:org.apache.karaf.shell.core:4.1.5] at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) [49:org.apache.karaf.shell.core:4.1.5] at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) [49:org.apache.karaf.shell.core:4.1.5] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?] at java.lang.Thread.run(Thread.java:748) [?:?] Caused by: java.lang.NullPointerException at org.opendaylight.openflowplugin.api.diagstatus.OpenflowPluginDiagStatusProvider.getServiceDescriptor(OpenflowPluginDiagStatusProvider.java:60) ~[?:?] at Proxy7ed1f91c_f98a_4e06_bc36_653c404df659.getServiceDescriptor(Unknown Source) ~[?:?] at Proxy127b4e2e_205b_4252_ae68_94fad99ccad7.getServiceDescriptor(Unknown Source) ~[?:?] at org.opendaylight.infrautils.diagstatus.internal.DiagStatusServiceImpl.updateServiceStatusMap(DiagStatusServiceImpl.java:136) ~[?:?] at org.opendaylight.infrautils.diagstatus.internal.DiagStatusServiceImpl.getAllServiceDescriptors(DiagStatusServiceImpl.java:86) ~[?:?] at org.opendaylight.infrautils.diagstatus.internal.DiagStatusServiceImpl.isOperational(DiagStatusServiceImpl.java:95) ~[?:?] at org.opendaylight.infrautils.diagstatus.internal.DiagStatusServiceMBeanImpl.acquireServiceStatusDetailed(DiagStatusServiceMBeanImpl.java:112) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] 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.GeneratedMethodAccessor68.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.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) ~[?:?] at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) ~[?:?] at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) ~[?:?] at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) ~[?:?] at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) ~[?:?] at javax.management.StandardMBean.invoke(StandardMBean.java:405) ~[?:?] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) ~[?:?] ... 19 more |
| Comment by Faseela K [ 24/Aug/18 ] |
|
Can't we close this Jira chintanapte ? |
| Comment by Michael Vorburger [ 24/Aug/18 ] |
|
Looks like it's done (all Gerrits merged), so let's close it. Given that changes were cherry-pick into Oxygen as well, but I'm not 100% sure which branch - let's set it to SR3 (but may have been SR2 already, would need to dig more; doesn't matter). |