我在一台服务器上安装storm。我很确定zookeeper、nimbus、supervisor和ui服务都正常运行,因为我可以看到这些进程,也可以从浏览器查看ui。StormJava代码可以像预期的那样在eclipse中运行,您可以参考下面的代码来找出本地模式和远程模式的区别。
if(args.length == 0)
{
LocalCluster cluster = new LocalCluster();
cluster.submitTopology(TOPOLOGY_NAME, config, builder.createTopology());
Utils.waitForSeconds(10);
cluster.killTopology(TOPOLOGY_NAME);
cluster.shutdown();
}
else{
StormSubmitter.submitTopology(args[0], config, builder.createTopology());
}
但不幸的是,当我将jar文件部署到一台服务器时,出现了下面的错误。
1797[main]info o.a.s.s.a.authutils-在线程“main”java.lang.runtimeexception中获得autocreds[]异常:org.apache.storm.thrift.transport.tttransportexception位于org.apache.storm.stormsubmitter.submitjaras(stormsubmitter)。java:439)在org.apache.storm.stormsubmitter.submittopologyas(stormsubmitter。java:236)在org.apache.storm.stormsubmitter.submittopology(stormsubmitter。java:311)在org.apache.storm.stormsubmitter.submittopology(stormsubmitter。java:157)在storm.blueprints.chapter1.v3.wordcounttopology.main(wordcounttopology。java:39)原因:org.apache.storm.thrift.transport.ttTransportException atorg.apache.storm.thrift.transport.tiostreamtransport.read(tiostreamtransport。java:132)在org.apache.storm.thrift.transport.tttransport.readall(tttransport。java:86)在org.apache.storm.thrift.transport.tframedtransport.readframe(tframedtransport。java:129)在org.apache.storm.thrift.transport.tframedtransport.read(tframedtransport。java:101)在org.apache.storm.thrift.transport.tttransport.readall(tttransport。java:86)在org.apache.storm.thrift.protocol.tbinaryprotocol.readall(tbinaryprotocol。java:429)在org.apache.storm.thrift.protocol.tbinaryprotocol.readi32(tbinaryprotocol。java:318)在org.apache.storm.thrift.protocol.tbinaryprotocol.readmessagebegin(tbinaryprotocol。java:219)在org.apache.storm.thrift.tserviceclient.receivebase(tserviceclient。java:77)在org.apache.storm.generated.nimbus$client.recv\u beginfileupload(nimbus。java:1007)在org.apache.storm.generated.nimbus$client.beginfileupload(nimbus。java:995)在org.apache.storm.stormsubmitter.submitjaras(stormsubmitter。java:410) ... 4个以上
我用于部署的命令如下:
/usr/share/storm/bin/storm jar ./storm-sample1-0.0.1-SNAPSHOT.jar storm.blueprints.chapter1.v3.WordCountTopology word-count
1条答案
按热度按时间sshcrbum1#
这个问题实际上是由用于运行风暴守护进程的帐户引起的。将拓扑部署到集群时,请确保用于运行storm守护程序的帐户/用户对您在storm.yaml文件中创建的文件夹(storm.local.dir:“/home/storm”)具有足够的访问权限。还有日志文件夹。