Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-32789

Possible bad codec used for internal/metrics record

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: 2021.x, 2023.x
    • Component/s: Streams

      Description

      Seen on production the stream/introspection is trying to read a record that is Java serialized (0xAC 0xED header bytes) instead of being Avro encoded.

      A possible case is that the Metrics reporter (StreamMetricsReporter) has been called before the initialization of streams (LogStreamManager#initInternalStream),
      the not yet initialized appender has produced a java serialized record.

      Note that NXP-32441 should avoid to fail in such case but this needs to be fixed.

      The stack:

      stream/introspectionPool-00,in:0,inCheckpoint:0,out:0,lastRead:1721402320177,lastTimer:0,wm:0,loop:27,rebalance assigned
      ...
      java.lang.IllegalArgumentException: org.apache.avro.message.BadHeaderException: Unrecognized header bytes: 0xAC 0xED
      	at org.nuxeo.lib.stream.codec.AvroMessageCodec.decode(AvroMessageCodec.java:80) ~[nuxeo-stream-2021.50.12.jar:?]
      	at org.nuxeo.lib.stream.log.kafka.KafkaLogTailer.read(KafkaLogTailer.java:196) ~[nuxeo-stream-2021.50.12.jar:?]
      	at org.nuxeo.lib.stream.computation.log.ComputationRunner.processRecord(ComputationRunner.java:433) ~[nuxeo-stream-2021.50.12.jar:?]
      ...
      Caused by: org.apache.avro.message.BadHeaderException: Unrecognized header bytes: 0xAC 0xED
      	at org.apache.avro.message.BinaryMessageDecoder.decode(BinaryMessageDecoder.java:156) ~[avro-1.9.2.jar:1.9.2]
      	at org.apache.avro.message.MessageDecoder$BaseDecoder.decode(MessageDecoder.java:146) ~[avro-1.9.2.jar:1.9.2]
      	at org.nuxeo.lib.stream.codec.AvroMessageCodec.decode(AvroMessageCodec.java:78) ~[nuxeo-stream-2021.50.12.jar:?]
      	... 10 more
      

        Attachments

          Activity

            People

            • Assignee:
              bdelbosc Benoit Delbosc
              Reporter:
              bdelbosc Benoit Delbosc
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: