问题描述
我正在尝试使用以下命令运行本地集群:
storm local target/myjar.jar com.app.MyMainClass
风暴响应此错误:
WARN o.a.s.s.o.a.z.ClientCnxn - Session 0x0 for server localhost/<unresolved>:2000,unexpected error,closing socket connection and attempting reconnect
java.lang.IllegalArgumentException: Unable to canonicalize address localhost/<unresolved>:2000 because it's not resolvable
at org.apache.storm.shade.org.apache.zookeeper.SaslServerPrincipal.getServerPrincipal(SaslServerPrincipal.java:65) ~[storm-shaded-deps-2.2.0.jar:2.2.0]
at org.apache.storm.shade.org.apache.zookeeper.SaslServerPrincipal.getServerPrincipal(SaslServerPrincipal.java:41) ~[storm-shaded-deps-2.2.0.jar:2.2.0]
at org.apache.storm.shade.org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1001) ~[storm-shaded-deps-2.2.0.jar:2.2.0]
at org.apache.storm.shade.org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1060) [storm-shaded-deps-2.2.0.jar:2.2.0]
当将带Zookeeper,nimbus和超级用户容器的docker化设置用于拓扑时,拓扑将提交正常。在本地运行时,我正在使用Storm的自制软件安装,但到目前为止,我在网上找不到任何类似的问题。
解决方法
在尝试使用STS 4.8.0在新环境中进行调试时,我遇到了相同的错误。使用STS 3.9.10是我的解决方案。