IBM Cloud Compose PostgresSQL FATAL: no pg_hba.conf entry for host

1.1k views Asked by At

Provisioned an IBM Cloud Compose PostgreSQL instance. Then tried to connect the instance to the Watson Studio.

Although establishing a connection works fine, when I try to save retraining configuration getting the following error message.

Error: Unhandled exception of type PSQLException with message: FATAL: no pg_hba.conf entry for host "", user "", database "", SSL off

I do not think I can ssh to the db host and just change the pg_hba.conf file.

I do not think this is a possibility as the IBM Cloud Compose PostgreSQL is server less instance (I think).

How do I resolve this ?

3

There are 3 answers

2
Joshua Mintz On
0
Frederic Lachasse On

How do you connect? Do you use a connection asset? Is this connection asset using the "Compose for PostgreSQL" or "PostgreSQL" type of connection? The "Compose for PostgreSQL" type of connection asset uses TLS, so should work.

1
Venkatraman Poornalingam On

You have to add all the nodes accessing Postgres to pg_hba.conf file in the postgres server. For example,if the CIDR for the nodes connecting to Postgres is 192.168.1.0/24, then an entry like the following is required.

# 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      ident host     all               all        192.168.1.0/24      trust

You have to find where to do this in IBM Cloud