Port and network troubleshooting guides
Step-by-step references for occupied ports, failed connections, Docker publishing, bind addresses and port selection.
Identify the operating system, protocol and service owner first. Inspection commands and changes are explained separately; these guides do not automatically stop processes or open firewalls.
Port and network troubleshooting guides
Docker: understand host and container port mappings
Distinguish container listeners, EXPOSE and published ports, with a loopback-bound example and a practical inspection sequence.
localhost, 127.0.0.1 and 0.0.0.0: what changes?
Understand loopback, all-interface bindings and IPv6 when a service works locally but not from another device.
Choose a development port: assignments, listeners and binding
An unlisted port is not necessarily free. Check assignments and local conflicts, then verify that your application can actually bind.
Windows: find a port’s owner and resolve conflicts safely
Use PowerShell to identify a TCP listener and its process before stopping an application or selecting another port.
Linux and macOS: inspect listeners and their processes
Inspect TCP, UDP and bind addresses with Linux ss or macOS lsof before changing a running service.
Connection refused or timeout: troubleshoot by layer
Check the destination and listener, then the network path, TLS and authentication instead of treating every failure as a port conflict.
Configuration by software and protocol
- 21 — FTP
- 22 — SSH / SFTP
- 25 — SMTP relay
- 53 — DNS
- 67 — DHCPv4 server
- 80 — HTTP
- 115 — Simple File Transfer Protocol
- 143 — IMAP / STARTTLS
- 443 — HTTPS
- 465 — SMTP submission / implicit TLS
- 587 — SMTP submission / STARTTLS
- 993 — IMAP over TLS
- 3000 — Next.js / development HTTP
- 3306 — MySQL
- 3389 — Windows Remote Desktop
- 5432 — PostgreSQL
- 6379 — Redis
- 8080 — HTTP alternate / Tomcat
- 8443 — Alternate HTTPS / Tomcat TLS
- 27017 — MongoDB