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

BsonInvalidOperationException on Telemetryd with Sflow

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 22.0.1
    • Fix Version/s: 22.0.2
    • Component/s: Minion, Telemetry
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Sprint:
      Horizon - July 11th 2018, Horizon - July 18th 2018

      Description

      When trying to process sflow data provided from hsflowd the following exceptions was found in the telemetryd.log.

      2018-06-29 11:49:59,676 DEBUG [nioEventLoopGroup-6-1] o.o.n.t.l.s.Listener:
      org.bson.BsonInvalidOperationException: writeInt64 can only be called when State is VALUE, not when State is NAME
              at org.bson.AbstractBsonWriter.throwInvalidState(AbstractBsonWriter.java:742) ~[bson-3.5.0.jar:?]
              at org.bson.AbstractBsonWriter.checkPreconditions(AbstractBsonWriter.java:697) ~[bson-3.5.0.jar:?]
              at org.bson.AbstractBsonWriter.writeInt64(AbstractBsonWriter.java:444) ~[bson-3.5.0.jar:?]
              at org.opennms.netmgt.telemetry.listeners.sflow.proto.flows.HostAdapter.writeBson(HostAdapter.java:68) ~[org.opennms.features.telemetry.listeners.sflow-22.0.1.jar:?]
              at org.opennms.netmgt.telemetry.listeners.sflow.proto.flows.HostAdapters.writeBson(HostAdapters.java:62) ~[org.opennms.features.telemetry.listeners.sflow-22.0.1.jar:?]
              at org.opennms.netmgt.telemetry.listeners.sflow.proto.flows.CounterRecord.writeBson(CounterRecord.java:95) ~[org.opennms.features.telemetry.listeners.sflow-22.0.1.jar:?]
              at org.opennms.netmgt.telemetry.listeners.sflow.proto.flows.CountersSample.writeBson(CountersSample.java:87) ~[org.opennms.features.telemetry.listeners.sflow-22.0.1.jar:?]
              at org.opennms.netmgt.telemetry.listeners.sflow.proto.flows.SampleRecord.writeBson(SampleRecord.java:66) ~[org.opennms.features.telemetry.listeners.sflow-22.0.1.jar:?]
              at org.opennms.netmgt.telemetry.listeners.sflow.proto.flows.SampleDatagramV5.writeBson(SampleDatagramV5.java:96) ~[org.opennms.features.telemetry.listeners.sflow-22.0.1.jar:?]
              at org.opennms.netmgt.telemetry.listeners.sflow.PacketHandler.channelRead0(PacketHandler.java:68) ~[org.opennms.features.telemetry.listeners.sflow-22.0.1.jar:?]
              at org.opennms.netmgt.telemetry.listeners.sflow.PacketHandler.channelRead0(PacketHandler.java:47) ~[org.opennms.features.telemetry.listeners.sflow-22.0.1.jar:?]
              at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.channel.nio.AbstractNioMessageChannel$NioMessageUnsafe.read(AbstractNioMessageChannel.java:93) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:624) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:559) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:476) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) [netty-all-4.1.9.Final.jar:4.1.9.Final]
              at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]
      

      It seems like Minion is affected as well, I was not able to get sFlow through the Minion configured. The error message is the same in the karaf shell with log:set debug and log:tail

      2018-06-29 16:33:42,275 | WARN  | entLoopGroup-2-1 | Listener                         | 261 - org.opennms.features.telemetry.listeners.sflow - 22.0.1 | Invalid packet: writeInt64 can only be called when State is VALUE, not when State is NAME
      2018-06-29 16:33:42,288 | DEBUG | entLoopGroup-2-1 | Listener                         | 261 - org.opennms.features.telemetry.listeners.sflow - 22.0.1 |
      org.bson.BsonInvalidOperationException: writeInt64 can only be called when State is VALUE, not when State is NAME
      	at org.bson.AbstractBsonWriter.throwInvalidState(AbstractBsonWriter.java:742) [207:org.mongodb.bson:3.5.0]
      	at org.bson.AbstractBsonWriter.checkPreconditions(AbstractBsonWriter.java:697) [207:org.mongodb.bson:3.5.0]
      	at org.bson.AbstractBsonWriter.writeInt64(AbstractBsonWriter.java:444) [207:org.mongodb.bson:3.5.0]
      	at org.opennms.netmgt.telemetry.listeners.sflow.proto.flows.HostAdapter.writeBson(HostAdapter.java:68) [261:org.opennms.features.telemetry.listeners.sflow:22.0.1]
      	at org.opennms.netmgt.telemetry.listeners.sflow.proto.flows.HostAdapters.writeBson(HostAdapters.java:62) [261:org.opennms.features.telemetry.listeners.sflow:22.0.1]
      	at org.opennms.netmgt.telemetry.listeners.sflow.proto.flows.CounterRecord.writeBson(CounterRecord.java:95) [261:org.opennms.features.telemetry.listeners.sflow:22.0.1]
      	at org.opennms.netmgt.telemetry.listeners.sflow.proto.flows.CountersSample.writeBson(CountersSample.java:87) [261:org.opennms.features.telemetry.listeners.sflow:22.0.1]
      	at org.opennms.netmgt.telemetry.listeners.sflow.proto.flows.SampleRecord.writeBson(SampleRecord.java:66) [261:org.opennms.features.telemetry.listeners.sflow:22.0.1]
      	at org.opennms.netmgt.telemetry.listeners.sflow.proto.flows.SampleDatagramV5.writeBson(SampleDatagramV5.java:96) [261:org.opennms.features.telemetry.listeners.sflow:22.0.1]
      	at org.opennms.netmgt.telemetry.listeners.sflow.PacketHandler.channelRead0(PacketHandler.java:68) [261:org.opennms.features.telemetry.listeners.sflow:22.0.1]
      	at org.opennms.netmgt.telemetry.listeners.sflow.PacketHandler.channelRead0(PacketHandler.java:47) [261:org.opennms.features.telemetry.listeners.sflow:22.0.1]
      	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [75:io.netty.transport:4.1.9.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [75:io.netty.transport:4.1.9.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [75:io.netty.transport:4.1.9.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [75:io.netty.transport:4.1.9.Final]
      	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) [71:io.netty.codec:4.1.9.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [75:io.netty.transport:4.1.9.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [75:io.netty.transport:4.1.9.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [75:io.netty.transport:4.1.9.Final]
      	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [75:io.netty.transport:4.1.9.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [75:io.netty.transport:4.1.9.Final]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [75:io.netty.transport:4.1.9.Final]
      	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [75:io.netty.transport:4.1.9.Final]
      	at io.netty.channel.nio.AbstractNioMessageChannel$NioMessageUnsafe.read(AbstractNioMessageChannel.java:93) [75:io.netty.transport:4.1.9.Final]
      	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:624) [75:io.netty.transport:4.1.9.Final]
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:559) [75:io.netty.transport:4.1.9.Final]
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:476) [75:io.netty.transport:4.1.9.Final]
      	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438) [75:io.netty.transport:4.1.9.Final]
      	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [72:io.netty.common:4.1.9.Final]
      	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) [72:io.netty.common:4.1.9.Final]
      	at java.lang.Thread.run(Thread.java:748) [?:?]
      

        Attachments

          Activity

            People

            • Assignee:
              cpape Christian Pape
              Reporter:
              indigo Ronny Trommer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: