Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-6982

java.lang.ArithmeticException: / by zero

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.1.0
    • 1.1.1
    • network
    • None
    • Environment: Windows 10. 
    • Important

    Description

      Producer keeps sending messages to Kafka, Kafka is down. 

      Server.log shows: 

      ......

      [2018-06-01 17:01:33,945] WARN [Log partition=__consumer_offsets-6, dir=D:\data\Kafka\kafka-logs] Found a corrupted index file corresponding to log file D:\data\Kafka\kafka-logs_consumer_offsets-6\00000000000000000000.log due to Corrupt index found, index file (D:\data\Kafka\kafka-logs_consumer_offsets-6\00000000000000000000.index) has non-zero size but the last offset is 0 which is no greater than the base offset 0.}, recovering segment and rebuilding index files... (kafka.log.Log)
      [2018-06-01 17:01:33,945] WARN [Log partition=__consumer_offsets-6, dir=D:\data\Kafka\kafka-logs] Found a corrupted index file corresponding to log file D:\data\Kafka\kafka-logs_consumer_offsets-6\00000000000000000000.log due to Corrupt index found, index file (D:\data\Kafka\kafka-logs_consumer_offsets-6\00000000000000000000.index) has non-zero size but the last offset is 0 which is no greater than the base offset 0.}, recovering segment and rebuilding index files... (kafka.log.Log)
      [2018-06-01 17:01:34,664] ERROR Error while accepting connection (kafka.network.Acceptor)
      java.lang.ArithmeticException: / by zero
      at kafka.network.Acceptor.run(SocketServer.scala:354)
      at java.lang.Thread.run(Thread.java:748)
      [2018-06-01 17:01:34,664] ERROR Error while accepting connection (kafka.network.Acceptor)
      java.lang.ArithmeticException: / by zero
      at kafka.network.Acceptor.run(SocketServer.scala:354)
      at java.lang.Thread.run(Thread.java:748)
      [2018-06-01 17:01:34,664] ERROR Error while accepting connection (kafka.network.Acceptor)
      java.lang.ArithmeticException: / by zero
      at kafka.network.Acceptor.run(SocketServer.scala:354)
      at java.lang.Thread.run(Thread.java:748)

      ......

       

      This line of code in SocketServer.scala causing the error: 

                         currentProcessor = currentProcessor % processors.size

       

       

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wadewu wade wu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: