尝试在 EC2 上启动 Spark 集群,出现错误“无法确定实例的主机名”(将敏感信息替换为*
):
$ spark-ec2 --vpc-id=vpc-* --subnet-id=subnet-* --slaves=1 --key-pair=* --identity-file=/Users/matthew/.ssh/* --instance-type=m3.large --master-instance-type=m3.large --region=us-east-1 --zone=us-east-1d --spark-version=2.0.2 --spark-ec2-git-branch=branch-2.0 launch spark-test
Setting up security groups...
Searching for existing cluster spark-test in region us-east-1...
Spark AMI: ami-35b1885c
Launching instances...
Launched 1 slave in us-east-1d, regid = r-0e02da15c115f6da2
Launched master in us-east-1d, regid = r-0d0f08c5f2a46a1df
Waiting for AWS to propagate instance metadata...
Applying tags to master nodes
Applying tags to slave nodes
Waiting for cluster to enter 'ssh-ready' state...........
Error:
Failed to determine hostname of Instance:i-0909d1ed1af09cd09.
Please check that you provided --private-ips if necessary
由于没有公共 ipv4,我无法 ssh 进入主服务器。我的AWS_ACCESS_KEY_ID
& AWS_SECRET_ACCESS_KEY
env vars 配置正确,我的帐户具有完全权限,AFAIK。如何解决此错误?
编辑 1:仅供参考,输入问题https://github.com/amplab/spark-ec2/issues/90