Skip to content
ohsudo, Home

Port Lookup

What usually runs on port 5432, 6443 or 9090 — and what to check if it’s open.

● Runs 100% in your browser — nothing you type leaves this page.

93 ports and ranges

Defaults only: any service can be moved to another port, and any program can take a free one. ss and lsof show what really listens.

The address bar updates as you go, so you can bookmark or share the result.

How to use it

  1. Type a port number (6443) or a name (redis, kubernetes, docker swarm).
  2. Read what usually listens there and whether it belongs on the internet: can face the internet, keep it internal, or never expose.
  3. Copy the commands on the right to see what really uses that port on your machine, or to test it from another one.

The link updates as you type, so you can share a lookup like /tools/port-lookup/#6379.

What you get

These are defaults. Any service can be moved to another port, and any program can take a free one — only ss or lsof on the machine tells you what is really there.

Common commands

Terminal window
sudo ss -tulpn # everything listening, with the process
sudo ss -tulpn 'sport = :5432' # only port 5432
sudo lsof -i :80 # which process holds port 80
nc -zv db.internal 5432 # can I reach it from here?
sudo ufw allow from 10.0.0.0/24 to any port 5432 proto tcp # allow one network only
sudo firewall-cmd --list-ports # open ports on RHEL / Rocky (firewalld)

FAQ

“Address already in use” — how do I find out what took the port?

sudo ss -tulpn 'sport = :80' shows the process that listens on it. Stop it, move it, or choose another port. The full walkthrough, with the classic Apache-vs-nginx case, is in Address already in use.

Why does it say “Connection refused” when the service is running?

Usually it listens only on 127.0.0.1, or on another port than you think. ss -tlnp shows the address next to the port: 127.0.0.1:5432 is only reachable from the same machine, 0.0.0.0:5432 from everywhere a firewall allows. If it times out instead, a firewall drops the packets — the difference is explained in “Connection timed out” vs “Connection refused”. See also PostgreSQL connection refused, and Docker container can’t connect to localhost for the container version of the same problem.

Is a service safe if it has a password?

Safer, not safe. A password protects against strangers, but not against brute force or a bug in the service itself. Keep databases, caches and admin APIs on private addresses, and allow only the machines that need them in the firewall. Reach the rest through a VPN or an SSH tunnel: ssh -L 5432:localhost:5432 db-server.

What is the difference between TCP and UDP here?

Most services use TCP. DNS, NTP, syslog, SNMP, VPNs like WireGuard and HTTP/3 use UDP. nc -zv tests TCP; for UDP, nc -zvu can’t tell you much, because a UDP service may simply not answer.

Where can I practice checking ports?

In the lesson Ports: ss, lsof and curl, where two web servers want the same port.

Articles

Learn more

ORA-12514
Databases

Oracle "ORA-12514: listener does not currently know of service": check the name, then the registration

Fix Oracle ORA-12514: list the services the listener knows, use the right service name, open the PDB, register the database with the listener, and fix LOCAL_LISTENER.

Intermediate · 3 min read

avc: denied
Linux

SELinux "avc: denied": read the denial, then fix the label, the boolean or the port

Fix SELinux "avc: denied" on RHEL, Rocky and AlmaLinux: read the AVC line, then fix file labels with restorecon and semanage, booleans with setsebool, or ports.

Intermediate · 4 min read

No route to host
Networking

"No route to host": usually a firewall saying no, sometimes a machine that isn't there

Fix "No route to host" from ssh, curl or nc: check the firewall on the other machine (firewalld rejects by default), then whether the host is up.

Beginner · 4 min read

Authentication failed
Databases

MongoDB "Authentication failed": the authSource is usually what's wrong

Fix MongoDB "Authentication failed": set authSource correctly, encode special characters in the URI, check which database holds the user, and handle Docker volumes.

Beginner · 4 min read

no pg_hba.conf entry
Databases

PostgreSQL "no pg_hba.conf entry for host": allow this connection, the safe way

Fix PostgreSQL "FATAL: no pg_hba.conf entry for host": read the host, user and SSL in the message, add a narrow rule to pg_hba.conf, reload it, and handle Docker and SSL.

Intermediate · 4 min read

OOM command not allowed
Databases

Redis "OOM command not allowed when used memory > maxmemory": choose what to do when full

Fix Redis "OOM command not allowed when used memory > maxmemory": read INFO memory, choose an eviction policy, find big keys, set expiry, and raise maxmemory with care.

Intermediate · 3 min read

could not be contacted
Windows

Windows "The specified domain either does not exist or could not be contacted": it's usually DNS

Fix "The specified domain either does not exist or could not be contacted" when joining a domain: point DNS at a domain controller, test the SRV records, ports and time.

Intermediate · 4 min read

is not allowed to connect
Databases

MySQL "ERROR 1130: Host is not allowed to connect": an account is a user and a host

Fix MySQL ERROR 1130 "Host is not allowed to connect to this MySQL server": see which accounts exist, create one for the right host and grant it access, without root.

Beginner · 4 min read

port is already allocated
Docker & Containers

Docker "port is already allocated" and "ports are not available": find who has the port

Fix Docker "Bind for 0.0.0.0:8080 failed: port is already allocated" and "Ports are not available": find the container or process using it, and Windows reserved ports.

Beginner · 4 min read

reverse proxy
Networking

Nginx reverse proxy with Docker Compose: in a container or on the host

Put Nginx in front of Docker Compose services: on the host or in a container, connect by service name, fix "host not found in upstream", keep ports private, add HTTPS.

Intermediate · 3 min read

reverse proxy
Networking

Nginx reverse proxy for Node.js and Express, with HTTPS and WebSockets

