【问题标题】:Fail to connect to master with Spark on Google Compute Engine无法在 Google Compute Engine 上使用 Spark 连接到 master
【发布时间】:2015-04-09 09:23:32
【问题描述】:

我正在通过“启动点击部署软件”功能在 Google Compute Engine 中尝试 hadoop/spark 集群。

我已经创建了 1 个主节点和 2 个从节点,我可以在集群上启动 spark-shell,但是当我想在我的计算机上启动 spark-shell 时,我失败了。

我启动:

./bin/spark-shell --master spark://IP or Hostname:7077

我有这个 stackTrace:

15/04/09 10:58:06 INFO AppClient$ClientActor: Connecting to master
akka.tcp://sparkMaster@IP or Hostname:7077/user/Master...
15/04/09 10:58:06 WARN AppClient$ClientActor: Could not connect to
akka.tcp://sparkMaster@IP or Hostname:7077: akka.remote.InvalidAssociation: Invalid address: akka.tcp://sparkMaster@IP or Hostname:7077
15/04/09 10:58:06 WARN Remoting: Tried to associate with unreachable remote address [akka.tcp://sparkMaster@IP or Hostname:7077]. Address is now gated for 5000 ms, all messages to this address will be delivered to dead letters. Reason: IP or Hostname: unknown error

请告诉我如何解决这个问题。

【问题讨论】:

  • 您需要将7077端口设置为可外部访问。

标签: apache-spark google-compute-engine


【解决方案1】:

请参阅 Daniel Darabos 的评论。默认情况下,除了 SSH、RDP 和 ICMP 之外,所有传入连接都被阻止。为了能够从 Internet 连接到 hadoop 主实例,您必须首先在项目中为“hadoop-master”标签打开端口 7077:

gcloud 计算 --project 项目防火墙规则创建允许火花 \ --允许 TCP:7077 \ --target-tags hadoop-master

有关更多详细信息和所有可能性,请参阅 GCE 公共文档中的 Firewalls、Adding a firewall 和 gcloud compute firewall-rules create。

【讨论】:

  • 我刚刚做了一个hadoop集群,默认情况下它允许集群内所有端口的连接。
猜你喜欢
  • 2020-09-25
  • 1970-01-01
  • 2017-01-23
  • 1970-01-01
  • 2017-06-29
  • 2020-12-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多