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

Telemetryd with BMP adapter throws java.util.ConcurrentModificationException

    XMLWordPrintable

    Details

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

      Description

      I've configured a BMP TCP listener, Parser and BMP-PeerStatus-Adapeter and BMP-OpenBMP-Adapter. OpenNMS won't start and Telemetryd throws the following exception:

      2020-04-02 18:22:40,706 ERROR [Main] o.o.n.d.AbstractSpringContextJmxServiceDaemon: Could not start daemon: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumer': Invocation of init method failed; nested exception is java.lang.Exception: Failed to create adapter from definition: AdapterConfig{name=BMP-OpenBMP-Adapter, class-name=org.opennms.netmgt.telemetry.protocols.bmp.adapter.openbmp.BmpIntegrationAdapter, enabled=true, [Parameter{key='kafka.bootstrap.servers', value='192.168.21.8:9092'}, Parameter{key='kafka.batch.size', value='5'}], packages=[]}
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumer': Invocation of init method failed; nested exception is java.lang.Exception: Failed to create adapter from definition: AdapterConfig{name=BMP-OpenBMP-Adapter, class-name=org.opennms.netmgt.telemetry.protocols.bmp.adapter.openbmp.BmpIntegrationAdapter, enabled=true, [Parameter{key='kafka.bootstrap.servers', value='192.168.21.8:9092'}, Parameter{key='kafka.batch.size', value='5'}], packages=[]}
      	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136) ~[org.apache.servicemix.bundles.spring-beans-4.2.9.RELEASE_1.jar:?]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408) ~[org.apache.servicemix.bundles.spring-beans-4.2.9.RELEASE_1.jar:?]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1575) ~[org.apache.servicemix.bundles.spring-beans-4.2.9.RELEASE_1.jar:?]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:399) ~[org.apache.servicemix.bundles.spring-beans-4.2.9.RELEASE_1.jar:?]
      	at org.opennms.netmgt.telemetry.daemon.Telemetryd.start(Telemetryd.java:116) ~[org.opennms.features.telemetry.daemon-26.0.0-SNAPSHOT.jar:?]
      	at org.opennms.netmgt.daemon.AbstractSpringContextJmxServiceDaemon$2.run(AbstractSpringContextJmxServiceDaemon.java:128) [org.opennms.core.daemon-26.0.0-SNAPSHOT.jar:?]
      	at org.opennms.core.logging.Logging.withPrefix(Logging.java:71) [org.opennms.core.logging-26.0.0-SNAPSHOT.jar:?]
      	at org.opennms.netmgt.daemon.AbstractSpringContextJmxServiceDaemon.start(AbstractSpringContextJmxServiceDaemon.java:118) [org.opennms.core.daemon-26.0.0-SNAPSHOT.jar:?]
      	at jdk.internal.reflect.GeneratedMethodAccessor135.invoke(Unknown Source) ~[?:?]
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
      	at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) [?:?]
      	at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) ~[?:?]
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
      	at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:260) [?:?]
      	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:809) [?:?]
      	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) [?:?]
      	at org.opennms.netmgt.vmmgr.Invoker.invoke(Invoker.java:277) [org.opennms.core.daemon-26.0.0-SNAPSHOT.jar:?]
      	at org.opennms.netmgt.vmmgr.Invoker.invokeMethods(Invoker.java:206) [org.opennms.core.daemon-26.0.0-SNAPSHOT.jar:?]
      	at org.opennms.netmgt.vmmgr.Starter.start(Starter.java:154) [org.opennms.core.daemon-26.0.0-SNAPSHOT.jar:?]
      	at org.opennms.netmgt.vmmgr.Starter.startDaemon(Starter.java:94) [org.opennms.core.daemon-26.0.0-SNAPSHOT.jar:?]
      	at org.opennms.netmgt.vmmgr.Controller.start(Controller.java:173) [org.opennms.core.daemon-26.0.0-SNAPSHOT.jar:?]
      	at org.opennms.netmgt.vmmgr.Controller.main(Controller.java:150) [org.opennms.core.daemon-26.0.0-SNAPSHOT.jar:?]
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
      	at org.opennms.bootstrap.Bootstrap$4.run(Bootstrap.java:527) [opennms_bootstrap.jar:?]
      	at java.lang.Thread.run(Thread.java:834) [?:?]
      Caused by: java.lang.Exception: Failed to create adapter from definition: AdapterConfig{name=BMP-OpenBMP-Adapter, class-name=org.opennms.netmgt.telemetry.protocols.bmp.adapter.openbmp.BmpIntegrationAdapter, enabled=true, [Parameter{key='kafka.bootstrap.servers', value='192.168.21.8:9092'}, Parameter{key='kafka.batch.size', value='5'}], packages=[]}
      	at org.opennms.netmgt.telemetry.daemon.TelemetryMessageConsumer.init(TelemetryMessageConsumer.java:93) ~[org.opennms.features.telemetry.daemon-26.0.0-SNAPSHOT.jar:?]
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
      	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:354) ~[org.apache.servicemix.bundles.spring-beans-4.2.9.RELEASE_1.jar:?]
      	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:305) ~[org.apache.servicemix.bundles.spring-beans-4.2.9.RELEASE_1.jar:?]
      	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133) ~[org.apache.servicemix.bundles.spring-beans-4.2.9.RELEASE_1.jar:?]
      	... 34 more
      Caused by: java.util.ConcurrentModificationException
      	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1493) ~[?:?]
      	at java.util.HashMap$KeyIterator.next(HashMap.java:1516) ~[?:?]
      	at org.opennms.netmgt.telemetry.protocols.bmp.adapter.openbmp.BmpIntegrationAdapterFactory.createBean(BmpIntegrationAdapterFactory.java:63) ~[org.opennms.features.telemetry.protocols.bmp.adapter-26.0.0-SNAPSHOT.jar:?]
      	at org.opennms.netmgt.telemetry.protocols.bmp.adapter.openbmp.BmpIntegrationAdapterFactory.createBean(BmpIntegrationAdapterFactory.java:41) ~[org.opennms.features.telemetry.protocols.bmp.adapter-26.0.0-SNAPSHOT.jar:?]
      	at org.opennms.netmgt.telemetry.protocols.registry.impl.TelemetryServiceRegistryImpl.getService(TelemetryServiceRegistryImpl.java:121) ~[org.opennms.features.telemetry.registry-26.0.0-SNAPSHOT.jar:?]
      	at org.opennms.netmgt.telemetry.protocols.registry.impl.TelemetryServiceRegistryImpl.getService(TelemetryServiceRegistryImpl.java:56) ~[org.opennms.features.telemetry.registry-26.0.0-SNAPSHOT.jar:?]
      	at org.opennms.netmgt.telemetry.protocols.registry.impl.TelemetryRegistryImpl.getAdapter(TelemetryRegistryImpl.java:76) ~[org.opennms.features.telemetry.registry-26.0.0-SNAPSHOT.jar:?]
      	at org.opennms.netmgt.telemetry.daemon.TelemetryMessageConsumer.init(TelemetryMessageConsumer.java:91) ~[org.opennms.features.telemetry.daemon-26.0.0-SNAPSHOT.jar:?]
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
      	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:354) ~[org.apache.servicemix.bundles.spring-beans-4.2.9.RELEASE_1.jar:?]
      	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:305) ~[org.apache.servicemix.bundles.spring-beans-4.2.9.RELEASE_1.jar:?]
      	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133) ~[org.apache.servicemix.bundles.spring-beans-4.2.9.RELEASE_1.jar:?]
      	... 34 more
      

      I use the following configuration:

      <?xml version="1.0"?>
      <telemetryd-config>
        <listener name="BMP-11019" class-name="org.opennms.netmgt.telemetry.listeners.TcpListener" enabled="true">
          <parameter key="port" value="11019"/>
          <parser name="BMP-Parser" class-name="org.opennms.netmgt.telemetry.protocols.bmp.parser.BmpParser" queue="BMP" />
        </listener>
        <queue name="BMP">
          <adapter name="BMP-Telemetry-Adapter" class-name="org.opennms.netmgt.telemetry.protocols.bmp.adapter.BmpTelemetryAdapter" enabled="true">
            <package name="BMP-Default">
              <rrd step="300">
                <rra>RRA:AVERAGE:0.5:1:2016</rra>
                <rra>RRA:AVERAGE:0.5:12:1488</rra>
                <rra>RRA:AVERAGE:0.5:288:366</rra>
                <rra>RRA:MAX:0.5:288:366</rra>
                <rra>RRA:MIN:0.5:288:366</rra>
              </rrd>
            </package>
          </adapter>
          <adapter name="BMP-PeerStatus-Adapter" class-name="org.opennms.netmgt.telemetry.protocols.bmp.adapter.BmpPeerStatusAdapter" enabled="true" />
          <adapter name="BMP-OpenBMP-Adapter" class-name="org.opennms.netmgt.telemetry.protocols.bmp.adapter.openbmp.BmpIntegrationAdapter" enabled="true">
            <parameter key="kafka.bootstrap.servers" value="192.168.21.8:9092"/>
            <parameter key="kafka.batch.size" value="5"/>
          </adapter>
        </queue>
      </telemetryd-config>
      

        Attachments

          Activity

            People

            Assignee:
            j-white Jesse White
            Reporter:
            indigo Ronny Trommer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: