尝试在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。我的AWS_ACCESS_KEY_ID
& AWS_SECRET_ACCESS_KEY
env vars配置正确,我的帐户拥有完整权限AFAIK。如何解决此错误?
编辑1:仅供参考,输入问题https://github.com/amplab/spark-ec2/issues/90
答案 0 :(得分:0)
当我进入私有子网(没有互联网网关的子网)时,我遇到了这个问题。一种解决方案是确保它是公共子网。还必须在子网中启用“自动分配公共IP”。
如果你想要一个私有子网,你可以尝试使用--private-ips标志,虽然我没试过。