question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When trying to run wrangler dev I get

Error: listen EADDRINUSE: address already in use :::9229

It seems this is used for dev tools as per: https://github.com/cloudflare/wrangler2/blob/6937fe9bd07b23c3f8c481e0a11128615356ef64/packages/wrangler/src/dev.tsx#L644

It appears this is not properly closing or it’s being hung somewhere. I cannot see the port in something like netstat or lsof. Trying to kill all node processes yielded no success either (no process found).

@AlbertSPedersen is also able to reproduce this (both of us using Linux - he runs Arch by the way)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
threepointonecommented, Nov 16, 2021

Thanks for the catch, I heard a couple of other people also bump into this. For one, maybe we should use a different port altogether, since 9229 is used by other tools as well, and we own the whole thing. But we shouldn’t leave any hanging processes. I’ll investigate, thank you for the report!

2reactions
jgentescommented, Dec 6, 2021

I run into this every time I try to use local mode on WSL2.

I think the issue is when we launch local mode it spawns node with the --inspect flag.

This will try to use port 9229 but that’s already in use. You can see it with lsof -i:9229 after launching wrangler dev.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Starting inspector on 127.0.0.1:9229 failed: address already in ...
As soon as I start vs code I opened a terminal and used 'netstat -b' and it shows python.exe was using port 9229....
Read more >
What is the significance, if any of port 9229, and can it be ...
Port 9229 is the default NodeJS debugging port. It allows you to attach a debugging tool like Chrome's Inspector or WebStorm's Remote Debug...
Read more >
Port 9229 (tcp/udp) - SpeedGuide
SG Ports Services and Protocols - Port 9229 tcp/udp information, official and unofficial assignments, known security risks, trojans and applications use.
Read more >
Starting inspector failed: address already in use
Starting inspector on 127.0.0.1:9229 failed: address already in use. Copy. This means the address is already in use by another Node.js app ...
Read more >
Debugging - Getting Started - Node.js
js process listens for a debugging client. By default, it will listen at host and port 127.0.0.1:9229. Each process is also assigned a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found