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

Cannot use a stream codec for StreamWorkManager

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.2
    • Fix Version/s: 10.3
    • Component/s: Streams
    • Tags:
    • Sprint:
      nxcore 10.3.4, nxcore 10.3.5
    • Story Points:
      1

      Description

      When choosing the non default legacy codec for the StreamWorkManager like:
      nuxeo.stream.work.log.codec=avro

      Errors on all work manager threads pool will follow:

      2018-08-28 08:21:45,404 ERROR [defaultPool-02,in:0,inCheckpoint:0,out:0,lastRead:1535437304401,lastTimer:0,wm:0,loop:2,rebalance assigned] [org.nuxeo.lib.stream.computation.log.ComputationRunner] default: Exception in processLoop: org.apache.avro.message.BadHeaderException: Unrecognized header bytes: 0xAC 0xED
      java.lang.IllegalArgumentException: org.apache.avro.message.BadHeaderException: Unrecognized header bytes: 0xAC 0xED
              at org.nuxeo.lib.stream.codec.AvroMessageCodec.decode(AvroMessageCodec.java:78)
              at org.nuxeo.lib.stream.log.kafka.KafkaLogTailer.read(KafkaLogTailer.java:175)
              at org.nuxeo.lib.stream.computation.log.ComputationRunner.processRecord(ComputationRunner.java:273)
              at org.nuxeo.lib.stream.computation.log.ComputationRunner.processLoop(ComputationRunner.java:194)
              at org.nuxeo.lib.stream.computation.log.ComputationRunner.run(ComputationRunner.java:152)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: org.apache.avro.message.BadHeaderException: Unrecognized header bytes: 0xAC 0xED
              at org.apache.avro.message.BinaryMessageDecoder.decode(BinaryMessageDecoder.java:162)
              at org.apache.avro.message.MessageDecoder$BaseDecoder.decode(MessageDecoder.java:155)
              at org.nuxeo.lib.stream.codec.AvroMessageCodec.decode(AvroMessageCodec.java:76)
              ... 9 more
      
      

      The appender has been created before computation stream initialization with a default legacy codec, the tailers are correctly initialized and expect avro codec.

      Note that this affect only the stream workmanager, the audit and pubsub codec selection do work.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h