Bootstrap 尝试在 EMR 上安装 Spark 时失败

Bootstrap Failure when trying to install Spark on EMR

我正在使用这个 link 在 EMR(Amazon 上的 Elastic Map Reduce)上安装 Spark Cluster https://aws.amazon.com/articles/Elastic-MapReduce/4926593393724923

为了创建一个 Spark 集群,我 运行 以下命令和我的集群每次都 运行 进入 bootstrap 故障。我无法解决这个问题,如果有人能帮到我就太好了。

aws emr create-cluster --name SparkCluster --ami-version 3.2 \
--instance-type m3.xlarge --instance-count 3 --ec2-attributes \
KeyName=MYKEY --applications Name=Hive --bootstrap-actions \
Path=s3://support.elasticmapreduce/spark/install-spark

已解决:使用这个:

aws emr create-cluster --name SparkCluster --ami-version 3.7 \
--instance-type m3.xlarge --instance-count 3 --service-role \
EMR_DefaultRole --ec2-attributes \
KeyName=emr,InstanceProfile=EMR_EC2_DefaultRole \
--applications Name=Hive --bootstrap-actions \
Path=s3://support.elasticmapreduce/spark/install-spark 

您提供的 link 部分 Spark with YARN on an Amazon EMR cluster 下的 4th 点说明如下:

Substitute "MYKEY" value for the KeyName parameter with the name of the EC2 key pair you want to use to SSH into the master node of your EMR cluster.

据我所知,您还没有为自己的 EC2 密钥名称更改 MYKEY 的值。您应该尝试将其值更改为您已经创建的现有 EC2 密钥名称。

如果您仍然没有密钥对,您可以按照以下几种方法创建,其中一种在 link.

中有所描述

更新(来自下面的评论)

从你的图片来看,从 S3 下载 bootstrap 动作文件似乎有问题。我不确定问题的原因可能是什么,但您可能想要更改 AMI 并使用不同的 AMI 版本启动 EMR,例如 3.0

在给定用户的 SSH 密钥和 IAM 角色的情况下,对该用户有效的答案摘要(在评论中需要一些来回):

aws emr create-cluster --name SparkCluster --ami-version 3.7 --instance-type m3.xlarge --instance-count 3 --service-role EMR_DefaultRole --ec2-attributes KeyName=emr,InstanceProfile=EMR_EC2_DefaultRole --applications Name=Hive --bootstrap-actions Path=s3://support.elasticmapreduce/spark/install-spark

有关 EMR IAM 角色的说明可在 http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-iam-roles-creatingroles.html and http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-iam-roles-launch-jobflow.html

中找到

还有一种方法可以直接在EMR中启动spark集群。

第 1 步 - 转到 aws 中的 EMR 部分,然后单击创建集群。

第 2 步 - 转到配置中的 bootstrap 操作并添加此行 s3://support.elasticmapreduce/spark/install-spark https://www.pinterest.com/pin/429953095652701745/

第 3 步 - 单击创建集群

您的集群将在几分钟内启动 :)