Uh oh!
There was an error while loading. Please reload this page.
inspector: proper WS URLs when bound to 0.0.0.0 - #11755
Conversation
bnoordhuis
left a comment
There was a problem hiding this comment.
Changes themselves LGTM but can you add a regression test?
eugeneo
commented
Mar 9, 2017
@bnoordhuis Thank you for the review. I added a test, CI pending: https://ci.nodejs.org/job/node-test-pull-request/6776/ |
bnoordhuis
left a comment
There was a problem hiding this comment.
LGTM. I wonder though, what happens in two tests try to start an inspector instance concurrently? It looks like one of them will lose out with a port conflict?
gibfahn
commented
Mar 10, 2017
Rerun of CI failed on linuxone. CI 2: https://ci.nodejs.org/job/node-test-pull-request/6777/ |
eugeneo
commented
Mar 10, 2017
@gibfahn - I fixed that https://ci.nodejs.org/job/node-test-pull-request/6785/ - test will skip if the system does not allow connecting to its external IP. LGTM was for the fixed version. |
eugeneo
commented
Mar 10, 2017
@bnoordhuis I am planning to update the code so port :0 would be supported from the command line (right now it is command line options parser that explicitly prevents it) - but that change caused some failures in the legacy debugger tests so I will have to look into it. I will update inspector tests to use :0 once it is working. |
eugeneo
commented
Mar 13, 2017
Landed as b170fb7 |
italoacasas
commented
Mar 14, 2017
The test in
|
eugeneo
commented
Mar 14, 2017
@italoacasas Will #11631 be backported or should I change the test? |
italoacasas
commented
Mar 14, 2017
@eugeneo someone should take the lead of that backport, If you have the time available in the same PR you can backport both commits. |
JSON target list response will now return appropriate IP address for instances listening on 0.0.0.0. Refs: nodejs#11591 PR-URL: nodejs#11755 Reviewed-By: James Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
joshgav
commented
Mar 28, 2017
@eugeneo I think this change breaks remote debugging by giving the remote debugger an IP address (host) which is internal to the system where Node is running. For example, if Node is running in a container the debugger might connect via the container host's name/address or via localhost over SSH (or both). The initial HTTP request for /json works, but since the debugger then uses the webSocketDebuggerUrl property from that response and that property has the internal IP address, the ensuing WebSocket connection fails. The following Wireshark capture may help illustrate the issue. Note that after the /json response the debugger tries to use the internal IP address (and gets nowhere). |
eugeneo
commented
Mar 28, 2017
I'm afraid I am not familiar with containers... I can do one of the following:
|
joshgav
commented
Mar 28, 2017
@eugeneo will think more, it's a tricky problem. FWIW, when the address is reported as BTW, I confirmed my diagnosis by changing the base image in this Dockerfile from |

JSON target list response will now return appropriate IP address
for instances listening on 0.0.0.0.
Ref: #11591
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
inspector: HTTP handler now checks actual connection IP address.