Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

2.3K
Views
Docker Error - 5432: bind: address already in use

I used to be able to run docker-compose using 5432:5432 port mapping, but am recently getting this error:

Error starting userland proxy: listen tcp 0.0.0.0:5432: bind: address already in use

I've gone through all of the older posts relating to this issue but have yet to be able to solve this.

I've been driving myself mad with this error for the past week trying to figure out how to stop whatever process is running with no avail.

I've tried running

lsof -i tcp:5432

which returns no results (as long as my pgadmin/server is not running)

I've also seen other posts mention running

netstat -anp tcp | grep 5432

which does return two lines:

tcp4       0      0  *.5432                 *.*                    LISTEN     
tcp6       0      0  *.5432                 *.*                    LISTEN 

But I'm not entirely sure what to do with that output?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Run lsof -i tcp:5432 with sudo rights:

sudo lsof -i tcp:5432

A process (very likely PostgreSQL) is listening on port 5432, preventing another to listen on that port. Stop the process, e.g. with systemctl, then you will be able to start your docker PostgreSQL.

over 4 years ago · Santiago Trujillo Report

0

There is a possibility that this might be happening due to multiple instances of postgres running on your machine.

In my case, I had previously installed postgres which was always running on the machine because of which docker-based postgres was unable to start due to the above error. Uninstalling previously installed postgres helped to resolve the issue.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!