Ever had a day where you’re just minding your own business, coding away, and suddenly — BAM! — your web server refuses to start? 😱
Me: Alright, time to start my web server!
Terminal: lol no.
Terminal again:
Port 8080 is already in use
Me: Excuse me? By whom??
🕵🏾♀️ The Investigation (Windows)
Like a true tech detective (read: someone who panicked and Googled), I did:
Step 1:Opened Command Prompt (or terminal) and get ready for battle.
Step 2: Ran the command to locate the rogue process:
netstat -ano | findstr :8080
(This showed me which sneaky process is holding onto that port.)
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 12345
Step 3: Now for the fun part — terminate that process!
taskkill /PID 12345 /F
(Don’t worry, it’s not as brutal as it sounds. Just a gentle nudge for the process to move along.)
taskkill /PID 12345 /F
✨ Port conquered. Server awakened.
Victory: achieved. Confidence: restored. 🚀
💻 Not on Windows?
Don’t worry, Linux and macOS users — you’ve got your own spell:
- Run
lsof -i :8080
to see what’s using the port. - You’ll get a result like:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 12345 user 22u IPv6 0x... 0t0 TCP *:http-alt (LISTEN)
-
Terminate it with:
kill -9 12345
🎉 The Mini-Lesson?
Ports are sneaky.
Background processes? Also sneaky.
Always check who’s squatting on your ports.
💬 Let me know if you’ve been personally victimized by port 8080, or any other port — I’m here for the struggles.
#buggedbuthappy
#devlife
#webdev
#debugging
#developerhumor
#tinyrantsbiglessons
#programming
#learning
#windows
#linux
#macos