在本地集群模式运行Storm-started中的例子时,总是出warn级别的异常
java.net.SocketException: Address family not supported by protocol family: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:500)
at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1050)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1077)
该异常也不影响topology的运行。
去掉这种异常的方式是在执行时,加入jvm参数,明确告诉jvm使用IPv4
-Djava.net.preferIPv4Stack=true