Checking What Is Listening on a Port Print

  • 0

Finding which process owns a port.

WHY THIS COMES UP CONSTANTLY

A service will not start because something already holds its port.

WHAT TO RUN

ss with options for listening, processes, and both protocols.

WHAT THE OUTPUT SHOWS

The address and port The process name and identifier

WHAT THE ADDRESS COLUMN MEANS

An address of all zeroes means every interface A loopback address means local only A specific address means that interface only

WHY THAT DISTINCTION MATTERS

A service listening only locally is unreachable from outside, whatever the firewall says.

WHAT TO DO WHEN A PORT IS IN USE

Identify the process, and decide whether it should be running.

WHAT COMMONLY HOLDS A PORT UNEXPECTEDLY

A previous instance that did not exit A different service configured for the same port

WHAT TO DO ABOUT A STALE PROCESS

Stop it properly before starting the new one.

WHAT lsof PROVIDES HERE

The same answer, with more detail about the process.

WHAT TO CHECK WHEN A SERVICE RUNS BUT IS UNREACHABLE

That it is listening On the expected address That the firewall permits it That nothing upstream blocks it

WHY IN THAT ORDER

It moves outward from the machine.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot