DEV Community

Deepika
Deepika

Posted on • Edited on

๐Ÿš€ Debugging the World: How I Fixed Port 8080

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:

  1. Run lsof -i :8080 to see whatโ€™s using the port.
  2. 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)

  1. 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

Top comments (2)

Collapse
 
triggeredinsaan profile image
Abhishek Allaboina

Expecting more learning from you!!

Collapse
 
triggeredinsaan profile image
Abhishek Allaboina

Unlike for eclipse endpoint ,we faced such issues with nextjs