I just set up a postgress (version 10) db on a digital ocean box, attempted to set up a datasource with all the provided db info such as host, dbname, port, user/pwd etc. with lucee via admin, however, I got err msg [ FATAL: no pg_hba.conf entry for host “206.189.237.123”, user “myuser”, database “mydb”, SSL off ]; also, by default, they set sslmode:require.
In the meantime, I was able to connect to it via psql client without specifying ssl or sslmode at command line.
What do I need to do to create a datasource for this postgres db via lucee on ubuntu?
That’s helpful, which I appreciate.
Now, the thing is, since the postgresql db I created was via digital ocean’s create db service, I don’t seem to have terminal access to the host server/computer of the db server, and DO’s admin panel does not seem to have a way to allow one to edit the pg_hba_conf file. So, I’m stuck, unable to edit this file per the suggested solution. Or ?
No, 127.0.0.1 does not make sense because it implies that the current DO box is the same as the postgresql server while DO’s info about the newly created postgresql db has a different host name for the db server. So, it didn’t work.
Good to know, but too bad we are unable to touch any file on the db server rented from DO because we do not have direct access to the db server’s file system.
Roberto is right. You also have to ensure that Postgres is listening on an IP other than the localhost loopback, which is default and listens only on 127.0.0.1 and ::1. That setting is in the postgresql.conf file.
Joe is right. If they do not enable access for you then what’s the point?
@joe.gooch@isapir you both are right, if memory serves I raised the issue with DO and they didn’t respond, so, I’ve advised my client to cancel the postgresSQL server from DO.
Sounds like they didn’t go through the setup procedure properly. I had a look this morning and it asks you which droplets/IPs you want to allow access to Postgres which they might have missed.