Set up Nginx in front of a Node.js or Express app: a complete config with HTTPS and WebSockets, a systemd service, trust proxy for real client IPs, and common errors.

Beginner · 3 min read

ORA-12541
Databases

Oracle "ORA-12541: no listener": start it, or connect to the address it really uses

Fix Oracle ORA-12541 "TNS:no listener" (or "Cannot connect. No listener at host"): start it with lsnrctl, check the host and port, listener.ora, firewalls and Docker.

Beginner · 4 min read

NOAUTH
Databases

Redis "NOAUTH Authentication required": send the password, the right way for your client

Fix Redis "NOAUTH Authentication required" and WRONGPASS: find the password, send it from redis-cli and your client, set it in a URL, and use ACL users in Redis 6+.

Beginner · 4 min read

System error 53
Windows

Windows "System error 53" and "System error 5" with net use: the network path, and access denied

Fix net use "System error 53: The network path was not found" and "System error 5: Access is denied": check DNS, ports 445 and 139, the share and your credentials.

Beginner · 4 min read

Cannot connect to the Docker daemon
Docker & Containers

"Cannot connect to the Docker daemon. Is the docker daemon running?": every cause

Fix "Cannot connect to the Docker daemon. Is the docker daemon running?": start the service, read why it failed, check DOCKER_HOST, contexts, Docker Desktop and WSL.

Beginner · 5 min read

failed to authenticate some domains
Security

Certbot "failed to authenticate some domains": read the Type, then fix DNS, port 80 or the path

Fix Certbot "failed to authenticate some domains": read the error type, then fix DNS records, an IPv6 AAAA record, a closed port 80, the webroot, Cloudflare and CAA.

Intermediate · 5 min read

localhost:8080 was refused
Kubernetes

kubectl "The connection to the server localhost:8080 was refused": your kubeconfig is missing

Fix kubectl "The connection to the server localhost:8080 was refused": kubectl has no kubeconfig. Set it up for kubeadm, k3s, minikube, EKS, GKE or AKS, and under sudo.

Beginner · 3 min read

ECONNREFUSED 127.0.0.1:27017
Databases

MongoDB "connect ECONNREFUSED 127.0.0.1:27017": why it refuses, and how to fix it

Fix MongoDB "connect ECONNREFUSED 127.0.0.1:27017" and ::1:27017: start mongod, read exit code 14, check bindIp, IPv6 localhost in Node.js, and Docker service names.

Beginner · 4 min read

ERROR 2002 (HY000)
Databases

MySQL "Can't connect to local MySQL server through socket": find out why (ERROR 2002)

Fix MySQL ERROR 2002 "Can't connect to local MySQL server through socket": is the server running, where is the socket, and why localhost differs from 127.0.0.1.

Beginner · 4 min read

Can't connect to MySQL server
Databases

MySQL "ERROR 2003: Can't connect to MySQL server": read the number in brackets

Fix MySQL ERROR 2003 "Can't connect to MySQL server": the number in brackets says if it's a stopped server, bind-address, a firewall or the wrong host in Docker.

Beginner · 4 min read

ORA-12154
Databases

Oracle "ORA-12154: TNS:could not resolve the connect identifier specified": how to fix it

Fix Oracle ORA-12154: the client can't find your connect identifier. Check tnsnames.ora, TNS_ADMIN and sqlnet.ora, an @ in the password, or use Easy Connect.

Intermediate · 4 min read

An authentication error has occurred
Windows

RDP "An authentication error has occurred": CredSSP encryption oracle and other causes

Fix Remote Desktop "An authentication error has occurred" and "CredSSP encryption oracle remediation": update both machines, check NLA, passwords, time and port 3389.

Intermediate · 4 min read

Login failed for user
Databases

SQL Server "Login failed for user" (error 18456): the state tells you why

Fix SQL Server error 18456 "Login failed for user": find the real reason in the log by its state, then fix the password, mixed mode, a disabled login or the database.

Beginner · 5 min read

network-related or instance-specific
Databases

SQL Server "A network-related or instance-specific error" (error 40, error 26): how to fix it

Fix SQL Server "A network-related or instance-specific error occurred": check the service, TCP/IP, the instance name, SQL Browser, port 1433 and the Windows firewall.

Intermediate · 4 min read

RPC server is unavailable
Windows

Windows "The RPC server is unavailable" (0x800706BA): how to find what blocks it

Fix "The RPC server is unavailable" (0x800706BA, error 1722): check the name, port 135, the dynamic ports, the firewall rules and the RPC services, step by step.

Intermediate · 4 min read

Connection timed out
Networking

"Connection timed out" vs "Connection refused": what each one tells you, and how to fix it

Timed out means a firewall dropped the packets; refused means nothing listens there. Tell them apart with nc and curl, then fix ufw, firewalld or the bind address.

Beginner · 5 min read

connect ECONNREFUSED 127.0.0.1
Docker & Containers

Docker: "connection refused" to localhost from a container — how to reach the host

Fix "connection refused" when a container connects to localhost: use host.docker.internal or a Compose service name, make the host service listen, and check the firewall.

Beginner · 4 min read

Is the server running on that host and accepting TCP/IP connections?
Databases

PostgreSQL "Connection refused … Is the server running?": find out why nothing answers on 5432

Fix PostgreSQL "connection refused": check that it runs, read why it did not start, then fix listen_addresses, the port, the firewall or Docker.

Beginner · 3 min read

bind() to 0.0.0.0:80 failed (98: Address already in use)
Networking

"Address already in use": find who is using port 80 (or any port)

Fix "bind() failed (98: Address already in use)": find the process holding the port with ss or lsof, then stop it, move it, or change your port.

Beginner · 5 min read