在伪群集服务器

时间:2016-08-30 13:00:49

标签: apache-storm

我在一台服务器上安装风暴。我非常确定zookeeper,nimbus,supervisor和ui服务都运行正常,因为我可以看到这些进程,也可以从浏览器中查看UI。 风暴java代码可以按预期在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 - 获得AutoCreds []   线程" main"中的例外情况java.lang.RuntimeException:org.apache.storm.thrift.transport.TTransportException       在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.TTransportException       在org.apache.storm.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)       在org.apache.storm.thrift.transport.TTransport.readAll(TTransport.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.TTransport.readAll(TTransport.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_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 个答案:

答案 0 :(得分:0)

此问题实际上是由用于运行风暴守护程序的帐户引起的。当您将拓扑部署到群集时,请确保用于运行风暴守护程序的帐户/用户具有对该文件夹的足够访问权限(storm.local.dir:" / home / storm"你在storm.yaml文件中创建的。还有日志文件夹。