You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Yu Yang (JIRA)" <ji...@apache.org> on 2018/02/08 19:51:00 UTC

[jira] [Updated] (KAFKA-6544) kafka process should exit when it encounters "java.io.IOException: Too many open files"

     [ https://issues.apache.org/jira/browse/KAFKA-6544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yu Yang updated KAFKA-6544:
---------------------------
    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:

{code:java}
[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)
 {code}

  was:
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 run 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:

{code:java}
[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)
 {code}


> kafka process should exit when it encounters "java.io.IOException: Too many open files"  
> -----------------------------------------------------------------------------------------
>
>                 Key: KAFKA-6544
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6544
>             Project: Kafka
>          Issue Type: Bug
>          Components: admin, network
>    Affects Versions: 0.10.2.1
>            Reporter: Yu Yang
>            Priority: Major
>
> 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:
> {code:java}
> [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)
>  {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)