pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Siddharth Jain <siddhsql@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: could not bind IPv4 address "127.0.0.1": Address already in use
Date: Tue, 07 Mar 2023 23:28:50 -0500
Message-ID: <119637.1678249730@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPqV3pQ3jFTe6YnrVg7adQqjPjmmYFXYC+gPbURCAqJs6Pot9A@mail.gmail.com>
References: <CAPqV3pQ3jFTe6YnrVg7adQqjPjmmYFXYC+gPbURCAqJs6Pot9A@mail.gmail.com>

Siddharth Jain <siddhsql@gmail.com> writes:
> But when I try to start the server I get this:

> 2023-03-07 17:16:43.228 PST [25925] LOG:  could not bind IPv6 address
> "::1": Address already in use
> 2023-03-07 17:16:43.228 PST [25925] HINT:  Is another postmaster already
> running on port 5432? If not, wait a few seconds and retry.
> 2023-03-07 17:16:43.228 PST [25925] LOG:  could not bind IPv4 address
> "127.0.0.1": Address already in use
> 2023-03-07 17:16:43.228 PST [25925] HINT:  Is another postmaster already
> running on port 5432? If not, wait a few seconds and retry.

That's pretty clear I think: the ports are already bound.

> I ran:
>   netstat -ln -p tcp | grep 5432
> and there is no output.

This is the wrong incantation for this purpose.  Try

netstat -an -p tcp | grep 5432

I expect you'll see a couple of ports in LISTEN state.  Unfortunately,
netstat is not much help at locating the processes listening to such
ports.  This might be more help:

lsof -n | grep 5432

			regards, tom lane





view thread (3+ messages)  latest in thread

Message-ID: <119637.1678249730@sss.pgh.pa.us>
Permalink:  ../119637.1678249730@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/119637.1678249730@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, siddhsql@gmail.com
  Subject: Re: could not bind IPv4 address "127.0.0.1": Address already in use
  In-Reply-To: <119637.1678249730@sss.pgh.pa.us>
  References: <CAPqV3pQ3jFTe6YnrVg7adQqjPjmmYFXYC+gPbURCAqJs6Pot9A@mail.gmail.com> <119637.1678249730@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox