【问题标题】:Can't connect to Spark running in Kubernetes from Java无法从 Java 连接到在 Kubernetes 中运行的 Spark
【发布时间】:2018-03-19 11:44:51
【问题描述】:

我已经安装了 Kuberenetes(适用于 Windows 10 的 minikube)并使用 helm 添加了 Spark:

.\helm.exe install --name spark-test stable/spark

然后我暴露了 Spark 主端口 7077 使用

.\kubectl.exe expose deployment spark-test-master --port=7070 --name=spark-master-ext --type=NodePort

例如,我的 UI 在 http://<MINIKUBE_IP>:31905/ 上运行,并且 spark master 暴露于 :32473。为了检查,我这样做:

.\minikube-windows-amd64.exe service spark-master-ext

但是当我使用 Java 时:

SparkConf conf = new SparkConf().setMaster("spark://192.168.1.168:32473").setAppName("Data Extractor");

我有:

18/03/19 13:57:29 WARN AppClient$ClientEndpoint: Could not connect to 192.168.1.168:32473: akka.remote.EndpointAssociationException: Association failed with [akka.tcp://sparkMaster@192.168.1.168:32473]
18/03/19 13:57:29 WARN ReliableDeliverySupervisor: Association with remote system [akka.tcp://sparkMaster@192.168.1.168:32473] has failed, address is now gated for [5000] ms. Reason: [Association failed with [akka.tcp://sparkMaster@192.168.1.168:32473]] Caused by: [Connection refused: no further information: /192.168.1.168:32473]
18/03/19 13:57:29 WARN AppClient$ClientEndpoint: Failed to connect to master 192.168.1.168:32473
akka.actor.ActorNotFound: Actor not found for: ActorSelection[Anchor(akka.tcp://sparkMaster@192.168.1.168:32473/), Path(/user/Master)]

任何想法,如何在 Minikube 中运行的 Spark 上运行 Java Spark 作业?

【问题讨论】:

    标签: java apache-spark kubernetes remote-access remote-server


    【解决方案1】:

    看起来 Spark 的 Helm 图表确实过时了(1.5.1),所以我在本地安装了 2.3.0,它运行没有任何问题。案件结案,对不起:)

    【讨论】:

      猜你喜欢
      • 2020-09-12
      • 2021-01-04
      • 2016-04-25
      • 2022-10-19
      • 2021-11-10
      • 2022-11-24
      • 2016-06-03
      • 2017-06-03
      • 1970-01-01
      相关资源
      最近更新 更多