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 1pywWo-0002Vm-D5 for pgsql-admin@arkaria.postgresql.org; Tue, 16 May 2023 15:23:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pywWn-0006nE-BF for pgsql-admin@arkaria.postgresql.org; Tue, 16 May 2023 15:23:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pywWm-0006mG-UQ for pgsql-admin@lists.postgresql.org; Tue, 16 May 2023 15:23:53 +0000 Received: from mail49195.hm1315.locaweb.com.br ([201.76.49.195]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pywWh-000A9u-03 for pgsql-admin@postgresql.org; Tue, 16 May 2023 15:23:52 +0000 Received: from mcbain0006.email.locaweb.com.br (189.126.112.72) by mail4950.hm1315.locaweb.com.br id hcefva2n8lgh for ; Tue, 16 May 2023 12:22:10 -0300 (envelope-from ) Received: from dragonite0049.email.locaweb.com.br (unknown [10.31.120.188]) by mcbain0006.email.locaweb.com.br (Postfix) with ESMTP id BFC156C003E; Tue, 16 May 2023 12:19:14 -0300 (-03) x-locaweb-id: znz2UKlZmwlijKhAuUsBK9FtKNhayweZfS3412ZpXlAeno1LCeyU2PcL1bDEQNXlqLQ-pK8gD0lBHfwPogkVmI2G_Fcujzol1uAX60Lsi1kSbyl2igpE3MW0VyBGDnfZPDUZ7v6kfRm4OCxHPqLi680LhBd9szcCbvcyUnSXP_arl6uQN7N1lm8PS-3qxkGjPQOCjUnm7H_S4q2G7JueTeBlzah4shLylfciHOMvOGk= Nzc2OTZjNzM2ZjZlMmU2MzZmNjU2YzY4NmY0MDc0NjU2MzZlNjk3Mzc5NzMyZTYzNmY2ZDJlNjI3Mg== x-locaweb-id: znz2UKlZmwlijKhAuUsBK9FtKNhayweZfS3412ZpXlAeno1LCeyU2PcL1bDEQNXlqLQ-pK8gD0lBHfwPogkVmI2G_Fcujzol1uAX60Lsi1kSbyl2igpE3MW0VyBGDnfZPDUZ7v6kfRm4OCxHPqLi680LhBd9szcCbvcyUnSXP_arl6uQN7N1lm8PS-3qxkGjPQOCjUnm7H_S4q2G7JueTeBlzah4shLylfciHOMvOGk= Nzc2OTZjNzM2ZjZlMmU2MzZmNjU2YzY4NmY0MDc0NjU2MzZlNjk3Mzc5NzMyZTYzNmY2ZDJlNjI3Mg== Received: from webmail-seguro.com.br (localhost [127.0.0.1]) (Authenticated sender: wilson.coelho@tecnisys.com.br) by dragonite0049.email.locaweb.com.br (Postfix) with ESMTPA id 58F982C030B; Tue, 16 May 2023 12:22:15 -0300 (-03) MIME-Version: 1.0 Date: Tue, 16 May 2023 12:22:15 -0300 From: Wilson Coelho To: Uma Annamalai Cc: pgsql-admin@postgresql.org Subject: Re: Port 25060 failed: FATAL: pg_hba.conf rejects connection for host on Digital OCean In-Reply-To: References: Return-Receipt-To: Wilson Coelho Disposition-Notification-To: Wilson Coelho Message-ID: X-Sender: wilson.coelho@tecnisys.com.br User-Agent: Roundcube Webmail/1.4.11 Content-Type: multipart/alternative; boundary="=_08c4191304a762685e5944986e8758f2" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=_08c4191304a762685e5944986e8758f2 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Uma, it seems that your pg_hba.conf doesn't have any rule for external access to the databases hosted at the server. Due to absence of that rule, postgresql only accept local connection. Your pgadmin are installend on the postgresql server? regards Wilson Coelho --- Wilson Moraes Coelho Especialista Sia Trecho 08, lotes 245 / 255 / 265 || Tel.:+55 (61) 3039-9700 - (61) 99989-8932 71205-080 || Guará || Brasília, DF 0800-6020097 www.tecnisys.com.br [4] Em 16/05/2023 10:48, Uma Annamalai escreveu: > Hi PGSQL-Admin team, > > We did not have any issue but did not run the Digital ocean DB seeding for months and when the team tried to re-do it, we experienced the below error within the Pgadmin. We've been blocked for over 1 week now and tried so many things and nothing works. This is stalling a lot of our work. > > Full error: connection to server at "DBNAME.b.db.ondigitalocean.com [1]" (IP address), port 25060 failed: FATAL: pg_hba.conf rejects connection for host "IP address", user "NAME", database "NAME", SSL encryption > connection to server at "DBNAME.b.db.ondigitalocean.com [1]" (IP Address), port 25060 failed: FATAL: no pg_hba.conf entry for host "IP Address", user "NAME", database "NAME", no encryption > > * Does the order that you type out the updated information into the pg_hba.conf file matter? If so what is the correct order? > * What are the steps that I can take to resolve the issue? Do any of the articles referenced already actually provide the solution? > * Is this error occurring because I'm not on md5 method and it is on the default scram-sha-256? > > The current pg_hba.conf file looks like this. After we tried making the changes recommended in the links, our postgresql stopped working all together so we reverted back to the original file. > > # TYPE DATABASE USER ADDRESS METHOD > # "local" is for Unix domain socket connections only > local all all scram-sha-256 > # IPv4 local connections: > host all all 127.0.0.1/32 [2] scram-sha-256 > # IPv6 local connections: > host all all ::1/128 scram-sha-256 > # Allow replication connections from localhost, by a user with the > # replication privilege. > local replication all scram-sha-256 > host replication all 127.0.0.1/32 [2] scram-sha-256 > host replication all ::1/128 scram-sha-256 > > Articles referred and tried: > https://dba.stackexchange.com/questions/83984/connect-to-postgresql-server-fatal-no-pg-hba-conf-entry-for-host https://dba.stackexchange.com/questions/264560/need-help-understanding-the-error-message-error-connecting-to-database-fatal https://dba.stackexchange.com/questions/161104/pgadmin-postgresql-no-pg-hba-conf-entry-for-host https://dba.stackexchange.com/questions/320468/postgresql-fatal-no-pg-hba-conf-entry-for-host-ipv6-user-user-databas > > We have looked into somewhat related articles on stack exchange. Tried changing it to event listeners is * and changed to host all all 0.0.0.0/0 [3] with trusted per user. Its still saying the same error and we expected the error to be resolved. > > Also another thing is that in our Digital Ocean server - the SSL is default set to required and it is not allowing a change. This same required is stuck and not allowing it to be changed within the SSH portion of the Postgresql. Some folks have indicated that the SSL needs to be changed to true or that the reason for the issue is a mismatch between the SSL security in Digital Ocean versus Postgresql. But we are not able to attempt a change. > > * How would we be able to change the SSL to true if that is what will help resolve the issue? > > Uma Links: ------ [1] http://DBNAME.b.db.ondigitalocean.com [2] http://127.0.0.1/32 [3] http://0.0.0.0/0 [4] http://www.tecnisys.com.br --=_08c4191304a762685e5944986e8758f2 Content-Type: multipart/related; boundary="=_9082f32d0c10dce9a3d0ee6617c7039a" --=_9082f32d0c10dce9a3d0ee6617c7039a Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8

Uma, it seems that your pg_hba.conf doesn't have any rule for external a= ccess to the databases hosted at the server.
Due to absence of that ru= le, postgresql only accept local connection.
Your pgadmin are installe= nd on the postgresql server?

regards
Wilson Coelho

---

Wilson Moraes Coelho
Especialist= a

3D"Logo

Sia Trecho 08, lotes 245 / 255 / 265 ||

Tel.:+55 (61)= 3039-9700 - (61) 99989-8932

71205-080 || Guará || Brasília, DF 0800-6020097

www.tecnisys.com.br


Em 16/05/2023 10:48, Uma Annamalai escreveu:

Hi PGSQL-Admin team, 
 
We did not have any issue but did not run the Digital ocean DB seeding= for months and when the team tried to re-do it, we experienced the below e= rror within the Pgadmin. We've been blocked for over 1 week now and tried s= o many things and nothing works. This is stalling a lot of our work.

Full error: connection to server at "DBNAME= =2Eb.db.ondigitalocean.com" (IP address), port 25060 failed: FATAL: pg_= hba.conf rejects connection for host "IP address", user "NAME", database "N= AME", SSL encryption
connection to server at "D= BNAME.b.db.ondigitalocean.com" (IP Address), port 25060 failed: FATAL: = no pg_hba.conf entry for host "IP Address", user "NAME", database "NAME", n= o encryption

  • Does the order that you type out the updated information into the pg_hb= a.conf file matter? If so what is the correct order?
  • What are the steps that I can take to resolve the issue? Do any of the = articles referenced already actually provide the solution?
  • Is this error occurring because I'm not on md5 method and it is on the = default scram-sha-256?
The current pg_hba.conf file looks like this. After we tried making the cha= nges recommended in the links, our postgresql stopped working all together = so we reverted back to the original file.

# TYPE DATABASE USER A= DDRESS METHOD
# "local" is for Unix domain socket connections only
local all all scram-sha-256
# IPv4 local connections:
host all = all 127.0.0.1/32 scram-sha-256
# IPv6 local connections:
h= ost all all ::1/128 scram-sha-256
# Allow replication connections from= localhost, by a user with the
# replication privilege.
local rep= lication all scram-sha-256
host replication all 127.0.0.1/32 sc= ram-sha-256
host replication all ::1/128 scram-sha-256

Arti= cles referred and tried:
https://dba.stackexchange.= com/questions/83984/connect-to-postgresql-server-fatal-no-pg-hba-conf-entry= -for-host https://dba.stackexchange.com= /questions/264560/need-help-understanding-the-error-message-error-connectin= g-to-database-fatal https://dba.stackexchange.com/questions/161104/= pgadmin-postgresql-no-pg-hba-conf-entry-for-host https://dba.stackexchange.com/questions/320468/postgresql-fatal-no-pg-= hba-conf-entry-for-host-ipv6-user-user-databas

We have looke= d into somewhat related articles on stack exchange. Tried changing it to ev= ent listeners is * and changed to host all all 0.0.0.0/0 with trusted p= er user. Its still saying the same error and we expected the error to be re= solved.
 

Also another thing is that in our Digital Ocean server - the SSL= is default set to required and it is not allowing a change. This same requ= ired is stuck and not allowing it to be changed within the SSH portion of t= he Postgresql. Some folks have indicated that the SSL needs to be changed t= o true or that the reason for the issue is a mismatch between the SSL secur= ity in Digital Ocean versus Postgresql. But we are not able to attempt a ch= ange.

  • How would we be able to change the SSL to true if that is what will hel= p resolve the issue?
Uma
--=_9082f32d0c10dce9a3d0ee6617c7039a Content-Transfer-Encoding: base64 Content-ID: Content-Type: image/gif; name=f62593aa.gif Content-Disposition: inline; filename=f62593aa.gif; size=43 R0lGODlhAQABAJEAAAEuhwAAAAAAAAAAACwAAAAAAQABAAAIBAABBAQAOw== --=_9082f32d0c10dce9a3d0ee6617c7039a Content-Transfer-Encoding: base64 Content-ID: <04237a95e4ba3d087c62288085bb774d@tecnisys.com.br> Content-Type: image/gif; name=04237a95.gif Content-Disposition: inline; filename=04237a95.gif; size=3169 R0lGODlh/AAnAPcAAP////7+//39/vz8/vv7/fr7/fn6/Pj5/Pf4+/b3+/X2+vT2+vP1+fL0+fHz +PDy+O/y9+7x9+3w9+zv9uvu9urt9ent9ejs9Ofr9Obq8+Xp8+To8uPo8uLn8eHm8eDl8N/k8N7k 793j79zi7tvh7trg7tnf7djf7dfe7Nbd7NXc69Tb69Pa6tLa6tDY6c/X6M7W6M3W58zV58vU5srT 5snS5sjR5cfR5cbQ5MXP5MTO48PN48LM4sHM4sDL4b/K4b7J4L3I4LzI37vH37rG3rnF3rjE3bfD 3bbD3bXC3LTB3LPA27K/27G+2rC+2q+92a682a272Ky62Ku616q516m41qi31qe21aa11aW11aS0 1KOz1KKy06Gx06Cx0p+w0p6v0Z2u0Zyt0Jus0Jqsz5mrz5iqzpaozZWnzZSnzJOmzJKlzJGky5Cj y4+jyo6iyo2hyYygyYufyIqeyImex4idx4ecxoabxoWaxYSZxYOZxIKYxICWw3+Vw36Vwn2UwnyT wXuSwXqRwHmQwHiQv3ePv3aOvnWNvnSMvXOLvXKLvHGKvHCJu2+Iu26Hu22HumuFuWqEuWmDuGiC uGeCt2WAtmR/tmN+tWJ9tWF9tGB8tF97s156s115slx5slt4sll2sVh1sFd0sFZ0r1Vzr1RyrlNx rlJwrVFwrVBvrE9urE5tq01sq0xrqktrqkpqqklpqUdnqEZmqEVmp0Rlp0NkpkJjpkFipUBipT9h pD5gpD1fozxeoztdojpdojlcoThboTdaoTZZoDVYoDRYnzNXnzJWnjFVnjBUnS9UnS5TnC1SnCxR mytQmypPmilPmihOmSdNmSZMmSVLmCRKmCNKlyJJlyFIliBHlh9GlR1FlBxElBtDkxpCkxlBkhhB khdAkRY/kRU+kBQ9kBM8kBI8jxE7jxA6jg85jg44jQ04jQw3jAs2jAo1iwk0iwgzigczigYyiQUx iQQwiAMviAIviAEuhwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAAPcALAAAAAD8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