pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPort 25060 failed: FATAL: pg_hba.conf rejects connection for host on Digital OCean
2+ messages / 2 participants
[nested] [flat]
* Port 25060 failed: FATAL: pg_hba.conf rejects connection for host on Digital OCean
@ 2023-05-16 13:48 Uma Annamalai <uannamalai7@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Uma Annamalai @ 2023-05-16 13:48 UTC (permalink / raw)
To: pgsql-admin
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" (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" (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 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 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-entr...
https://dba.stackexchange.com/questions/264560/need-help-understanding-the-error-message-error-conne...
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-u...
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
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
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Port 25060 failed: FATAL: pg_hba.conf rejects connection for host on Digital OCean
@ 2023-05-16 15:22 Wilson Coelho <wilson.coelho@tecnisys.com.br>
parent: Uma Annamalai <uannamalai7@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Wilson Coelho @ 2023-05-16 15:22 UTC (permalink / raw)
To: Uma Annamalai <uannamalai7@gmail.com>; +Cc: pgsql-admin
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-entr... https://dba.stackexchange.com/questions/264560/need-help-understanding-the-error-message-error-conne... 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-u...
>
> 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
Attachments:
[image/gif] f62593aa.gif (43B, ../../e95a0fa62630998c0603b12593e1d5a3@tecnisys.com.br/3-f62593aa.gif)
download | view image
[image/gif] 04237a95.gif (3.1K, ../../e95a0fa62630998c0603b12593e1d5a3@tecnisys.com.br/4-04237a95.gif)
download | view image
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-05-16 15:22 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-05-16 13:48 Port 25060 failed: FATAL: pg_hba.conf rejects connection for host on Digital OCean Uma Annamalai <uannamalai7@gmail.com>
2023-05-16 15:22 ` Wilson Coelho <wilson.coelho@tecnisys.com.br>
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