首页 > 代码库 > 运行topology出现错误

运行topology出现错误

详细如下:

1165 [main] INFO backtype.storm.daemon.nimbus - Using default scheduler
1186 [main] INFO com.netflix.curator.framework.imps.CuratorFrameworkImpl - Starting
1198 [main-SendThread(localhost:2000)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.SocketException: Address family not supported by protocol family: connect




 解决方法:

  1. ping localhost,如果没有正确回应把hosts文件配置一下试试!

  2. 运行main class的时候添加“-Djava.net.preferIPv4Stack=true”参数试试!