Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-12889

Application Perspective Monitoring: OpenNMS refuses to start if service is referenced by two applications

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 27.0.0
    • Fix Version/s: 27.0.0
    • Component/s: None
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None

      Description

      Steps to reproduce:

      • start OpenNMS
      • create two applications referencing the same service
      • add some location to these applications
      • try to restart OpenNMS

       

      An error occurred while attempting to start the "OpenNMS:Name=PerspectivePoller" service (class org.opennms.netmgt.daemon.SimpleSpringContextJmxServiceDaemon).  Shutting down and exiting.
      javax.management.RuntimeMBeanException: java.lang.IllegalStateException: Duplicate key org.opennms.netmgt.dao.api.ServicePerspective@34bbdea2
      	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.opennms.netmgt.vmmgr.Invoker.invoke(Invoker.java:277)
      	at org.opennms.netmgt.vmmgr.Invoker.invokeMethods(Invoker.java:206)
      	at org.opennms.netmgt.vmmgr.Starter.start(Starter.java:154)
      	at org.opennms.netmgt.vmmgr.Starter.startDaemon(Starter.java:94)
      	at org.opennms.netmgt.vmmgr.Controller.start(Controller.java:173)
      	at org.opennms.netmgt.vmmgr.Controller.main(Controller.java:150)
      	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 org.opennms.bootstrap.Bootstrap$4.run(Bootstrap.java:527)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.IllegalStateException: Duplicate key org.opennms.netmgt.dao.api.ServicePerspective@34bbdea2
      	at java.util.stream.Collectors.lambda$throwingMerger$0(Collectors.java:133)
      	at java.util.HashMap.merge(HashMap.java:1254)
      	at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320)
      	at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
      	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
      	at org.opennms.netmgt.perspectivepoller.PerspectiveServiceTracker$Session.lambda$update$0(PerspectiveServiceTracker.java:237)
      	at org.opennms.netmgt.dao.api.SessionUtils.lambda$withTransaction$0(SessionUtils.java:55)
      	at org.opennms.netmgt.dao.hibernate.DefaultSessionUtils.lambda$withTransaction$0(DefaultSessionUtils.java:68)
      	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
      	at org.opennms.netmgt.dao.hibernate.DefaultSessionUtils.withTransaction(DefaultSessionUtils.java:68)
      	at org.opennms.netmgt.dao.api.SessionUtils.withTransaction(SessionUtils.java:54)
      	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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      	at com.sun.proxy.$Proxy184.withTransaction(Unknown Source)
      	at org.opennms.netmgt.perspectivepoller.PerspectiveServiceTracker$Session.update(PerspectiveServiceTracker.java:235)
      	at org.opennms.netmgt.perspectivepoller.PerspectiveServiceTracker.track(PerspectiveServiceTracker.java:155)
      	at org.opennms.netmgt.perspectivepoller.PerspectivePollerd.start(PerspectivePollerd.java:180)
      	at org.opennms.netmgt.daemon.AbstractSpringContextJmxServiceDaemon$2.run(AbstractSpringContextJmxServiceDaemon.java:128)
      	at org.opennms.core.logging.Logging.withPrefix(Logging.java:71)
      	at org.opennms.netmgt.daemon.AbstractSpringContextJmxServiceDaemon.start(AbstractSpringContextJmxServiceDaemon.java:118)
      	at sun.reflect.GeneratedMethodAccessor341.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.GeneratedMethodAccessor5.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 com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
      	... 13 more
      
      

        Attachments

          Activity

            People

            Assignee:
            fooker Dustin Frisch
            Reporter:
            cpape Christian Pape
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration