【问题标题】:Google Dataproc initialization script error File not FoundGoogle Dataproc 初始化脚本错误 File not Found
【发布时间】:2016-08-15 22:02:40
【问题描述】:

我正在使用 Google Dataproc 来初始化 Jupyter 集群。 起初我使用了 github 中的“dataproc-initialization-actions”,它的工作原理非常棒。

这是文档中可用的创建集群调用:

gcloud dataproc clusters create my-dataproc-cluster \
    --metadata "JUPYTER_PORT=8124" \
    --initialization-actions \
        gs://dataproc-initialization-actions/jupyter/jupyter.sh \
    --bucket my-dataproc-bucket \
    --num-workers 2 \
    --properties spark:spark.executorEnv.PYTHONHASHSEED=0,spark:spark.yarn.am.memory=1024m \
    --worker-machine-type=n1-standard-4 \
    --master-machine-type=n1-standard-4

但我想自定义它,所以我得到了初始化文件并将其保存在我的 Google 存储中(即在我尝试创建集群的同一个项目下)。因此,我将调用改为指向我的脚本,如下所示:

gcloud dataproc clusters create my-dataproc-cluster \
    --metadata "JUPYTER_PORT=8124" \
    --initialization-actions \
        gs://myjupyterbucketname/jupyter.sh \
    --bucket my-dataproc-bucket \
    --num-workers 2 \
    --properties spark:spark.executorEnv.PYTHONHASHSEED=0,spark:spark.yarn.am.memory=1024m \
    --worker-machine-type=n1-standard-4 \
    --master-machine-type=n1-standard-4

但是运行这个我得到了以下错误:

Waiting on operation [projects/myprojectname/regions/global/operations/cf20
466c-ccb1-4c0c-aae6-fac0b99c9a35].
Waiting for cluster creation operation...done.
ERROR: (gcloud.dataproc.clusters.create) Operation [projects/myprojectname/
regions/global/operations/cf20466c-ccb1-4c0c-aae6-fac0b99c9a35] failed: Multiple
 Errors:
 - Google Cloud Dataproc Agent reports failure. If logs are available, they can
be found in 'gs://myjupyterbucketname/google-cloud-dataproc-metainfo/231e5160-75f3-
487c-9cc3-06a5918b77f5/my-dataproc-cluster-m'.
 - Google Cloud Dataproc Agent reports failure. If logs are available, they can
be found in 'gs://myjupyterbucketname/google-cloud-dataproc-metainfo/231e5160-75f3-
487c-9cc3-06a5918b77f5/my-dataproc-cluster-w-1'..

好吧,文件在那里,所以我认为它可能不是一些访问权限问题。名为“dataproc-initialization-script-0_output”的文件内容如下:

/usr/bin/env: bash: No such file or directory

有什么想法吗?

【问题讨论】:

  • 这可能是因为初始化脚本位于运行集群的项目无法访问的 Cloud Storage 存储桶中。您能否尝试运行“gcloud dataproc clusters diagnostic my-dataproc-cluster”并与 dataproc-feedback@google.com 共享生成的压缩包
  • 会做的,谢谢

标签: shell google-cloud-dataproc


【解决方案1】:

嗯,找到了我的答案here

原来脚本有 windows 行尾而不是 unix 行尾。

使用dos2unix 进行了在线转换,现在运行良好。

@tix 的帮助下,我可以检查是否可以使用与集群的 SSH 连接访问该文件(成功"gsutil cat gs://myjupyterbucketname/jupyter.sh"

并且,初始化文件已正确保存在本地目录"/etc/google-dataproc/startup-scripts/dataproc-initialization-script-0"

【讨论】:

  • 我真的认为谷歌应该解决这个问题并且不要产生这种误导性的错误信息:(
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-02-16
  • 1970-01-01
  • 1970-01-01
  • 2018-09-06
  • 1970-01-01
  • 1970-01-01
  • 2016-08-21
相关资源
最近更新 更多