节点启动后无法登录 EC2 上的 Spark 集群

节点启动后无法登录 EC2 上的 Spark 集群

我正在尝试创建一个 Spark 机器集群。我按照说明进行操作这里。但是,机器启动后我收到此错误

Setting up security groups...
Searching for existing cluster graph-cluster in region us-east-1...
Spark AMI: ami-35b1885c
Launching instances...
Launched 1 slave in us-east-1a, regid = r-e153a137
Launched master in us-east-1a, regid = r-a352a075
Waiting for AWS to propagate instance metadata...
Waiting for cluster to enter 'ssh-ready' state.............

Warning: SSH connection error. (This could be temporary.)
Host: ec2-54-236-248-xxx.compute-1.amazonaws.com
SSH return code: 255
SSH output: ssh: connect to host ec2-54-236-248-xxx.compute-1.amazonaws.com port 22: Connection refused

.

Warning: SSH connection error. (This could be temporary.)
Host: ec2-54-236-248-xxx.compute-1.amazonaws.com
SSH return code: 255
SSH output: ssh: connect to host ec2-54-236-248-xxx.compute-1.amazonaws.com port 22: Connection refused

.

Warning: SSH connection error. (This could be temporary.)
Host: ec2-54-236-248-xxx.compute-1.amazonaws.com
SSH return code: 255
SSH output: Warning: Permanently added 'ec2-54-236-248-xxx.compute-1.amazonaws.com,54.236.248.xxx' (RSA) to the list of known hosts.
Permission denied (publickey).

.

Warning: SSH connection error. (This could be temporary.)
Host: ec2-54-236-248-xxx.compute-1.amazonaws.com
SSH return code: 255
SSH output: Warning: Permanently added 'ec2-54-236-248-xxx.compute-1.amazonaws.com,54.236.248.xxx' (RSA) to the list of known hosts.
Permission denied (publickey).

我不确定问题出在哪里。 pem 密钥是我从 Amazon 下载的,所以它应该是正确的,并且具有权限600。我在 Amazon 控制台上检查过,机器已经启动。

答案1

我也遇到过这种情况,但等待之后最终连接并完成所有设置。

经过进一步研究后,结果看起来像(来自 Amazon 关于其 Linux 的问答) 在首次启动时,机器会下载并安装关键的安全更新,因此当发生这种情况时,启动可能需要更长时间。

我将修改 ec2 脚本以便它可以与 Ubuntu ami 一起使用 - 现在经过测试,它会尝试使用 yum 而不是 apt-get 执行安装,如果您选择基于 Ubuntu 的 AMI,它最终会失败。

相关内容