Google Dataproc-无法通过SSH连接

时间:2018-07-01 00:20:10

标签: google-compute-engine google-cloud-dataproc google-cloud-datalab

我按照official documentation

中列出的说明在Cloud Dataproc集群上安装了Cloud Datalab笔记本

创建集群后,我随后创建了一个到Cloud Shell中主节点的SSH隧道,并使用Cloud Shell连接到集群接口。 Instructions。之后,我可以访问Jupyter笔记本。我使用了-v的详细选项来查看SSH连接日志:

gcloud compute ssh cluster-datalab-m --project=abcxyz-123 --zone us-west1-a \
    -- -v -4 -N -L 8080:cluster-datalab-m:8080

但是一段时间后,我弹出窗口说“无法建立与笔记本服务器的连接。笔记本将继续尝试重新连接。请检查您的网络连接或笔记本服务器配置。”并且我的集群停止响应任何命令。

当我查看Cloud Shell上的SSH输出时,我发现此时正在请求多个通道。

仅在断点期间预览SSH日志:

debug1: channel 1: new [direct-tcpip]
debug1: Connection to port 8080 forwarding to cluster-datalab-m port 8080 requested.
debug1: channel 2: new [direct-tcpip]
debug1: channel 1: free: direct-tcpip: listening port 8080 for cluster-datalab-m port 8080, connect from 127.0.0.1 port 52832 to 127.0.0.1 port 8080, nchannels 3
debug1: channel 2: free: direct-tcpip: listening port 8080 for cluster-datalab-m port 8080, connect from 127.0.0.1 port 52833 to 127.0.0.1 port 8080, nchannels 2
debug1: Connection to port 8080 forwarding to cluster-datalab-m port 8080 requested.
debug1: channel 1: new [direct-tcpip]
debug1: Connection to port 8080 forwarding to cluster-datalab-m port 8080 requested.
debug1: channel 2: new [direct-tcpip]
debug1: channel 2: free: direct-tcpip: listening port 8080 for cluster-datalab-m port 8080, connect from 127.0.0.1 port 52837 to 127.0.0.1 port 8080, nchannels 3
debug1: Connection to port 8080 forwarding to cluster-datalab-m port 8080 requested.
debug1: channel 2: new [direct-tcpip]
debug1: Connection to port 8080 forwarding to cluster-datalab-m port 8080 requested.
debug1: channel 3: new [direct-tcpip]
debug1: Connection to port 8080 forwarding to cluster-datalab-m port 8080 requested.
debug1: channel 4: new [direct-tcpip]
debug1: Connection to port 8080 forwarding to cluster-datalab-m port 8080 requested.
debug1: channel 5: new [direct-tcpip]
debug1: Connection to port 8080 forwarding to cluster-datalab-m port 8080 requested.
debug1: channel 6: new [direct-tcpip]
debug1: Connection to port 8080 forwarding to cluster-datalab-m port 8080 requested.

我手动关闭了该SSH连接,然后尝试通过单击Compute Engine控制台上的SSH按钮将SSH SSH到主节点,但是即使那样也要花费很多时间,并且没有成功完成。

我查看了这个stackoverflow question,但在主节点中找不到任何/etc/sshguard文件夹,因此我认为这不是我的问题。主节点正在运行Debian 8.10。

有什么方法可以确保SSH连接(和Jupyter笔记本)连续工作?

1 个答案:

答案 0 :(得分:1)

我们已经在cluster web interfaces上更新了文档。使用云外壳适用于Datalab,但不适用于Jupyter。 Cloud Shell Preview仅支持HTTP,但是Jupyter使用websocket。

相反,您应该遵循instructions来设置SOCKS代理并将Chrome指向它。有一个方便的bash script叫做launch-jupyter-interface.sh,可以为您执行此操作。您只需要修改它即可指向您的Chrome安装。

Jupyter tutorial也提到使用该脚本。