PULSAR
English

Find the process using port 3000 or 8080 on a Mac

If a development server reports “Address already in use”, identify the process listening on that port before stopping anything. These commands only read the current state. The example uses TCP port 3000; replace 3000 with 8080 or the port in your error message.

Find the listener with lsof

Open Terminal and run the command below. -iTCP:3000 selects TCP port 3000, and -sTCP:LISTEN keeps only listening sockets. -nP leaves IP addresses and ports as numbers instead of resolving names.

The output is a snapshot. It can change when a service exits or restarts, so check again before acting on it.

lsof -nP -iTCP:3000 -sTCP:LISTEN

Read COMMAND, PID and NAME

For example, a row may start with node 12345 and end with 127.0.0.1:3000 (LISTEN). COMMAND is the process name and may be truncated. PID identifies that running process. NAME contains the listening address, port and state.

Several rows with the same PID do not necessarily mean several services: one process may listen on both IPv4 and IPv6. If the name is node or python, identify the project behind it. Replace 12345 below with the PID you just found to read its full launch command. 12345 is an example, not a process to act on.

ps -p 12345 -o pid=,ppid=,command=

Check which address the service listens on

127.0.0.1:3000 or [::1]:3000 is a loopback address for connections from this Mac. *:3000 means all local interfaces for that address family. A specific LAN IP means the socket is bound to that address.

Listening on all interfaces does not prove that a service is reachable from the internet. Firewalls, routing and network configuration still matter. For a local port conflict, start with the PID and bind address.

If nothing appears, check the port, protocol and timing

No output means this query did not see a matching TCP listener. It does not prove the port is available in every context. Check the port in the error, repeat the query while the failure occurs, and consider whether the process has exited or your permissions limit what is visible.

For a UDP service, use the command below instead. UDP has no TCP LISTEN state, so do not add -sTCP:LISTEN.

lsof -nP -iUDP:3000

Find the owning app in Pulsar

Open Pulsar’s main window and press ⌘5 for Ports. Enter 3000 or 8080 in the filter. Each result shows the listening port, owning app and process, with local or LAN scope. Select an entry to inspect the process further.

Ports is a permanently free feature; it does not require Pro. Pulsar currently supports Apple Silicon Macs running macOS 14 or later.

Decide whether the service should stop

For your own development server, return to its terminal and stop it normally, usually with Control-C. For a desktop app, save your work and quit it normally. If the existing service is needed, choose another port for the new one.

Do not pipe the lookup into a command that terminates every matching process. PIDs can be reused, and a process name alone does not tell you whether it is safe to stop. After stopping the service, repeat the lookup to confirm the listener is gone before starting another service.

Try Pulsar on your Mac

Apple Silicon · macOS 14+

Download Pulsar