-
Notifications
You must be signed in to change notification settings - Fork 45
Error: Timeout (2000) waiting for 127.0.0.1:9229 to be free #48
Comments
Hey - thanks for the report! This should generally only happen if either a) you're using an older version of Can you share an example script & command that was used to generate the error? |
there could also be the possibility, you are running |
Hi ,I got the same issue. Does any one know how to fix that? Command: node inspect app.js |
@Michelle0609 The most likely issue is that something else is running on port 9229. You can try running it on a different port using the following command:
Alternatively you can try finding the thing blocking port 9229 on your machine. If neither of those options gets you anywhere, can you share the OS and version of node you're using? |
Hi Jan,
Thanks for the email. I tried "node --inspect-port=9228 debug app.js"
But got the following issue
(node:12276) [DEP0068] DeprecationWarning: `node debug` is deprecated.
Please use `node inspect` instead.
There was an internal error in node-inspect. Please report this bug.
Timeout (2000) waiting for 127.0.0.1:9228 to be free
Error: Timeout (2000) waiting for 127.0.0.1:9228 to be free
at Timeout.setTimeout [as _onTimeout]
(node-inspect/lib/_inspect.js:63:14)
at ontimeout (timers.js:478:11)
at tryOnTimeout (timers.js:302:5)
at Timer.listOnTimeout (timers.js:262:5)
My OS is windows 10 and node version is 9.1.0
Thanks
Michellle
…On Wed, Nov 8, 2017 at 1:18 PM, Jan Olaf Krems ***@***.***> wrote:
@Michelle0609 <https://github.com/michelle0609> The most likely issue is
that something else is running on port 9229. You can try running it on a
different port using the following command:
node --inspect-port=9228 debug app.js
Alternatively you can try finding the thing blocking port 9229 on your
machine. If neither of those options gets you anywhere, can you share the
OS and version of node you're using?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#48 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Afd7iRdk8Sq1EQtu1js6bQbYKJmxf8caks5s0Q-CgaJpZM4O7CL9>
.
|
Thanks for the details! Wonder if there are any important error cases we're ignoring while trying. I don't have Windows around right now but I might be able to try debugging it when I'm back in the office tomorrow. |
Thanks Jan!
…On Wed, Nov 8, 2017 at 1:59 PM, Jan Olaf Krems ***@***.***> wrote:
Thanks for the details!
Wonder if there are any important error cases we're ignoring while trying
<https://github.com/nodejs/node-inspect/blob/49d7f88e3466d5b4b46886cb1f997b2dfc123d8b/lib/_inspect.js#L74>.
I don't have Windows around right now but I might be able to try debugging
it when I'm back in the office tomorrow.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#48 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Afd7ib6rifgpRGVsHnd5p_inSo0jmD1lks5s0RkJgaJpZM4O7CL9>
.
|
I encountered this error and found out while trying to close my Terminal window that there was another instance of node running in it still. Probably did not close it properly and that's why the port was blocked. |
To anyone making it to this thread with this issue, make sure you are exiting out of inspect using ctrl^c, not ctrl^z. If you use ctrl^z the debugger is still blocking the port and the only way to fix it is to exit and reenter terminal. |
@Michelle0609 I got a good laugh from your example because it was identical enough to mine to know we were doing the same tutorial! Cheers. |
i'm having this issue as well and only have one terminal up still has same error
|
Hey @4rch1m3d35 did you figure this out? I am having the same problem! |
@kerryja nope nothing yet |
I'm having the same problem, did anyone figure this out? I already tried changing the port, but the error message is the same. |
@AleArmengol To clarify your comment: Do you mean the message literally keeps talking about |
this is the command to change ports |
To clarify, the command to start the CLI debugger on a custom port is When using |
same issue here. Node v10.13.0 Tried running in VSC and then another attempt in PowerShell.
|
@victorgutemberg When you say "tried running in VSC", do you mean its integrated terminal? Also, can you share the exact command you ran? |
I wonder if this is something specific to Windows since so far that seems to be a common thread. I don't have a Windows machine anymore to test that on, so if somebody could do some debugging, it would be much appreciated. :) |
I ran this commands node inspect --port=9230 app.js |
@jkrems yeah, I meant the integrated terminal. I've tried using the default cdm and PowerShell, same result on both. And the command that I was running is the same as just mentioned by @AleArmengol. |
same problem (node v 12.3.1) on Windows 10 Pro, Build 18362: Seems to work fine on the Windows 7 machine |
Same problem on Windows 10 Home, Node v12.2.0, |
I am also having this issue on different ports in Windows 10, both in VSC integrated terminal and regular powershell |
Had the same issue, the problem was that I was starting multiple instances of node app inside a docker container, so the first instance that starts occupies |
unfortunately i am not using docker and i am only starting one instance of the integrated terminal |
Same problem : Timeout (2000) waiting for 127.0.0.1:9229 to be free Windows x64 18362.207 and i have checked used ip:port (netstat command) and no entry is using this port |
@yilmazdurmaz |
Anyone knows whats the difference between node inspect app.js & node --inspect app.js |
Yeah, those two commands look more similar than they should. The difference is:
The relationship between the two is more obvious in the more explicit flow that also supports remote debugging across machines: # Start app.js with the inspect interface exposed, by default on port 9229:
node --inspect app.js
# In a separate terminal, start the inspect client against port 9229:
node inspect -p 9229 Now the CLI debugger ( |
Thanks! got the diff b/w the two 👍 |
|
@jkrems is there a way you may put a summary at the end and then put this discussion on a hold? it is too long that people miss the important parts we talked about. |
I have tried And after typing |
you're magician |
Hey! Great job. I didn't even expect to find any plain text parameters inside win PE file. Great clean solution, without any 3rd party modules. That's what i was hoping to get. Cheers man! |
you are a god! |
any Of This is not working |
try this:
it works fine with me. |
|
Thanks Now its Working😅 |
We need to move the |
"--inspect" and "--inspect-brk" does things in slight different ways, and depending on what you need the second does the jobs. we have a fix about the "timeout" for "--inspect" already committed&merged, so possibly the next node version change will include it. as for the fix, it is an increased value on the setTimeout function, 2000 to 9999, because the problem here is that Windows is somehow slow on taking the requested port, about 3-5 seconds, thus timeout was happening. keep an eye on it and update your node installation when the fixed one comes out. |
Update: A change increasing the timeout has landed here and there's an open PR to pull it into node (nodejs/node#33447). |
try node --inspect-brk filename.js |
Still I am facing issue with debugging. Didn't worked for me. Using node version v12.18.0. |
Go to your chrome browser and enter the url: chrome://inspect |
@vivekvking , i have updated chrome://inspect and added configuration - discover network targets as 127.0.0.1:9229. But the issue resists to |
If you want to debug your code use |
Tried everything and none worked but |
You're great❤️❤️❤️ |
Typed up a whole gosh darn thing and after reading the docs I got it working finally! After installing globally with "npm install -g node-inspect" and restarting the terminal, I was able to use "node-inspect fileName.js" and it successfully starts and keeps the debugger running in that terminal. I suggest trying that if you're still struggling. I did try "node inspect" and "node --inspect" but they didn't work. What a strange issue! |
Hey there all future newcomers to the topic (and some old still struggling). TL:DR - we have many possible solutions. please try to read comments. I wish comments were not this long and we had the habit of reading long things, impossible by our nature. just know that, we know the problem and we have the solutions. PROBLEM: newer version of windows is slow to assign debug port that takes about 3-5 seconds, but this debug utility had a predefined (working in the past) 2 seconds timeout. this is the only reason we have this issue. SOLUTION: we already have the fix submitted to Node.JS codebase, and sometime in the future, depending on Node's own release schedule. until then there are many working solutions depending on your expectation, so please, please, please read these comments and try solutions. thanks for patience PS: the solution in above comment works now without any modification because we really have it fixed here. two post above works too because of the nature of the problem; we need a simple timeout increase. PS: I really hope new readers will at least read the last post in the line, and keep this one as the last post. |
I'm having
Same Issue is there but this Command Works for Mine.
Thanks |
Error: Timeout (2000) waiting for 127.0.0.1:9229 to be free
I have the same question
The text was updated successfully, but these errors were encountered: