无法创建隧道并连接到jupyter接口

问题描述 投票:0回答:2

我正在创建一个ssh隧道,并配置浏览器连接到谷歌云数据交换机中的笔记本界面,我通过putty创建隧道,它可以工作,但是当我打开url http://clustername-m:port时,它显示需要太长时间和超时。

感谢帮助!

ssh google-cloud-platform jupyter-notebook google-cloud-dataproc
2个回答
1
投票

如果您正在使用PuTTY,那么如果您打算使用类似的主机名,您需要确保在PuTTY UI中正确设置dynamic port forwarding。您可能还需要强制您的浏览器执行DNS resolution on the proxy host

--host-resolver-rules='MAP * 0.0.0.0, EXCLUDE localhost'

最后,如果您使用Jupyter或Zeppelin将Dataproc Component GatewayDataproc Optional Components一起使用,您可能会发现它更容易,然后您根本不需要设置任何SSH隧道来使用UI。请记住,目前,Component Gateway仅在Alpha中,因此在可靠性方面可能会出现错误。


0
投票

谢谢丹尼斯。

我启用了Dataproc可选组件,在“web界面”选项下,没有“jupyter notebook”,我试图打开“纱线资源管理器”但得到“错误505(网关超时)”

web interface options

我再次尝试了ssh隧道,我发现问题是当我使用脚本打开隧道时,它没有连接到服务器,它只是显示在下面,没有成功连接。

Using username "xxxx". 
Authenticating with public key "xxxx"

我可以通过putty创建隧道,但是当我使用下面的脚本连接它时会出现错误“系统无法找到指定的路径”

/usr/bin/google-chrome ^
--proxy-server="socks5://localhost:1080" ^
--host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE localhost" ^
--user-data-dir="/tmp/clustername-m" http://clustername-m:8088

所以,我改变了代码,它打开chrome,错误“没有互联网......”

"%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe" ^
--proxy-server="socks5://localhost:1080" ^
--host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE localhost" ^
--user-data-dir="/tmp/clustername-m" http://clustername-m:8088
© www.soinside.com 2019 - 2024. All rights reserved.