Windows socket error 10048, WSAEADDRINUSE, means your program tried to bind to an IP address and port that another socket is already using, so Windows refused the bind. The fix is to find what holds that port, then either stop it or move your program to another port. Port Detective, a Windows app from Automata Labs, shows the process name and PID for any port the moment you type it, and Port Detective Pro adds a guarded one-click kill, so you can clear the port without piecing together netstat and taskkill output.
This guide covers what the message means, how it differs from the similar-looking error 10013, and how to resolve it with built-in commands or with Port Detective.
Type the port from the error and see the process and PID holding it, in real time.
Get it from Microsoft
What does “only one usage of each socket address” mean?
Microsoft’s system error code list defines WSAEADDRINUSE as 10048 (0x2740) with the message: “Only one usage of each socket address (protocol/network address/port) is normally permitted.”
The Windows Sockets error code reference adds the practical detail: typically only one usage of each socket address (protocol, IP address and port) is permitted, and the error occurs if an application tries to bind a socket to an address that is already in use for an existing socket, or to a socket that was not closed properly or is still in the process of closing.
Every runtime on Windows surfaces the same Winsock code, but the wording changes:
| Where you see it | What it looks like |
|---|---|
| Winsock (C, C++) | WSAEADDRINUSE, 10048 |
| .NET | SocketException with SocketError.AddressAlreadyInUse (10048), “Only one use of an address is normally permitted.” |
| Python on Windows | An OSError carrying WinError 10048 |
| Node.js | EADDRINUSE: address already in use |
| Many servers and frameworks | The Winsock message quoted in their own startup error |
Microsoft also notes that when a program binds to a wildcard address, the error can be delayed until a later call such as listen or connect, so the line in your stack trace may not be the bind itself.
If you are working in Node.js, our EADDRINUSE guide covers the Node specifics. The rest of this post applies to any language.
Is error 10048 the same as error 10013?
No, and the difference changes the fix.
| 10048 WSAEADDRINUSE | 10013 WSAEACCES | |
|---|---|---|
| Message | ”Only one usage of each socket address (protocol/network address/port) is normally permitted." | "An attempt was made to access a socket in a way forbidden by its access permissions.” |
| Usual cause | Another socket already holds the address and port | Access is denied; Microsoft’s examples include another program bound to the address with exclusive access (SO_EXCLUSIVEADDRUSE) |
| Does a process own the port? | Usually yes, and you can find it | Often no process shows up at all |
| First step | Find the owner and stop it or change port | Check reserved and excluded port ranges |
If a port lookup shows nothing listening and you get 10013, read our guides to the socket forbidden by access permissions error and excluded port ranges and WinNAT instead.
How do you find the process holding the port?
PowerShell has cmdlets for both protocols. Both accept a local port and return an OwningProcess property, which is the PID. Replace 8080 with the port from your error.
# TCP: who is bound to the port, and in what state
Get-NetTCPConnection -LocalPort 8080 | Select-Object LocalAddress, LocalPort, State, OwningProcess
# UDP endpoints on the same port
Get-NetUDPEndpoint -LocalPort 8080 | Select-Object LocalAddress, LocalPort, OwningProcess
# Turn the PID into a process name
Get-Process -Id 12345
The classic Command Prompt route is netstat with the PID column, filtered to the port:
netstat -ano | findstr :8080
tasklist /fi "PID eq 12345"
Our find the process using a port guide walks through reading that output, including why a port number can match more than one line.
Skip the netstat filtering: Port Detective lists the owner, PID and state for any port you type.
Get it from Microsoft
What are the common causes of error 10048?
| Cause | How it shows up | Fix |
|---|---|---|
| A previous run of your own app is still alive | Same process name, often a background or orphaned instance | Stop it, then restart cleanly |
| Two services configured for the same port | A different program in Listen state on that port | Change one of the ports |
| A socket that is still closing | Entries for the port in a closing state, with no listener | Wait for it to finish, or let your server set the right socket options |
| A container or proxy published the port | A Docker or proxy process owns it | Stop the container or change the host port |
| Your code binds twice | The error comes from your own process | Bind once, or fix the startup path that runs twice |
On the closing-socket case, Microsoft notes that server applications that need to bind multiple sockets to the same port number can consider setsockopt with SO_REUSEADDR, and that client applications usually do not need to call bind at all, because connect picks an unused port automatically. If a client of yours binds to a fixed local port, removing that bind often removes the error.
How do you stop the process safely?
Once you know the PID, check the process name before you end it. PIDs are reused, so a PID you read a minute ago may belong to something else by the time you act. Our article on the PID race condition when killing a process explains why.
# Confirm the name first, then stop it
Get-Process -Id 12345
Stop-Process -Id 12345
If the owner is a Windows service or a protected system process, stopping it is usually the wrong move. Change your app’s port instead. For framework-specific walkthroughs, see our page on port 5000 already in use with Flask.
How does Port Detective handle error 10048?
| Step | Port Detective (free) | Port Detective Pro |
|---|---|---|
| See every TCP and UDP connection live | Yes | Yes, across IPv4 and IPv6 |
| Type a port, get process name, PID and state | Yes | Yes, plus the executable path |
| Pin the ports you use most | Yes | Yes |
| Kill the owner in one click | No | Yes, guarded by a process token so a reused PID is not killed |
| Show protected OS processes clearly | No | Yes |
| See TIME_WAIT and other TCP states | No | Yes |
| Copy a row as a netstat, taskkill or PowerShell command | No | Yes |
| Map a host port back to its Docker container | No | Yes, when Docker is running |
| Watch ports with Port Guard | No | Yes, checked every 250 ms with a Windows notification |
The free edition answers “who has my port” without a terminal. Pro is for developers who hit this error often and want to clear it, script it, or be told the moment something grabs a port they care about.
Frequently asked questions
What is WSAEADDRINUSE?
It is the Winsock error name for code 10048. It means the address and port your program tried to bind are already in use by another socket, or by a socket that has not finished closing.
Why do I still get error 10048 after closing the app?
Either a process from the app is still running in the background, or the socket has not finished closing. Look up the port: if a process is listening, stop it; if you only see closing entries, wait or adjust your server’s socket options.
Does a reboot fix error 10048?
Often, because it ends every process, but if the conflicting program starts automatically the error returns. Finding the owner tells you which program to reconfigure.
Is error 10048 a firewall problem?
Usually not. A firewall blocks traffic; 10048 comes from binding the socket because the address and port are taken. Microsoft notes that with a wildcard address the error can surface later, on a call such as listen or connect, but the cause is the same.
Try Port Detective
Port Detective is free in the Microsoft Store for live port lookup. Port Detective Pro is a one-time purchase with a free trial and every feature unlocked, with offline licensing and no subscription. More detail is on the Port Detective product page.
Find the process behind error 10048 and clear the port in one click with Port Detective Pro.
Get it from Microsoft
Windows, PowerShell and .NET are trademarks of the Microsoft group of companies. Port Detective is not affiliated with Microsoft.
Last updated 20 October 2026. Published by Automata Labs, a software company in Canada.