2
試圖發動對EC2集羣星火,得到錯誤「無法確定實例的主機名」(與*
替換敏感者):如何使用spark-ec2解決「無法確定實例的主機名」錯誤?
$ 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
我無法通過SSH進入主因爲沒有公共IPv4。我的AWS_ACCESS_KEY_ID
& AWS_SECRET_ACCESS_KEY
env vars配置正確,並且我的帳戶具有完全權限AFAIK。我如何解決這個錯誤?
編輯1:僅供參考,進入問題https://github.com/amplab/spark-ec2/issues/90
我的子網有一個Internet網關 –