java.util.ConcurrentModificationException: KafkaConsumer is not safe for multi-threaded access

Google Groups | Saravanan Tirugnanum | 4 months ago
  1. 0

    Clarification on Kafka Connect running in distributed mode - Production

    Google Groups | 4 months ago | Saravanan Tirugnanum
    java.util.ConcurrentModificationException: KafkaConsumer is not safe for multi-threaded access
  2. 0

    Intermittent failure of Kafka integration tests

    GitHub | 8 months ago | jamesnetherton
    java.util.ConcurrentModificationException: KafkaConsumer is not safe for multi-threaded access
  3. 0

    ConsoleConsumer throws ConcurrentModificationException on termination. ST: {code} Exception in thread "Thread-1" java.util.ConcurrentModificationException: KafkaConsumer is not safe for multi-threaded access at org.apache.kafka.clients.consumer.KafkaConsumer.acquire(KafkaConsumer.java:1169) at org.apache.kafka.clients.consumer.KafkaConsumer.close(KafkaConsumer.java:1087) at kafka.consumer.NewShinyConsumer.close(BaseConsumer.scala:50) at kafka.tools.ConsoleConsumer$$anon$1.run(ConsoleConsumer.scala:74) {code} Other thread which constantly tries to consume is {code} "main" prio=10 tid=0x00007f3aa800c000 nid=0x1314 runnable [0x00007f3aae37d000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method) at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269) at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:79) at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87) - locked <0x00000000dd1df130> (a sun.nio.ch.Util$2) - locked <0x00000000dd1df120> (a java.util.Collections$UnmodifiableSet) - locked <0x00000000dd0af720> (a sun.nio.ch.EPollSelectorImpl) at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:98) at org.apache.kafka.common.network.Selector.select(Selector.java:440) at org.apache.kafka.common.network.Selector.poll(Selector.java:263) at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:221) at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.clientPoll(ConsumerNetworkClient.java:274) at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:182) at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:172) at org.apache.kafka.clients.consumer.KafkaConsumer.pollOnce(KafkaConsumer.java:779) at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:730) at kafka.consumer.NewShinyConsumer.receive(BaseConsumer.scala:43) at kafka.tools.ConsoleConsumer$.process(ConsoleConsumer.scala:87) at kafka.tools.ConsoleConsumer$.run(ConsoleConsumer.scala:54) at kafka.tools.ConsoleConsumer$.main(ConsoleConsumer.scala:39) at kafka.tools.ConsoleConsumer.main(ConsoleConsumer.scala) {code}

    Apache's JIRA Issue Tracker | 1 year ago | Ashish K Singh
    java.util.ConcurrentModificationException: KafkaConsumer is not safe for multi-threaded access
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    HDFS Connector consumed 400K+ messages before throwing CommitFailedException - no output file!

    Google Groups | 11 months ago | Uday Menon
    java.util.ConcurrentModificationException: KafkaConsumer is not safe for multi-threaded access
  6. 0

    Kafka, mail # user - Re: Kafka Connect tasks consumers issue - 2016-05-11, 09:41

    search-hadoop.com | 3 months ago
    java.util.ConcurrentModificationException: KafkaConsumer is not safe for multi-threaded access at org.apache.kafka.clients.consumer.KafkaConsumer.acquire(KafkaConsumer.java:1282) at org.apache.kafka.clients.consumer.KafkaConsumer.close(KafkaConsumer.java:1213) at org.apache.kafka.connect.runtime.WorkerSinkTask.close(WorkerSinkTask.java:128)

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.util.ConcurrentModificationException

      KafkaConsumer is not safe for multi-threaded access

      at org.apache.kafka.clients.consumer.KafkaConsumer.acquire()
    2. Apache Kafka
      KafkaConsumer.close
      1. org.apache.kafka.clients.consumer.KafkaConsumer.acquire(KafkaConsumer.java:1282)
      2. org.apache.kafka.clients.consumer.KafkaConsumer.close(KafkaConsumer.java:1213)
      2 frames
    3. org.apache.kafka
      DistributedHerder.run
      1. org.apache.kafka.connect.runtime.WorkerSinkTask.close(WorkerSinkTask.java:128)
      2. org.apache.kafka.connect.runtime.Worker.stopTask(Worker.java:313)
      3. org.apache.kafka.connect.runtime.distributed.DistributedHerder$14.onRevoked(DistributedHerder.java:898)
      4. org.apache.kafka.connect.runtime.distributed.WorkerCoordinator.onJoinPrepare(WorkerCoordinator.java:238)
      5. org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureActiveGroup(AbstractCoordinator.java:209)
      6. org.apache.kafka.connect.runtime.distributed.WorkerGroupMember.poll(WorkerGroupMember.java:144)
      7. org.apache.kafka.connect.runtime.distributed.DistributedHerder.tick(DistributedHerder.java:266)
      8. org.apache.kafka.connect.runtime.distributed.DistributedHerder.run(DistributedHerder.java:159)
      8 frames
    4. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame