Storm DRPC ERROR: java.lang.RuntimeException: No DRPC servers configured for topology

学习Strom DRPC时,参照

https://github.com/nathanmarz/storm/wiki/Distributed-RPC

进行操作,Local 没问题。

但向Strom Cluster上部署后,执行测试程序无响应。

查看Storm UI,发现有异常:

java.lang.RuntimeException: No DRPC servers configured for topology
    at backtype.storm.drpc.DRPCSpout.

open(DRPCSpout.java:61)
    at backtype.storm.daemon. executor$fn__3985$fn__3997. invoke(executor.clj:460)
    at backtype.storm.util$async_ loop$fn__465.invoke(util.clj: 375)
    at clojure.lang.AFn.run(AFn.java: 24)
    at java.lang.Thread.run(Thread. java:722)


baidu、google后,发现也有人遇到同样的问题,但没有找到解决办法。后经过不断尝试,发现原来是DRPC配置文件问题,需要在所有的Nimbus和Supervisor节点上,都在配置文件上加上DRPC Server的配置,修改后可以执行。


具体步骤如下:

  1. Configure the locations of the DRPC servers, 注意修改所有节点的配置文件。
  2. Launch DRPC server(s) , 启动DRPC server,命令为 "storm drpc"
  3. Submit DRPC topologies to Storm cluster, 和提交普通的topology一样,打好jar包,使用storm jar 提交。需要注意的是,需要在main函数中执行一下代码,将topology提交止remote cluster上:
    StormSubmitter.submitTopology("exclamation-drpc", conf, builder.createRemoteTopology());

测试程序:

      

DRPCClient client = new DRPCClient("xx.xx.xx.xx", 3772);
String result = client.execute("exclamation-drpc", "http://twitter.com");


转载于:https://my.oschina.net/u/2326085/blog/391267

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值