Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ijTbW-0004rY-Vm for pgsql-admin@arkaria.postgresql.org; Mon, 23 Dec 2019 19:42:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ijTbV-0003cR-I9 for pgsql-admin@arkaria.postgresql.org; Mon, 23 Dec 2019 19:42:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ijTbV-0003Y4-07 for pgsql-admin@lists.postgresql.org; Mon, 23 Dec 2019 19:42:57 +0000 Received: from mail-ot1-x343.google.com ([2607:f8b0:4864:20::343]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ijTbS-00046J-El for pgsql-admin@lists.postgresql.org; Mon, 23 Dec 2019 19:42:55 +0000 Received: by mail-ot1-x343.google.com with SMTP id 59so23337791otp.12 for ; Mon, 23 Dec 2019 11:42:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=L7iF1kuW/47sNg5sn7uthytbYSD2dvb+wNReKD2yt+4=; b=jFUrTPu5V4435no+zuJJLtjNHod/n7Um/l8pXythWP6wGO0Gr22+/uQHQV5SxMWqH1 DlocNApRMa1wC9zIcCCw2QU4UZ85naURKP0ZmLwUFHr5oZsrjOcqxifv3IY9tjIrNfg4 T2dTnEny5HrazgLCVuwgvfwwMHFktHAyqhEAy2TYYel1yAlkxpbdMSfBkNINX9fgTCzN QE9KxpQzhCEz7nKYiS04T9quduLpXg8Ubp8v9kFXXE8DDWiPGnzkA2Jvt041rjbJpaWM NssMRWOoGFtDoXqYlfuWRg3AuhJ9ARXlKyf+ohOFrKyZ0uKkhsJteNmQ7j//Kh9+aXEG iNLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=L7iF1kuW/47sNg5sn7uthytbYSD2dvb+wNReKD2yt+4=; b=Z+2ByiXHge7Ztjcox7rpGLKvpVO+nr12jyWuztiYwvq3awMvVqjlxwY/M1EaDFiZ63 3b5ZXlTkDtZl5A6g7aZBOen/f1DJBgvGS4FLeu2gRPRA8/RWkUvHr1mYVOAmC3QGc3dp bapsAp6xEGnYNZvkqzldx9nwdlp+IgKZDGd/K+r5klD1yORCG0yDp009aD49kxaMrgnE 5TbShs3iCCRcORgH9XjUA7WSJZOnRgER93kpqRyQT1aqmI3Z8S8OQOe8/1HIFcUKaUZi 29XVeB2Ow+FZWOpTudljGA4cFdh/aBliuwEDgqT16Q2Huga341FSIb1YXPHb5J/+DWQ7 MRBw== X-Gm-Message-State: APjAAAUE/6dh6HhAgszYX+Gss/7WzKCC1aOzTGkYnEbWlEr59nBDOn76 hku7PzIR+25mUnwGuiS5D5oE4/pwpM4= X-Google-Smtp-Source: APXvYqzfQ7heOgxgYwefm+XylbCPsPEn3jLgBxC39dUXoqP6vyeqScuIYvU3xcsMIhiKySyAzpKkzA== X-Received: by 2002:a9d:6045:: with SMTP id v5mr32130842otj.252.1577130173488; Mon, 23 Dec 2019 11:42:53 -0800 (PST) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id i13sm5278126oik.7.2019.12.23.11.42.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Dec 2019 11:42:52 -0800 (PST) Subject: Re: Cannot connect to postgresql on port 5432 To: pgsql-admin@lists.postgresql.org References: <2A91BEF8171A5349931391E0C721CC537D772EF8@CPEMS-KPN501.KPNCNL.LOCAL> <1358309851.1890679.1577129999416@mail.yahoo.com> From: Ron Message-ID: <59344aeb-89e6-b107-f6a7-05ae9d58dc31@gmail.com> Date: Mon, 23 Dec 2019 13:42:52 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <1358309851.1890679.1577129999416@mail.yahoo.com> Content-Type: multipart/alternative; boundary="------------8B7485FAB9C6EBD18B18BF6F" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------8B7485FAB9C6EBD18B18BF6F Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit That error won't happen until after a connection is accepted.  And will throw a different error message. On 12/23/19 1:39 PM, Pepe TD Vo wrote: > change md5 to trust and try to connect again > > ** > *Bach-Nga > > *No one in this world is pure and perfect.  If you avoid people for their > mistakes you will be alone. So judge less, love and forgive more. > To call him a dog hardly seems to do him justice though in as much as he > had four legs, a tail, and barked, I admit he was, to all outward > appearances. But to those who knew him well, he was a perfect gentleman > (Hermione Gingold) > > **Live simply **Love generously **Care deeply **Speak kindly. > *** Genuinely rich *** Faithful talent *** Sharing success > > > On Monday, December 23, 2019, 02:30:35 PM EST, > wrote: > > > Hi Experts, > > Post installation of  PostgreSQL it is not listening on an IP, only on > localhost. > > Please suggest your inputs. > > *_Used below command for installations –_* > > *# apt-get install postgresql-12* > > postgres=# select version(); > > version > > ------------------------------------------------------------------------------------------------------------------ > > PostgreSQL 12.1 (Debian 12.1-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled > by gcc (Debian 8.3.0-6) 8.3.0, 64-bit > > (1 row) > > *_Entries in ::: /etc/postgresql/12/main/pg_hba.conf _* > > # Database administrative login by Unix domain socket > > local all postgres                                peer > > # TYPE  DATABASE        USER ADDRESS                 METHOD > > # "local" is for Unix domain socket connections only > > local all             all                    peer > > # IPv4 local connections: > > host all             all 127.0.0.1/32            md5 > > # IPv6 local connections: > > host all             all ::1/128                 md5 > > # Allow replication connections from localhost, by a user with the > > # replication privilege. > > local replication all                                     peer > > host replication     all 127.0.0.1/32            md5 > > host replication     all ::1/128                 md5 > > *_Not connected_* > > *__* > > *postgres@srv:/opt$ netstat -nlp | grep 5432* > > (Not all processes could be identified, non-owned process info > > will not be shown, you would have to be root to see it all.) > > tcp 0      0 127.0.0.1:5432 0.0.0.0:*               LISTEN      25857/postgres > > unix 2      [ ACC ]     STREAM     LISTENING 74234    25857/postgres > /var/run/postgresql/.s.PGSQL.5432 > > *postgres@srv:~$ telnet 10.133.214.32 5432* > > Trying 10.133.214.32... > > telnet: Unable to connect to remote host: Connection refused > -- Angular momentum makes the world go 'round. --------------8B7485FAB9C6EBD18B18BF6F Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit That error won't happen until after a connection is accepted.  And will throw a different error message.

On 12/23/19 1:39 PM, Pepe TD Vo wrote:
change md5 to trust and try to connect again

Bach-Nga

No one in this world is pure and perfect.  If you avoid people for their mistakes you will be alone. So judge less, love and forgive more.
To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)

