MagicStack / MagicStack/asyncpg

asyncpg error: “no pg_hba.conf entry for host” in Heroku

オープン
#582 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
8.1k
フォーク
468
PR マージ指標
30日以内にマージされた PR はありません

説明

I'm using asyncpg to connect my database in Heroku postgresql, using python:

import asyncpg

async def create_db_pool():
   bot.pg_con = await asyncpg.create_pool(dsn="postgres://....", host="....amazonaws.com", user="xxx", database="yyy", port="5432", password="12345")

it was working perfectly until I received an email from heroku advising me of a maintenance:
Maintenance (DATABASE_URL on myappname) is starting now. We will update you when it has completed.

then this error appeared:

asyncpg.exceptions.InvalidAuthorizationSpecificationError: no pg_hba.conf entry for host "123.456.789.10", user "xxx", database "yyy", SSL off

I tried to follow some help, like putting ssl=True but this error appeared:

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1108)

same as putting ssl="allow"

asyncpg.exceptions.InvalidPasswordError: password authentication failed for user "xxx"

what can I do to fix this?

https://stackoverflow.com/questions/62053185/asyncpg-error-no-pg-hba-conf-entry-for-host-in-heroku

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

プロジェクトファイルやテストは指定されていません。まず asyncpg.create_pool の呼び出し、Heroku PostgreSQL のメンテナンス通知、3 つの接続エラーを調査し、失敗が asyncpg で再現可能なのか、それとも Heroku データベース設定に固有なのかを判断してください。完了の基準は、接続結果が検証済みであることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
postgresql, python
領域
databases
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
15/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。