Bean Network Tester

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 happenedHow it shows upWhat to do
A program has the portThe 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 asideThe 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:

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.

Next

Ready to break your own network on purpose?

Download for Windows