I am trying to connect a Postgres database which resides in a docker installed on Ubuntu virtual machine. Following exception is being thrown on the console.
org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "10.1.X.X", user "usrXXX", database "dbXXX", SSL off
After going through various posts, I realised that I have to update pg_hba.conf file. I have modified the file to include the following settings.
host dbXXX usrXXX 10.1.X.X/32 trust
(Note I tried with md5 as well.)
I verified the postgres database settings through
psql and executed commands as specified in this post. This verified that I am editing correct file. To take a step further, I also verified the entry through pgAdmin (pgAdmin is installed locally on postgres host) and found the following query is returning records as entered in pg_hba.conf
Not sure where I am going wrong. Here is the preview of how everything is deployed.