Uploaded image for project: 'Horizon Stream'
  1. Horizon Stream
  2. HS-306

SNMP RPC failures while Polling

    XMLWordPrintable

Details

    • Bug
    • Status: Done (View Workflow)
    • Minor
    • Resolution: Done
    • None
    • None

    Description

      Unable to process SNMP response as we are unable to load SNMP4Strategy.

      Following exception when checking with valid SNMP device.

      [horizon-stream-core] 21:09:05.595 WARN  [rpc-response-handler-19] There is no SnmpStrategy registered. Unable to find strategy org.opennms.netmgt.snmp.snmp4j.Snmp4JStrategy. Falling back to ClassBasedStrategyResolver.
      [horizon-stream-core] 21:09:05.616 ERROR [rpc-response-handler-19] Error while processing RPC response <snmp-response>
      [horizon-stream-core]    <response>
      [horizon-stream-core]       <result>
      [horizon-stream-core]          <base>.1.3.6.1.2.1.1.2.0</base>
      [horizon-stream-core]          <value type="6">LjEuMy42LjEuNC4xLjgwNzIuMy4yLjEw</value>
      [horizon-stream-core]       </result>
      [horizon-stream-core]    </response>
      [horizon-stream-core] </snmp-response>
      [horizon-stream-core] java.lang.RuntimeException: javax.xml.bind.UnmarshalException
      [horizon-stream-core]  - with linked exception:
      [horizon-stream-core] [Exception [EclipseLink-3001] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.ConversionException
      [horizon-stream-core] Exception Description: The object [org.opennms.netmgt.snmp.SnmpValueXmlAdapter$JaxbSnmpValue@22f5b819], of class [class org.opennms.netmgt.snmp.SnmpValueXmlAdapter$JaxbSnmpValue], could not be converted to [interface org.opennms.netmgt.snmp.SnmpValue].
      [horizon-stream-core] Internal Exception: java.lang.RuntimeException: Unable to instantiate class org.opennms.netmgt.snmp.snmp4j.Snmp4JStrategy]
      [horizon-stream-core]     at org.opennms.core.xml.XmlHandler.unmarshal(XmlHandler.java:87)
      [horizon-stream-core]     at org.opennms.horizon.ipc.rpc.api.AbstractXmlRpcModule.unmarshalResponse(AbstractXmlRpcModule.java:78)
      [horizon-stream-core]     at org.opennms.core.ipc.grpc.server.OpennmsGrpcServer$RpcResponseHandlerImpl.sendResponse(OpennmsGrpcServer.java:462)
      [horizon-stream-core]     at org.opennms.core.ipc.grpc.server.manager.rpcstreaming.impl.MinionRpcStreamConnectionImpl.syncHandleResponse(MinionRpcStreamConnectionImpl.java:118)
      [horizon-stream-core]     at org.opennms.core.ipc.grpc.server.manager.rpcstreaming.impl.MinionRpcStreamConnectionImpl.lambda$asyncQueueHandleResponse$0(MinionRpcStreamConnectionImpl.java:106)
      [horizon-stream-core]     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      [horizon-stream-core]     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      [horizon-stream-core]     at java.base/java.lang.Thread.run(Thread.java:829)
      [horizon-stream-core] Caused by: javax.xml.bind.UnmarshalException
      [horizon-stream-core]  - with linked exception:
      [horizon-stream-core] [Exception [EclipseLink-3001] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.ConversionException
      [horizon-stream-core] Exception Description: The object [org.opennms.netmgt.snmp.SnmpValueXmlAdapter$JaxbSnmpValue@22f5b819], of class [class org.opennms.netmgt.snmp.SnmpValueXmlAdapter$JaxbSnmpValue], could not be converted to [interface org.opennms.netmgt.snmp.SnmpValue].
      [horizon-stream-core] Internal Exception: java.lang.RuntimeException: Unable to instantiate class org.opennms.netmgt.snmp.snmp4j.Snmp4JStrategy]
      [horizon-stream-core]     at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:191)
      [horizon-stream-core]     at org.opennms.core.xml.XmlHandler.unmarshal(XmlHandler.java:85)
      [horizon-stream-core]     ... 7 more
      [horizon-stream-core] Caused by: Exception [EclipseLink-3001] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.ConversionException
      [horizon-stream-core] Exception Description: The object [org.opennms.netmgt.snmp.SnmpValueXmlAdapter$JaxbSnmpValue@22f5b819], of class [class org.opennms.netmgt.snmp.SnmpValueXmlAdapter$JaxbSnmpValue], could not be converted to [interface org.opennms.netmgt.snmp.SnmpValue].
      [horizon-stream-core] Internal Exception: java.lang.RuntimeException: Unable to instantiate class org.opennms.netmgt.snmp.snmp4j.Snmp4JStrategy
      [horizon-stream-core]     at org.eclipse.persistence.exceptions.ConversionException.couldNotBeConverted(ConversionException.java:87)
      [horizon-stream-core]     at org.eclipse.persistence.internal.jaxb.XMLJavaTypeConverter.convertDataValueToObjectValue(XMLJavaTypeConverter.java:162)
      [horizon-stream-core]     at org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping.convertDataValueToObjectValue(XMLCompositeObjectMapping.java:813)
      [horizon-stream-core]     at org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping.convertDataValueToObjectValue(XMLCompositeObjectMapping.java:1)
      [horizon-stream-core]     at org.eclipse.persistence.internal.oxm.XMLCompositeObjectMappingNodeValue.setAttributeValue(XMLCompositeObjectMappingNodeValue.java:432)
      [horizon-stream-core]     at org.eclipse.persistence.internal.oxm.XMLCompositeObjectMappingNodeValue.endElement(XMLCompositeObjectMappingNodeValue.java:407)
      [horizon-stream-core]     at org.eclipse.persistence.internal.oxm.record.UnmarshalRecordImpl.endElement(UnmarshalRecordImpl.java:1021)
      [horizon-stream-core]     at org.eclipse.persistence.internal.oxm.record.UnmarshalRecordImpl.endElement(UnmarshalRecordImpl.java:1080)
      [horizon-stream-core]     at org.eclipse.persistence.internal.oxm.record.XMLStreamReaderReader.parseEvent(XMLStreamReaderReader.java:154)
      [horizon-stream-core]     at org.eclipse.persistence.internal.oxm.record.XMLStreamReaderReader.parse(XMLStreamReaderReader.java:99)
      [horizon-stream-core]     at org.eclipse.persistence.internal.oxm.record.XMLStreamReaderReader.parse(XMLStreamReaderReader.java:86)
      [horizon-stream-core]     at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:895)
      [horizon-stream-core]     at org.eclipse.persistence.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:659)
      [horizon-stream-core]     at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:585)
      [horizon-stream-core]     at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:182)
      [horizon-stream-core]     ... 8 more
      [horizon-stream-core] Caused by: java.lang.RuntimeException: Unable to instantiate class org.opennms.netmgt.snmp.snmp4j.Snmp4JStrategy
      [horizon-stream-core]     at org.opennms.netmgt.snmp.ClassBasedStrategyResolver.getStrategyInstance(ClassBasedStrategyResolver.java:40)
      [horizon-stream-core]     at org.opennms.netmgt.snmp.ClassBasedStrategyResolver.getStrategy(ClassBasedStrategyResolver.java:47)
      [horizon-stream-core]     at org.opennms.netmgt.snmp.internal.ServiceBasedStrategyResolver.getStrategy(ServiceBasedStrategyResolver.java:85)
      [horizon-stream-core]     at org.opennms.netmgt.snmp.SnmpUtils.getStrategy(SnmpUtils.java:162)
      [horizon-stream-core]     at org.opennms.netmgt.snmp.SnmpUtils.getValueFactory(SnmpUtils.java:210)
      [horizon-stream-core]     at org.opennms.netmgt.snmp.SnmpValueXmlAdapter.unmarshal(SnmpValueXmlAdapter.java:82)
      [horizon-stream-core]     at org.opennms.netmgt.snmp.SnmpValueXmlAdapter.unmarshal(SnmpValueXmlAdapter.java:38)
      [horizon-stream-core]     at org.eclipse.persistence.internal.jaxb.XMLJavaTypeConverter.convertDataValueToObjectValue(XMLJavaTypeConverter.java:153)
      [horizon-stream-core]     ... 21 more
      [horizon-stream-core] Caused by: java.lang.ClassNotFoundException: org.opennms.netmgt.snmp.snmp4j.Snmp4JStrategy not found by org.opennms.horizon.snmp.api [463]
      [horizon-stream-core]     at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1565)
      [horizon-stream-core]     at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:78)
      [horizon-stream-core]     at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1950)
      [horizon-stream-core]     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
      [horizon-stream-core]     at java.base/java.lang.Class.forName0(Native Method)
      [horizon-stream-core]     at java.base/java.lang.Class.forName(Class.java:315)
      [horizon-stream-core]     at org.opennms.netmgt.snmp.ClassBasedStrategyResolver.getStrategyInstance(ClassBasedStrategyResolver.java:38)
      [horizon-stream-core]     ... 28 more 

      Attachments

        Activity

          People

            cgorantla Chandra Gorantla
            cgorantla Chandra Gorantla
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: