Uploaded image for project: 'AMQ Streams'
  1. AMQ Streams
  2. ENTMQST-3635

Snappy UnsatisfiedLinkError makes MirrorSourceTask failing during poll

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Minor Minor
    • None
    • 1.7.0.GA
    • kafka-connect
    • None
    • False
    • False
    • Workaround Exists
    • Hide

      The problem is caused by the option noexec used to mount the /tmp.

      A solution to make the mirrormaker working again was to remove the noexec from /etc/fstab and remount the /tmp. 

       

       

      Show
      The problem is caused by the option noexec used to mount the /tmp. A solution to make the mirrormaker working again was to remove the noexec from /etc/fstab and remount the /tmp.     
    • Hide
      • On RHEL mount the /tmp with the option noexec
      • Start MirrorMaker2 and configure it to mirror topic that are using snappy compression 

       

      Show
      On RHEL mount the /tmp with the option noexec Start MirrorMaker2 and configure it to mirror topic that are using snappy compression   

      The entire mirroring results to be stucked, and the log explodes with the exceptions below:

      [2022-01-10 13:04:47,275] WARN Failure during poll. (org.apache.kafka.connect.mirror.MirrorSourceTask)
      org.apache.kafka.common.KafkaException: Received exception when fetching the next record from CC22-table-7. If needed, please seek past the record to continue consumption.
              at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.fetchRecords(Fetcher.java:1599)
              at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.access$1700(Fetcher.java:1454)
              at org.apache.kafka.clients.consumer.internals.Fetcher.fetchRecords(Fetcher.java:687)
              at org.apache.kafka.clients.consumer.internals.Fetcher.fetchedRecords(Fetcher.java:638)
              at org.apache.kafka.clients.consumer.KafkaConsumer.pollForFetches(KafkaConsumer.java:1272)
              at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1233)
              at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1206)
              at org.apache.kafka.connect.mirror.MirrorSourceTask.poll(MirrorSourceTask.java:137)
              at org.apache.kafka.connect.runtime.WorkerSourceTask.poll(WorkerSourceTask.java:289)
              at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:256)
              at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:185)
              at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:234)
              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.kafka.common.KafkaException: java.lang.NoClassDefFoundError: Could not initialize class org.xerial.snappy.Snappy
              at org.apache.kafka.common.record.CompressionType$3.wrapForInput(CompressionType.java:92)
              at org.apache.kafka.common.record.DefaultRecordBatch.compressedIterator(DefaultRecordBatch.java:261)
              at org.apache.kafka.common.record.DefaultRecordBatch.streamingIterator(DefaultRecordBatch.java:346)
              at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.nextFetchedRecord(Fetcher.java:1576)
              at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.fetchRecords(Fetcher.java:1613)
              ... 16 more
      Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.xerial.snappy.Snappy
              at org.xerial.snappy.SnappyInputStream.readFully(SnappyInputStream.java:145)
              at org.xerial.snappy.SnappyInputStream.readHeader(SnappyInputStream.java:99)
              at org.xerial.snappy.SnappyInputStream.<init>(SnappyInputStream.java:59)
              at org.apache.kafka.common.record.CompressionType$3.wrapForInput(CompressionType.java:90)
              ... 20 more
      [2022-01-10 13:03:02,703] WARN Failure during poll. (org.apache.kafka.connect.mirror.MirrorSourceTask)
      org.apache.kafka.common.KafkaException: Received exception when fetching the next record from CC22-table-11. If needed, please seek past the record to continue consumption.
              at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.fetchRecords(Fetcher.java:1599)
              at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.access$1700(Fetcher.java:1454)
              at org.apache.kafka.clients.consumer.internals.Fetcher.fetchRecords(Fetcher.java:687)
              at org.apache.kafka.clients.consumer.internals.Fetcher.fetchedRecords(Fetcher.java:638)
              at org.apache.kafka.clients.consumer.KafkaConsumer.pollForFetches(KafkaConsumer.java:1272)
              at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1233)
              at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1206)
              at org.apache.kafka.connect.mirror.MirrorSourceTask.poll(MirrorSourceTask.java:137)
              at org.apache.kafka.connect.runtime.WorkerSourceTask.poll(WorkerSourceTask.java:289)
              at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:256)
              at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:185)
              at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:234)
              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.kafka.common.KafkaException: java.lang.UnsatisfiedLinkError: /tmp/snappy-1.1.7.300001-466c6165-4a7b-4717-8035-85319915b00f-libsnappyjava.so: /tmp/snappy-1.1.7.300001-466c6165-4a7b-4717-8035-85319915b00f-libsnappyjava.so: failed to map segment from shared object: Operation not permitted
              at org.apache.kafka.common.record.CompressionType$3.wrapForInput(CompressionType.java:92)
              at org.apache.kafka.common.record.DefaultRecordBatch.compressedIterator(DefaultRecordBatch.java:261)
              at org.apache.kafka.common.record.DefaultRecordBatch.streamingIterator(DefaultRecordBatch.java:346)
              at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.nextFetchedRecord(Fetcher.java:1576)
              at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.fetchRecords(Fetcher.java:1613)
              at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.access$1700(Fetcher.java:1454)
              at org.apache.kafka.clients.consumer.internals.Fetcher.fetchRecords(Fetcher.java:687)
              at org.apache.kafka.clients.consumer.internals.Fetcher.fetchedRecords(Fetcher.java:638)
              at org.apache.kafka.clients.consumer.KafkaConsumer.pollForFetches(KafkaConsumer.java:1299)
              ... 12 more
      Caused by: java.lang.UnsatisfiedLinkError: /tmp/snappy-1.1.7.300001-466c6165-4a7b-4717-8035-85319915b00f-libsnappyjava.so: /tmp/snappy-1.1.7.300001-466c6165-4a7b-4717-8035-85319915b00f-libsnappyjava.so: failed to map segment from shared object: Operation not permitted
              at java.lang.ClassLoader$NativeLibrary.load(Native Method)
              at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
              at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1817)
              at java.lang.Runtime.load0(Runtime.java:809)
              at java.lang.System.load(System.java:1086)
              at org.xerial.snappy.SnappyLoader.loadNativeLibrary(SnappyLoader.java:179)
              at org.xerial.snappy.SnappyLoader.loadSnappyApi(SnappyLoader.java:154)
              at org.xerial.snappy.Snappy.<clinit>(Snappy.java:47)
              at org.xerial.snappy.SnappyInputStream.readFully(SnappyInputStream.java:145)
              at org.xerial.snappy.SnappyInputStream.readHeader(SnappyInputStream.java:99)
              at org.xerial.snappy.SnappyInputStream.<init>(SnappyInputStream.java:59)
              at org.apache.kafka.common.record.CompressionType$3.wrapForInput(CompressionType.java:90)
              ... 20 more 

              Unassigned Unassigned
              saiello@redhat.com Simone Aiello (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: