Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZlQ8-0001in-W3 for pgsql-general@arkaria.postgresql.org; Wed, 08 Mar 2023 04:28:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pZlQ7-0006ag-Mk for pgsql-general@arkaria.postgresql.org; Wed, 08 Mar 2023 04:28:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZlQ7-0006XU-Ax for pgsql-general@lists.postgresql.org; Wed, 08 Mar 2023 04:28:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZlQ5-0004LK-0A for pgsql-general@lists.postgresql.org; Wed, 08 Mar 2023 04:28:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 3284So4c119638; Tue, 7 Mar 2023 23:28:50 -0500 From: Tom Lane To: Siddharth Jain cc: pgsql-general@lists.postgresql.org Subject: Re: could not bind IPv4 address "127.0.0.1": Address already in use In-reply-to: References: Comments: In-reply-to Siddharth Jain message dated "Tue, 07 Mar 2023 17:28:13 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <119636.1678249730.1@sss.pgh.pa.us> Date: Tue, 07 Mar 2023 23:28:50 -0500 Message-ID: <119637.1678249730@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Siddharth Jain 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