我正在尝试在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
消息。
至于实际问题,由于YARN之类的东西绑定其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的webapp上,它可以正确解析主服务器上的localhost:8124
。由于带有这些链接说明的名称解析应在主服务器上进行,因此浏览器的行为解析主机将与在隧道中进入的节点中运行wget
相同。因此,如果您仅使用主机的主机名而不是localhost,则它应该可以工作。
关于ssh - 如何防止与dataproc上的SOCKS的“连接被拒绝”?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38386058/