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

kafka process should exit when it encounters "java.io.IOException: Too many open files"

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.10.2.1
    • Fix Version/s: None
    • Component/s: admin, network
    • Labels:
      None

      Description

      Our kafka cluster encountered a few disk/xfs failures in the cloud vm instances. When a disk/xfs failure happens, kafka process did not exit gracefully. Instead, it ran into  "<defunct>" status, with port 9092 still be reachable. when failures like this happens, kafka should shutdown all threads and exit. The following is the kafka logs when the failure happens:

      [2018-02-08 12:52:31,764] ERROR Error while accepting connection (kafka.network.Acceptor)
      java.io.IOException: Too many open files
              at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
              at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:422)
              at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250)
              at kafka.network.Acceptor.accept(SocketServer.scala:340)
              at kafka.network.Acceptor.run(SocketServer.scala:283)
              at java.lang.Thread.run(Thread.java:748)
      [2018-02-08 12:52:31,772] ERROR Error while accepting connection (kafka.network.Acceptor)
      java.io.IOException: Too many open files
              at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
              at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:422)
              at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250)
              at kafka.network.Acceptor.accept(SocketServer.scala:340)
              at kafka.network.Acceptor.run(SocketServer.scala:283)
              at java.lang.Thread.run(Thread.java:748)
      [2018-02-08 12:52:31,772] ERROR Error while accepting connection (kafka.network.Acceptor)
      java.io.IOException: Too many open files
              at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
              at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:422)
              at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250)
              at kafka.network.Acceptor.accept(SocketServer.scala:340)
              at kafka.network.Acceptor.run(SocketServer.scala:283)
              at java.lang.Thread.run(Thread.java:748)
       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              yuyang09 Yu Yang
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: