gpt4 book ai didi

ssh - 如何在dataproc上使用SOCKS防止 "connection refused"?

转载 作者:行者123 更新时间:2023-12-03 04:54:11 25 4
gpt4 key购买 nike

我正在尝试按照 the Google Jupyter guide 设置与我的 dataproc Spark 集群的 SOCKS 连接,但启动浏览器 Chrome 后我不断收到“连接被拒绝”错误:

channel 4: open failed: connect failed: Connection refused
channel 5: open failed: connect failed: Connection refused
channel 6: open failed: connect failed: Connection refused
channel 7: open failed: connect failed: Connection refused
channel 8: open failed: connect failed: Connection refused
channel 5: open failed: connect failed: Connection refused
channel 5: open failed: connect failed: Connection refused
channel 5: open failed: connect failed: Connection refused
channel 16: open failed: connect failed: Connection refused
channel 16: open failed: administratively prohibited: open failed
channel 17: open failed: administratively prohibited: open failed
channel 18: open failed: administratively prohibited: open failed
channel 16: open failed: connect failed: Connection refused
channel 18: open failed: connect failed: Connection refused
channel 18: open failed: connect failed: Connection refused
channel 18: open failed: connect failed: Connection refused

--proxy-server="socks5://localhost:1080"--proxy-server="socks5://127.0.0.1:1080"都会发生这种情况

最佳答案

所以,我不是 100% 确定“行政禁止”消息来自哪里,但根据我的经验,这些一直是误报,我看到那些 open failed: administratively prohibited: open failed即使我的 socks 代理按预期正常工作,也会收到消息。

至于实际问题,由于 YARN 之类的东西绑定(bind)其 Web 服务的方式,我得到了 Connection refused如果尝试使用 http://localhost:8088 访问 YARN UI而不是http://<master-hostname>:8088 。这与运行 get 的行为相匹配集群内部:

dhuo@dhuo-jupyter-m:~$ wget http://localhost:8124
...
Saving to: ‘index.html.13’

index.html.13 100%[=============================================================================================================================================================================>] 11.41K --.-KB/s in 0s

2016-07-15 23:26:25 (222 MB/s) - ‘index.html.13’ saved [11686/11686]

dhuo@dhuo-jupyter-m:~$ wget http://localhost:8088
--2016-07-15 23:26:28-- http://localhost:8088/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:8088... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:8088... failed: Connection refused.
dhuo@dhuo-jupyter-m:~$ wget http://`hostname`:8124
...
Saving to: ‘index.html.14’

index.html.14 100%[=============================================================================================================================================================================>] 11.41K --.-KB/s in 0s

2016-07-15 23:26:34 (260 MB/s) - ‘index.html.14’ saved [11686/11686]

dhuo@dhuo-jupyter-m:~$ wget http://`hostname`:8088
...
Saving to: ‘index.html.15’

index.html.15 100%[=============================================================================================================================================================================>] 10.81K --.-KB/s in 0s

2016-07-15 23:26:37 (248 MB/s) - ‘index.html.15’ saved [11067/11067]

如您所见,这与 Jupyter 行为(我在端口 8124 上运行)不同,Jupyter Web 应用程序可以正确解析 localhost:8124 。在主人身上。由于这些链接指令的名称解析应该在主服务器上进行,因此浏览器解析主机的行为将与运行 wget 相同。在您通过隧道进入的节点中。

因此,如果您只使用主服务器的主机名而不是本地主机,它应该可以工作。

关于ssh - 如何在dataproc上使用SOCKS防止 "connection refused"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38386058/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com