[ https://issues.apache.org/jira/browse/KAFKA-5399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16042619#comment-16042619 ]
Rajini Sivaram commented on KAFKA-5399: --------------------------------------- [~morozov...@gmail.com] Thank you for reporting this. Both ZooKeeper and Kafka catch the exception (from the description), generate warning/error, ignore the error and carry on. Were there other errors in the logs? Did the processes crash or were they hung? And does this happen every time you run nmap? > Crash Kafka & Zookeper with an basic Nmap Scan > ---------------------------------------------- > > Key: KAFKA-5399 > URL: https://issues.apache.org/jira/browse/KAFKA-5399 > Project: Kafka > Issue Type: Bug > Affects Versions: 0.10.2.1 > Environment: OS-X > Reporter: Ivan Morozov > > Kafka running locally on OS-X can be crashed by an nmap scan. The cluster can > not be recovered and have to be restarted. > Reproduce: > 1.Start > ``` > zookeeper-server-start /usr/local/etc/kafka/zookeeper.properties & > kafka-server-start /usr/local/etc/kafka/server.properties > ``` > 2. Run scan > ``` > nmap localhost > ``` > Exceptions from Zookeeper: > ``` > [2017-06-07 17:14:35,913] INFO Accepted socket connection from /0.0.0.80:0 > (org.apache.zookeeper.server.NIOServerCnxnFactory) > [2017-06-07 17:14:35,914] WARN Ignoring exception > (org.apache.zookeeper.server.NIOServerCnxnFactory) > java.net.SocketException: Invalid argument > at sun.nio.ch.Net.setIntOption0(Native Method) > at sun.nio.ch.Net.setSocketOption(Net.java:334) > at sun.nio.ch.SocketChannelImpl.setOption(SocketChannelImpl.java:190) > at sun.nio.ch.SocketAdaptor.setBooleanOption(SocketAdaptor.java:271) > at sun.nio.ch.SocketAdaptor.setTcpNoDelay(SocketAdaptor.java:306) > at > org.apache.zookeeper.server.NIOServerCnxn.<init>(NIOServerCnxn.java:105) > at > org.apache.zookeeper.server.NIOServerCnxnFactory.createConnection(NIOServerCnxnFactory.java:156) > at > org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:197) > at java.lang.Thread.run(Thread.java:748) > [2017-06-07 17:14:35,916] WARN Ignoring unexpected runtime exception > (org.apache.zookeeper.server.NIOServerCnxnFactory) > java.lang.NullPointerException > at > org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:185) > at java.lang.Thread.run(Thread.java:748) > ``` > Exceptions from Kafka: > ``` > [2017-06-07 17:14:17,072] ERROR Error while accepting connection > (kafka.network.Acceptor) > java.net.SocketException: Invalid argument > at sun.nio.ch.Net.setIntOption0(Native Method) > at sun.nio.ch.Net.setSocketOption(Net.java:334) > at > sun.nio.ch.SocketChannelImpl.setOption(SocketChannelImpl.java:190) > at > sun.nio.ch.SocketAdaptor.setBooleanOption(SocketAdaptor.java:271) > at > sun.nio.ch.SocketAdaptor.setTcpNoDelay(SocketAdaptor.java:306) > at kafka.network.Acceptor.accept(SocketServer.scala:344) > at kafka.network.Acceptor.run(SocketServer.scala:283) > at java.lang.Thread.run(Thread.java:748) > ``` -- This message was sent by Atlassian JIRA (v6.3.15#6346)