【问题标题】:NimbusLeaderNotFoundException in Apache Storm UIApache Storm UI 中的 NimbusLeaderNotFoundException
【发布时间】:2020-05-11 19:31:37
【问题描述】:

我正在尝试为流应用程序启动 Storm ui,但是我经常收到此错误:

org.apache.storm.utils.NimbusLeaderNotFoundException: Could not find leader nimbus from seed hosts [localhost]. Did you specify a valid list of nimbus hosts for config nimbus.seeds?
    at org.apache.storm.utils.NimbusClient.getConfiguredClientAs(NimbusClient.java:250)
    at org.apache.storm.utils.NimbusClient.getConfiguredClientAs(NimbusClient.java:179)
    at org.apache.storm.utils.NimbusClient.getConfiguredClient(NimbusClient.java:138)
    at org.apache.storm.daemon.ui.resources.StormApiResource.getClusterConfiguration(StormApiResource.java:116)

我已经使用storm脚本在本地启动了storm,用于启动nimbus、提交jar和轮询ui。可能是什么原因?

这是连接设置的代码:

 val cluster = new LocalCluster()
    val bootstrapServers = "localhost:9092"
    val spoutConfig = KafkaTridentSpoutConfig.builder(bootstrapServers, "tweets")
      .setProp(props)
      .setFirstPollOffsetStrategy(FirstPollOffsetStrategy.LATEST)
      .build()

  val config = new Config()
    cluster.submitTopology("kafkaTest", config, tridentTopology.build())

【问题讨论】:

  • 您能详细说明您要做什么吗?您想使用 LocalCluster 在内存中运行 Storm,还是想使用“storm jar”命令将拓扑提交到已经运行的 Storm 集群?
  • 我将它作为本地应用程序运行,但它不允许访问 Storm UI,所以我将它打包成一个 jar 文件并提交给 Storm 集群。

标签: scala user-interface apache-kafka apache-storm


【解决方案1】:

当您使用storm jar 提交到真实集群时,您不应使用 LocalCluster。而是使用StormSubmitter 类。

您遇到的错误是在本地主机上找不到 Nimbus。您确定 Nimbus 正在运行 storm jar 的机器上运行吗?如果是这样,请发布您正在运行的命令,也许还检查 Nimbus 日志。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-22
    • 1970-01-01
    • 2019-09-03
    • 1970-01-01
    • 1970-01-01
    • 2019-01-28
    相关资源
    最近更新 更多