-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot connect to Postgres on AWS #77
Comments
@ejstembler sorry for the delay, are you on slack or somewhere you could DM me and maybe give me access to a test database in ec2 you can't connect to so I can reproduce? I'll get around to it faster if we can do that :) |
Sure, I'm creating one today. What's the best way to give you the credentials? I'm on twitter and Slack as the same username as my GitHub/GitLab. |
@tsloughter Let me know if you can test this. I spun up a Postgres RDS on AWS for this two weeks ago, and it costs me money... |
Argh, sorry, just saw this, if I'd known you'd kept it running I'd have prioritized this better, very sorry! I'll ping you on slack. |
@tsloughter No worries. I'm not on Slack any longer after I switched jobs 4 years ago. I can DM you on twitter, or if you prefer email... Or, do you already have a workspace on Slack for the repo? |
email (tristan@sloughter.dev) or twitter (t_sloughter) is fine |
Thanks. I sent an email... |
Hm, so it works for me with
Note it does log about the encryption:
But I'm not getting |
Looks like I'm running 14.2.2:
Yes, It reutrns 1> application:ensure_all_started(pgo).
{ok,[backoff,opentelemetry_api,pg_types,pgo]}
2> application:ensure_all_started(ssl).
{ok,[]}
3> pgo:start_pool(default, #{pool_size => 5, host => "database-1.xxxxxxxxxx.us-east-1.rds.amazonaws.com", database => "blog", user => "pgo_user", password => "xxxxxxxxxx"}).
{ok,<0.243.0>}
4> pgo:query("SELECT id, slug, title FROM books WHERE id = 5").
{error,none_available} Thanks for taking a look at this. Any ideas? |
What version of pgo? I was running on |
This is what I have in {erl_opts, [debug_info]}.
{deps, [
{pgo, {git, "https://github.com/erleans/pgo", {branch, "main"}}}
]}.
{shell, [
% {config, "config/sys.config"},
{apps, [er_pgo_test]}
]}. And [
{kernel, [
{logger, [
{handler, default, logger_std_h, #{
level => debug,
formatter => {logger_formatter, #{
legacy_header => true
}}
}}
]}
]}
]. Running the shell via Forgot to mention, I also added |
Are you actually using |
The 3> pgo:start_pool(default, #{pool_size => 5, host => "database-1.xxxxx.us-east-1.rds.amazonaws.com", database => "blog", user => "pgo_user", password => "xxxxx"}).
{ok,<0.245.0>} |
Oh oops! My bad, I was still running on OTP-24. I see the issue. Not sure why you didn't get any logs but when I do it on OTP-26 I see the errors that are happening:
|
Quick "solution", add |
Yes, it's working now after adding! ssl => true, ssl_options => [{verify, verify_none}] Thanks for your help! |
Great. I'm opening a new issue about setting ssl defaults so we provide more of a ruby experience. |
I have a Postgres instance on AWS (from Heroku) which I can connect to by other means (psql, Ruby, etc.). However, I cannot connect using pgo.
The sanitized url example:
I tried testing this in the
rebar3 shell
:Notes
ssl => true
in pgo:start_pool; same{error,none_available}
result though.Reference: lpil/pog#21
The text was updated successfully, but these errors were encountered: