我正在尝试在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"
答案 0 :(得分:3)
所以,我不是100%肯定“管理上被禁止”的消息来自哪里,但根据我的经验,这些一直都是误报,即使我的socks代理正在运行,我也会看到Connection refused
消息按预期正确。
至于实际问题,由于YARN之类的方式绑定了他们的网络服务,如果尝试使用http://localhost:8088
代替http://<master-hostname>:8088
访问YARN用户界面,我已经获得了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]
的行为相匹配:
8124
正如您所看到的,这与Jupyter行为(我在端口localhost:8124
上运行)不同,Jupyter webapp在主服务器上正常解析wget
。由于具有这些链接指令的名称解析应该在主服务器上进行,因此浏览器的行为解析主机将与您通过隧道传输的节点中运行String str = "Abc";
str = str.toLowerCase();
int numOfCombos = 1 << str.length();
for (int i = 0; i < numOfCombos; i++) {
char[] combinations = str.toCharArray();
for (int j = 0; j < str.length(); j++) {
if (((i >> j) & 1) == 1 ) {
combinations[j] = Character.toUpperCase(str.charAt(j));
}
}
System.out.println(new String(combinations));
}
相同。
因此,如果你只使用你的主人的主机名而不是本地主机,它应该可以工作。