【问题标题】:Failed to retrieve Ignite pods IP addresses when running spark client运行 spark 客户端时无法检索 Ignite pod IP 地址
【发布时间】:2018-06-19 10:45:51
【问题描述】:

我有一个在 Google Kubernetes Engine 上运行的 ignite 集群。

sudo kubectl get pods NAME READY STATUS RESTARTS AGE ignite-cluster-bbb4f56c4-nrftv 1/1 Running 0 6d ignite-cluster-bbb4f56c4-skvf6 1/1 Running 0 6d

现在我正在尝试使用spark 上的igniteRDD 连接使用this scala 代码。

这是我用来检测 GKE 集群上的 ignite pod 的配置文件。

import org.apache.ignite.configuration.IgniteConfiguration
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi
import org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder

object igniteConf {

  def ignite_configuration: IgniteConfiguration = {
    val spi = new TcpDiscoverySpi
    val ipFinder = new TcpDiscoveryKubernetesIpFinder
    ipFinder.setMasterUrl("https://35.192.214.68")
    ipFinder.setServiceName("ignite")
    spi.setIpFinder(ipFinder)
    val cfg = new IgniteConfiguration
    cfg.setDiscoverySpi(spi)
    cfg
  }

}

在主文件中我这样使用它

val igniteContext = new IgniteContext(sparkContext, () => igniteConf.ignite_configuration, true)

现在我创建一个 jar 并在创建 docker 映像后推送到 Google Container Registry

运行 jar 的命令。

sudo bin/spark-submit --master k8s://https://35.192.214.68 --deploy-mode cluster --name sparkIgnite --class org.blk.igniteSparkResearch.ScalarSharedRDDExample --conf spark.executor.instances=3 --conf spark.app.name=sharedSparkIgnite --conf spark.kubernetes.authenticate.driver.serviceAccountName=ignite --conf spark.kubernetes.container.image=us.gcr.io/nlp-research-198620/ignite-spark:v2 local:///opt/spark/jars/igniteSpark-1.0-SNAPSHOT-jar-with-dependencies.jar

上面的命令创建了 1 个驱动程序和 3 个执行程序。任何 executor 的日志显示它无法连接到 kubernetes 上的 ignite-cluster。

class org.apache.ignite.spi.IgniteSpiException: Failed to retrieve Ignite pods IP addresses

Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://35.192.214.68/api/v1/namespaces/default/endpoints/ignite

谁能告诉我我可能要去哪里。

提前致谢。

【问题讨论】:

标签: apache-spark kubernetes ignite


【解决方案1】:

这是一个已知问题。这是权限相关的。

这是一张 JIRA 票:https://issues.apache.org/jira/browse/IGNITE-8081

您可以在评论中找到有效的配置。

【讨论】:

  • 我认为您分享的链接用于设置 ignite 集群。我已经运行了 ignite 集群,但我的任务是将 spark 客户端/作业连接到 kubernetes 上现有的 ignite 集群。
  • 从您提供的错误中我看到,TcpDiscoveryKubernetesIpFinder 无法检索可用的 Ignite pod 列表。这正是问题所在,在票证中有所描述。
  • 所以我的问题是如何在 Google Kubernetes Engine 上的 spark 应用程序中访问 ignite 集群。所有这些提到的问题只为我的问题提供了部分解决方案。
  • 您提供的代码似乎是合法的。唯一不能让您运行示例的是失败的 IP 查找器。还是您有其他问题?
  • 这是失败的 IP finder 问题。我猜它是由于 RBAC 问题,因为 403 可能只是由于它。
猜你喜欢
  • 2018-11-21
  • 2018-08-21
  • 2011-09-09
  • 1970-01-01
  • 2023-03-16
  • 1970-01-01
  • 2012-11-29
  • 2011-10-04
  • 1970-01-01
相关资源
最近更新 更多