バージョンごとのドキュメント一覧

21.15. 認証における問題点 #

<title>Authentication Problems</title>

Authentication failures and related problems generally manifest themselves through error messages like the following: 本来の認証失敗とそれに関連した問題は、一般的に以下のようなエラーメッセージを通して明示されます。

FATAL:  no pg_hba.conf entry for host "123.123.123.123", user "andym", database "testdb"

This is what you are most likely to get if you succeed in contacting the server, but it does not want to talk to you. As the message suggests, the server refused the connection request because it found no matching entry in its <filename>pg_hba.conf</filename> configuration file. たいがい、サーバとの接触に成功はしたものの、サーバが通信を拒否した場合です。 メッセージが指摘するようにサーバは接続要求を拒否しました。 なぜならpg_hba.conf設定ファイルに一致する項目を見つけることができなかったからです。

FATAL:  password authentication failed for user "andym"

Messages like this indicate that you contacted the server, and it is willing to talk to you, but not until you pass the authorization method specified in the <filename>pg_hba.conf</filename> file. Check the password you are providing, or check your Kerberos or ident software if the complaint mentions one of those authentication types. この種のメッセージは、サーバと接触し、サーバも通信することを許可したが、pg_hba.confファイルの中で指定された認証方式に合格していないことを表します。 入力したパスワードを確認するか、もしエラーがKerberos、ident認証型のいずれかを指摘している場合はKerberosあるいはidentソフトウェアを確認してください。

FATAL:  user "andym" does not exist

The indicated database user name was not found. 与えられたデータベースユーザ名は見つかりませんでした。

FATAL:  database "testdb" does not exist

The database you are trying to connect to does not exist. Note that if you do not specify a database name, it defaults to the database user name. 接続しようとしているデータベースは存在しません。 データベース名を指定しなければ、データベースユーザ名がデフォルトとなることに注意してください。

ヒント

The server log might contain more information about an authentication failure than is reported to the client. If you are confused about the reason for a failure, check the server log. クライアントに報告される以上により多くの情報がサーバログに残ります。 失敗した原因についてよくわからなければサーバのログを見てください。