botpress / v12

Botpress OSS – v12
https://v12.botpress.com
GNU Affero General Public License v3.0
83 stars 91 forks source link

SSL issue with Heroku and Postgres #144

Closed michaelulin closed 7 years ago

michaelulin commented 7 years ago

After deploying my bot to Heroku, setting up a Heroku postgres database and configuring the environment variables, I receive the following error (I've hidden the database credentials):

`2017-11-07T23:33:56+00:00 app[postgres.985]: [DATABASE] [5-1] sql_error_code = 28000 FATAL: no pg_hba.conf entry for host "IPADDRESS", user "USERID", database "DATABASE", SSL off

2017-11-07T23:33:56.166116+00:00 app[web.1]: (node:27) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): error: no pg_hba.conf entry for host "IPADDRESS", user "USERID", database "DATABASE", SSL off ` Even though the PG_SSL variable is set to true (and I've manually set it in the botfile), there seems to be an issue connecting using SSL. I can connect to the Heroku postgres hobby database, but when I try to use one of their paid databases (the standard database) I receive the SSL error.

Make sure these checkboxes are checked before raising an issue, thank you!

Please also fill in these fields:


Botpress version: <<VERSION HERE>>

1.1.2

Channels: <>

Messenger

michaelulin commented 7 years ago

I was able to get this to work by appending "?ssl=true" to the connection string in the botfile.

mehd-io commented 6 years ago

Thx @michaelulin , I just asked for a pull request to add this in the documentation, time saving :-)

slvnperron commented 6 years ago

@mehd-io Hey, can't see your PR for this? If you open it I'll make sure to merge today. Thanks!

mehd-io commented 6 years ago

Hi @slvnperron Just did : botpress/botpress#306 update database docs heroku postgres