No pg_hba.conf entry for host

I created a cloud database on DO using the Resouce Manager and successfully deployed my project. However I get this error in the browser console.

{
"status": "500",
"code": "28000",
"message": "no pg_hba.conf entry for host "my_droplet_ip_address", user "doadmin", database "defaultdb", no encryption",
"stack": "error: no pg_hba.conf entry for host "my_droplet_ip_address\", user "doadmin", database "defaultdb", no encryption\n at Parser.parseErrorMessage (/opt/node_app/node_modules/pg-protocol/dist/parser.js:283:98)\n at Parser.handlePacket (/opt/node_app/node_modules/pg-protocol/dist/parser.js:122:29)\n at Parser.parse (/opt/node_app/node_modules/pg-protocol/dist/parser.js:35:38)\n at Socket. (/opt/node_app/node_modules/pg-protocol/dist/index.js:11:42)\n at Socket.emit (node:events:519:28)\n at addChunk (node:internal/streams/readable:559:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)\n at Readable.push (node:internal/streams/readable:390:5)\n at TCP.onStreamRead (node:internal/stream_base_commons:191:23)"
}

I have added both the local machine and droplet IPs to the trusted sources.

I added the DO SSL certificate when creating the remote target. The SSL is saved under the app folder.

Any idea how to solve this?

The “use SSL” option is not enabled and you haven’t selected the CA certificate for this database connection. Check the options again. There were some issues in saving that will be also solved in the next update.

Also in the next update we will do this automatically for Digital Ocean managed databases.

Thanks George,

I had the SSL option enabled and SSL selected. When I click test, the DB connection comes up as "OK".

Using PgAdmin, I can successfully connect to a cloud database, and see that the database has been created successfully on the remote target.

If further changes are coming up this week, then hopefully that will solve this.

If you are getting a this for the remote target only, maybe you can try to move your certificate file in the /certs folder of your project. Create it if it doesn’t exists and reselect it in the connection settings.

I moved the cert file into the /certs folder and reselected it in the connection settings. Redeployed the project, but the error persists.

Have you also enabled the SSL in the server connect database connection? Under workflows / server connect global database connections?

Thanks, George.

Enabling SSL under the server connect DB connection worked. It would be great if all this is automatically created and selected.

Cheers :slight_smile:

1 Like

Fixed in Wappler 6.6.1

This topic was automatically closed after 14 hours. New replies are no longer allowed.