"Error: Key not loaded" in h2o deployed through a K3s cluster, using python3 client

"Error: Key not loaded" in h2o deployed through a K3s cluster, using python3 client

我可以确认 K3s 中 h2o 的 3 副本集群已正确部署,因为在 Python3 解释器中执行 h2o.init(ip="x.x.x.x") 工作正常。我按照此处注明的说明进行操作:https://www.h2o.ai/blog/running-h2o-cluster-on-a-kubernetes-cluster/

尽管如此,我不得不修改 service.yaml 并注释掉 clusterIP: None 的行,因为 K3s 抱怨无法将 clusterIP 设置为 None .但尽管如此,我可以证明它工作正常,并且我能够使用外部 IP 连接到集群。

如果我尝试使用 K3s 集群内的 h2o 集群加载数据集,使用与此处描述的完全相同的步骤 http://docs.h2o.ai/h2o/latest-stable/h2o-docs/automl.html,这是我得到的输出:

>>> train = h2o.import_file("https://s3.amazonaws.com/erin-data/higgs/higgs_train_10k.csv")
...
h2o.exceptions.H2OResponseError: Server error java.lang.IllegalArgumentException:
  Error: Key not loaded: Key<Frame> https://s3.amazonaws.com/erin-data/higgs/higgs_train_10k.csv
  Request: POST /3/ParseSetup
    data: {'check_header': '0', 'source_frames': '["https://s3.amazonaws.com/erin-data/higgs/higgs_train_10k.csv"]'}

如果我使用h2o.upoad_file("x.csv")方法也会出现同样的错误。

关于这里可能发生的事情的线索: but I am not using curl, and I can not find any parameter that could help me overcome this issue: http://docs.h2o.ai/h2o/latest-stable/h2o-py/docs/h2o.html?highlight=import_file#h2o.import_file

由于不同的技术原因,我需要在同一个 K3s 集群中使用 Python 客户端,所以我无法启动,也无法启动 Flow,也无法 Firebug 知道可能发生了什么。

当我使用本地 Java 实例发出 h2o.init() 时,我可以确认它工作正常。

更新 1:

我试过不同的K3s集群都没有成功。我将 service.yaml 更改为 NodePort,现在这是错误回溯:

>>> train = h2o.import_file("https://s3.amazonaws.com/erin-data/higgs/higgs_train_10k.csv")
...
h2o.exceptions.H2OResponseError: Server error java.lang.IllegalArgumentException:
  Error: Job is missing
  Request: GET /3/Jobs/010a2a016132d4ffffffff$_a2366be93ec99a78d7bc161de8c54d67

更新 2:

我尝试过使用不同的服务(NodePort、LoadBalancer、ClusterIP),其中 none 有效。我也尝试过将 Minikube 与官方图像以及我制作的自定义图像一起使用,但没有成功。我怀疑这与 h2o 本身或 pods 之间的集群有关。我会继续挖掘,让我们相信其中会有一些黄金。

更新 3:

我还发现 post 关于 运行 H2O 的 Docker 真的过时了 https://www.h2o.ai/blog/h2o-docker/ nor is working the Dockerfile present at GitHub (I changed it to uncomment the ENTRYPOINT section without success): https://github.com/h2oai/h2o-3/blob/master/Dockerfile

尽管如此,我还是尝试使用我为 h2o-k8s 构建的自定义图像,它在纯 Docker 中无缝运行。我想知道为什么它仍然无法在 K8s 中工作...

更新 4:

我尝试修改名为 H2O_KUBERNETES_SERVICE_DNS 的环境变量,但没有成功。

与此同时,集群开始不可用,即 readinessProbe 无法成功完成。现在不管我怎么改都没用

我在本地启动了一个 K3d 集群以查看发生了什么,令人惊讶的是,使用 v3.30.0.6 readinessProbe 并没有失败。但现在我开始用 R 而不是 Python 来测试它。我很高兴我尝试过,因为我可能已经指出了问题所在。客户端和服务器之间存在版本不匹配。所以我相应地将图像更新为 v3.30.0.1.

但现在又一次,readinessProbe 在我的 k3d 集群中不工作,所以我无法测试它。

看来它现在可以工作了。 R 客户端版本 3.30.0.1 与服务器版本 3.30.0.1。还尝试了 Python 版本 3.30.0.7 和服务器版本 3.30.0.7,它开始工作了。奇妙。问题是由客户端和服务器之间的版本不匹配引起的,因为 python 客户端已更新为 3.30.0.7,而 docker 的最新服务器为 3.30.0.6