postbird
postbird copied to clipboard
Connect to SSL database
Hi!
I'm having an issue trying to connect o an SSL enabled postgres database, which does not live locally.
FATAL: no pg_hba.conf entry for host "<IP>", user "<UERNAME>", database "<DBNAME>", SSL off
I've tried adding the ?ssl=true
to the connection string, which is what I needed to do for my API to talk to the database, but (1) I don't know where to do that on the "standard" connection tab and (2) if I do it using the "Connect URL" tab it complains about the sslmode having an invalid value of true.
Great product!
Interesting.. I don't have an ssl enabled server to test against at the moment, but if I try appending the ssl=true
param to the end of the connect string, I get the sort of message I expect.
I think this may be a heroku specific issue. but I tried it with bdash (https://www.bdash.io/) just to make sure I wasn't eating crazy pills, and I could connect to it just fine.
The reason I tried bdash was because I ran into this: https://github.com/bdash-app/bdash/issues/7 which led me to this: https://devcenter.heroku.com/articles/connecting-to-heroku-postgres-databases-from-outside-of-heroku#ssl
I would like to keep using postbird.
appending ?sslmode=require
seems to not even register with postbird. (same pg_hba.conf error message)
I am having the same issue. How do you specify SSL in the standard connection tab?
What OS do you use?
On MacOS postbird will use https://github.com/brianc/node-pg-native and on Linux with Windows https://github.com/brianc/node-postgres (I can only many static build of libpq for mac)
By experimenting I found that node-pg-native needs ?ssl=
be something like disable
, allow
, prefer
(default), require
, verify-ca
, verify-full
But node-postgres will accept ?ssl=1
or ?ssl=true
, otherwise false (default is false)
Heroku URL (via heroku login) will be with ?ssl=verify-full
, for now you may open inspector by View -> Toggle Developer Tools, try connect to heroku db, and you see log message like
connecting to postgres://xxx:[email protected]:5432/xxxx?ssl=verify-full
Change ssl=verify-full
to ssl=1
and try to connect via URL form
For now there is no way to specify ssl via normal form, only with "Connect URL"
This is defiantly a bug, will try to fix it
i'm on macOS. I was trying to use Connect URL with ?ssl=require
or ?sslmode=require
but neither of those seemed to work. verify-full
showed the pg_hba.conf error and the ssl=1
showed "invalid value true"
How do I fix this?
Can you please try with new version? I made small improvements for enabling ssl
I tired it. I tried many things same result. But for some reason I only see one db now instead of five.
[image: Screen Shot 2019-05-06 at 12.21.06 AM.png]
On Sun, May 5, 2019 at 11:12 PM Pavel Evstigneev [email protected] wrote:
Can you please try with new version? I made small improvements for enabling ssl
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Paxa/postbird/issues/43#issuecomment-489510086, or mute the thread https://github.com/notifications/unsubscribe-auth/AHGJ3N5PB3EXDDZPXSMTUZLPT7D4BANCNFSM4GSOK42A .
version 0.8.2
ssl=true # invalid sslmode
ssl=1 # no pg_hba.conf
ssl=require # pg_hba
ssl=verify-full # pg_hba
Is there some other configuration I should try?
Can you try with this package? https://postbird.paxa.kuber.host/2019_06_16.13_11-disable-libpq-4bc4376 I disabled libpq, may be it work
@Paxa with the version provided in https://github.com/Paxa/postbird/issues/43#issuecomment-502447876 the ssl=true
at the end of the connection string worked!
I have the same error =( connection Digital Ocean error: SSL off.
@thiagofasano you could rock it cutting edge style and run the package from https://github.com/Paxa/postbird/issues/43#issuecomment-502447876
@Paxa I feel like this issue is actually resolved now, or do you want to wait for it to get released?
@chrisdl not work.. ssl=true
Per this suggestion here, I found that appending ?ssl=verify-full
to the connection url works for me.
The latest development artifacts seem to have this problem fixed (https://postbird.paxa.kuber.host/2020_01_19.16_38-master-1020bfa - link from near the bottom of the readme).
The problem in connect via URL is don't save the connection.
Heroku message
SSL
Applications outside of the Heroku network must support and enable SSL to connect to a Heroku Postgres database. Most clients connect over SSL by default, but sometimes it’s necessary to add the sslmode=require query parameter to your database URL before connecting.
Be sure to append the sslmode=require parameter to your database’s URL from code, rather than by editing the value of your DATABASE_URL config var directly. Various automated events (such as a failover) can change the value of the config var, which overwrites any edits you make.
Is any way to connect in standard mode adding ssl?
for postbird, appending ?ssl=true to the connection url solved my own problem.