port 5432 in use PostgreSQL Origin: Data Last updated 13 Oct 2026

LOG: could not bind IPv4 address "0.0.0.0": Address already in use — Is another postmaster already running on port 5432?

Another process (often a second PostgreSQL install or a container) already listens on 5432.

Exact message you may see could not bind IPv4 addressIs another postmaster already running on port 5432
Seen on: PostgreSQL

Meaning

Homebrew + Postgres.app + Docker on the same machine commonly fight over 5432.

Common causes

  • Another PostgreSQL installation running
  • Docker container publishing 5432
  • Stale process

⚡ Quick fix

  1. Find the owner: lsof -i :5432
  2. Stop the other instance or change the port

Detailed fix by platform

Linux

  1. sudo lsof -i :5432

How to diagnose

  1. Owner — Which process holds 5432?
  2. Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Data. Errors that are often confused with or caused by this one (click to open):

500.30 — HTTP Error 500.30 - ASP.NET Core app failed to start (.NET)500.3055006 — ERROR: database "x" is being accessed by other users — There is 1 other session using the database. (PostgreSQL)5500657P03 — FATAL: the database system is starting up (PostgreSQL)57P03EADDRINUSE — Error: listen EADDRINUSE: address already in use :::3000 (Node.js)EADDRINUSEExceptionInInitializerError — java.lang.ExceptionInInitializerError (Java)ExceptionInInitialize…Exited (0) — Docker container exits immediately (Exited (0) / Exited (1) right after start) (Docker)Exited (0)Failed to bind to address — System.IO.IOException: Failed to bind to address http://127.0.0.1:5000: address already in use (.NET)Failed to bind to add…iptables: No chain/target/match — driver failed programming external connectivity on endpoint: iptables: No chain/target/match by that name (Docker)iptables: No chain/ta…port 5432…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.