【问题标题】:ssh tunnel connection refused on chromeosssh 隧道连接在 chromeos 上被拒绝
【发布时间】:2019-06-07 03:37:13
【问题描述】:

我正在尝试设置一个 ssh 隧道以在我的本地系统上使用 chrome nodejs 调试器。

我的 nodejs 应用托管在 Google Compute Engine 上。

这些是我在安全外壳应用程序上给出的论点:

-L 9229:localhost:9229

SSH 连接有效,但在填写上面的隧道参数时,我不断收到以下错误消息:

channel 2: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused

我尝试在参数中使用 -nN,但这甚至不能完全加载我的命令行。

在 chrome 中,网络目标似乎配置正确。

这些是我得到的详细错误:

channel 2: open failed: connect failed: Connection refused
debug2: channel 2: zombie
debug2: channel 2: garbage collecting
debug1: channel 2: free: direct-tcpip: listening port 9229 for localhost port 9229, connect from 127.0.0.1 port 65535 to UNKNOWN port 0, nchannels 4
debug3: channel 2: status: The following connections are open:
  #1 client-session (t4 r0 i0/0 o0/0 e[write]/0 fd 102/103/104 sock -1 cc -1)
  #3 direct-tcpip: listening port 9229 for localhost port 9229, connect from 127.0.0.1 port 65535 to UNKNOWN port 0 (t3 nr0 i0/0 o0/0 e[closed]/0 fd 106/106/-1 sock 106 cc -1)

debug3: receive packet: type 92
channel 3: open failed: connect failed: Connection refused
debug2: channel 3: zombie
debug2: channel 3: garbage collecting
debug1: channel 3: free: direct-tcpip: listening port 9229 for localhost port 9229, connect from 127.0.0.1 port 65535 to UNKNOWN port 0, nchannels 3
debug3: channel 3: status: The following connections are open:

我该如何解决这个问题以及频道错误是什么意思。

如果我将端口更改为例如-L 9221:localhost:9229 并将 localhost:9221 添加到 chrome 目标发现设置我可以在其他端口上重现错误。

【问题讨论】:

  • 你是如何启动节点的?
  • @mscdex 在 ssh 连接后手动。我只有一个要测试的简单脚本。我只能调试服务器吗?
  • @Christoph 如何而不是何时
  • @mscdex node --inspect test.js

标签: node.js google-chrome google-cloud-platform ssh-tunnel google-cloud-networking


【解决方案1】:

解决了我需要使用 --inspect-brk 添加断点,这样代码就不会完全触发。

我还需要打开 2 个 ssh 会话。一个用于端口转发,一个用于编码。

【讨论】:

    猜你喜欢
    • 2017-08-24
    • 2018-01-28
    • 2018-08-27
    • 1970-01-01
    • 2021-03-16
    • 2014-05-06
    • 2017-06-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多