スキップしてコンテンツを表示

Docker container running on an ec2 instance cant connect to RDS AWS

0

I can access the RDS by ssh-ing into the EC2 instance, and passing the url and password to psql.

When I try to access the RDS via the docker container running on the EC2 using the same url and password I get the following output.

14:05:57.710 [error] Postgrex.Protocol (#PID<0.162.0>) failed to connect: ** (Postgrex.Error) FATAL 28000 (invalid_authorization_specification) no pg_hba.conf entry for host "144.44.44.444", user "postgres", database "postgres", no encryption

Note: I replaced the host IP with a random value above.

2回答
1

Hello.

I think it's probably RDS PostgreSQL, but I think it can be resolved by setting the "rds.force_ssl" parameter in the RDS parameter group to 0, or by downloading the certificate described in the document below into the container and using it when connecting.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html

エキスパート
回答済み 2年前
エキスパート
レビュー済み 2年前
  • Thanks for this. In this case it was related to not setting ssl: true in the runtime.exs file.

0
承認された回答

This was resolved by setting ssl: true int the runtime.exs file.

回答済み 2年前
エキスパート
レビュー済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

関連するコンテンツ