Which program is using this port?
A server will not start on port 8080, or a test stops with "address already in use". Either a program already has the port or Windows has set it aside, and the two errors look alike. This is how to tell them apart.
Two reasons a port will not open
| What happened | How it shows up | What to do |
|---|---|---|
| A program has the port | The error says the address is already in use (EADDRINUSE, or Windows error 10048). The program appears in the list of sockets. | Close that program, or choose another port. |
| Windows set the port aside | The error says access is forbidden (Windows error 10013) although nothing is listening. No program appears in the list. | Choose a port outside the reserved range, or release the range. Restarting the WinNAT service often does. |
With what Windows already has
The list of sockets gives the owner as a process ID. Find the port, then look the ID up:
netstat -ano | findstr :8080
tasklist /fi "PID eq 4321"
The same in PowerShell, for TCP and for UDP:
Get-NetTCPConnection -LocalPort 8080 | Select-Object LocalAddress, State, OwningProcess
Get-NetUDPEndpoint -LocalPort 5353 | Select-Object LocalAddress, OwningProcess
Get-Process -Id 4321
If no program holds the port, ask which ranges Windows has set aside:
netsh int ipv4 show excludedportrange protocol=tcp
Run it again with protocol=udp. The ranges are kept per protocol, so a port can be free for UDP and reserved for TCP.
With the Tools tab
The Tools tab answers the same questions without a console:
- Sockets lists every TCP and UDP socket on the computer, like
netstat -ano: what is listening, what is connected, its state and the program that owns it. It needs no session. Search it withlport:8080orstate:listen. - Port check asks what your server asked: can a program use this port? Type 8080, a list such as
80, 443or a range such as9000-9100(up to 1000 ports) and press Check. Each port is tried for TCP and UDP, on IPv4 and IPv6, and marked Free, In use (with the program and its PID) or Reserved by Windows.
That is why the answer is a table and not a yes or no: Windows reserves ranges per protocol, and a program listening on IPv6 can hold a port that is free on IPv4.
Nothing is sent over the network. For each port the tool asks Windows for it on the computer's own loopback address and gives it back at once.
Once you know who has it
Right-click a row in either table to target the program that holds the port. That only fills in the target field, and nothing changes until you press START. See aiming at one app for what comes next.
What it does not do
It reads and does not repair: it never closes a program and never releases a reserved range. A socket that belongs to another account shows no program unless the tool runs as administrator.