1

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 ?

KosiB
  • 1,086
  • 1
  • 7
  • 13

3 Answers3

1

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.

0

This error message means you are trying to connect to the Database without TLS. Databases for PostgreSQL will reject unsecured connections.

https://cloud.ibm.com/docs/services/databases-for-postgresql?topic=databases-for-postgresql-security-compliance#protection-against-unauthorized-access

https://cloud.ibm.com/docs/services/databases-for-postgresql?topic=databases-for-postgresql-external-app

Joshua Mintz
  • 124
  • 4
  • Thanks Joshua, But connecting from the Watson Studio how we enable TLS. Because it seems this control is not given to the user. – KosiB Jun 24 '19 at 18:59
  • @KosiB it depends on how you're adding the database. How are you using it? In a Python notebook or something? – Dr G. Jun 25 '19 at 23:41
0

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