**Live simply **Love generously **Care deeply **Speak kindly.
*** Genuinely rich *** Faithful talent *** Sharing success


On Monday, December 23, 2019, 02:30:35 PM EST, <soumik.bhattacharjee@kpn.com> wrote:


Hi Experts,

 

Post installation of  PostgreSQL it is not listening on an IP, only on localhost.

 

Please suggest your inputs.

 

 

Used below command for installations –

 

# apt-get install postgresql-12

postgres=# select version();

                                                     version

------------------------------------------------------------------------------------------------------------------

PostgreSQL 12.1 (Debian 12.1-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit

(1 row)

 

Entries in ::: /etc/postgresql/12/main/pg_hba.conf

# Database administrative login by Unix domain socket

local   all             postgres                                peer

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only

local   all             all                                     peer

# IPv4 local connections:

host    all             all             127.0.0.1/32            md5

# IPv6 local connections:

host    all             all             ::1/128                 md5

# Allow replication connections from localhost, by a user with the

# replication privilege.

local   replication     all                                     peer

host    replication     all             127.0.0.1/32            md5

host    replication     all             ::1/128                 md5

 

Not connected

 

postgres@srv:/opt$ netstat -nlp | grep 5432

(Not all processes could be identified, non-owned process info

will not be shown, you would have to be root to see it all.)

tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      25857/postgres

unix  2      [ ACC ]     STREAM     LISTENING     74234    25857/postgres       /var/run/postgresql/.s.PGSQL.5432

 

 

postgres@srv:~$ telnet 10.133.214.32 5432

Trying 10.133.214.32...

telnet: Unable to connect to remote host: Connection refused

 

 

 


--
Angular momentum makes the world go 'round.
--------------8B7485FAB9C6EBD18B18BF6F--