简体   繁体   English

无法在群集中使用SSH Dataproc Master

[英]Cannot SSH Dataproc Master in Cluster

I've been trying to create a cluster in Dataproc using as initialization script the jupyter repository . 我一直在尝试使用jupyter存储库作为初始化脚本在Dataproc中创建集群。

But when I try to ssh to the master so to be able to access the Jupyter interface running this command: 但是当我尝试SSH到master以便能够访问运行以下命令的Jupyter接口时:

gcloud compute ssh --zone=zone_name \
                   --ssh-flag="-D 10000" \
                   --ssh-flag="-N" \
                   --ssh-flag="-n" "cluster1-m" &

I get the error: 我得到错误:

Permission denied (publickey). 权限被拒绝(公钥)。 ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255]. 错误:(gcloud.compute.ssh)[/ usr / bin / ssh]退出,返回码为[255]。

I could confirm that all ssh keys are created normally. 我可以确认所有ssh密钥都是正常创建的。 I tried this other option then: 然后我尝试了这个其他选项:

gcloud compute ssh --zone=zone_name \
                   --ssh-flag="-D 10000" \
                   --ssh-flag="-N" \
                   --ssh-flag="-n" "will@cluster1-m" &

Which seems to work as I can ssh into the instance but now I get the error: 我可以通过ssh进入实例,这似乎可行,但是现在出现错误:

bind: Cannot assign requested address channel_setup_fwd_listener_tcpip: cannot listen to port: 10000 Could not request local forwarding. 绑定:无法分配请求的地址channel_setup_fwd_listener_tcpip:无法侦听端口:10000无法请求本地转发。

For creating the cluster I used: 为了创建集群,我使用了:

gcloud dataproc clusters create $CLUSTER_NAME \
--metadata "JUPYTER_PORT=8124,JUPYTER_CONDA_PACKAGES=numpy:pandas:scikit-learn:jinja2:mock:pytest:pytest-cov" \
--initialization-actions \
    gs://dataproc-initialization-actions/jupyter/jupyter.sh \
--bucket $BUCKET_NAME

and I'm running this in a docker image Debian 8.9 (jessie). 我正在docker镜像Debian 8.9(jessie)中运行它。

If you need any extra information please let me know. 如果您需要任何其他信息,请告诉我。

If you verified you can do a normal SSH into the cluster, then if you're just getting the bind: Cannot assign requested address error it probably means you have another SSH session with local port forwarding already on your current machine using port 10000 already. 如果您确认可以对群集执行普通的SSH,那么如果您刚刚获得bind: Cannot assign requested address错误,则可能意味着您在当前计算机上已经使用端口10000了另一个SSH会话,其中本地端口转发已经存在。 If you see the bind error, you should always first try a different local port, like -D 12345 . 如果看到bind错误,则应始终首先尝试其他本地端口,例如-D 12345 You can use top or your task manager to check if you have a hanging ssh -D command somewhere still running and occupying port 10000. 您可以使用top或任务管理器来检查在某个仍在运行且占用端口10000的地方是否悬挂了ssh -D命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM