OpManager ナレッジベース

PostgreSQLに接続できない。(no pg_hba.conf entry for host "", user "postgres", database "OpManagerDB", SSL off)


【現象/要望】
OpManagerが起動せず、PostgreSQLへも接続できない。
OpManager\pgsql\data\pg_logs\postgresql-<日時>.csvファイルには次のメッセージが出力されている。

YYYY-MM-DD hh:mm:ss.ms JST postgres OpManagerDB NNNN <IPアドレス>:<ポート番号> xxxxxxxx.xxxx 1 authentication YYYY-MM-DD hh:mm:ss JST 2/400 0 FATAL 28000 no pg_hba.conf entry for host "<IPアドレス>", user "postgres", database "OpManagerDB", SSL off

例:
2015-01-30 10:22:10.123 JST postgres OpManagerDB 4568 192.168.10.123:57893 274e1256.10a1 1 authentication 2015-01-30 10:22:10 JST 2/400 0 FATAL 28000 no pg_hba.conf entry for host "192.168.10.123", user "postgres", database "OpManagerDB", SSL off

no pg_hba.conf entry for host "<IPアドレス>", user "postgres", database "OpManagerDB", SSL off

【原因】
OpManagerにバンドルされているPostgreSQLは、
標準で127.0.0.1(ローカルホスト)からのアクセスを許可しています。
しかし、サーバーマシン側のネットワーク設定変更等で
OpManagerサーバからPostgreSQLへアクセスするIPアドレスが変更された場合、
本現象が発生します。

【解決方法】
PostgreSQL の設定ファイルに次のようにエントリを追加します。

・対象ファイル
<OpManagerインストールフォルダ>\pgsql\data\pg_hba.conf

・変更前
----------------------------
# IPv4 local connections:
host all all 127.0.0.1/32 trust
----------------------------

・変更後
----------------------------
# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all <IPアドレス>/32 trust
----------------------------
※<IPアドレス>にはpostgresql-<日時>.csvのメッセージに含まれるIPアドレスを指定します。
例:
host all all 192.168.10.123/32 trust

エントリを追加後、OpManagerを起動します。

【対応リリース】 9450以降
★-----------------------------------------------------------------------------★
OpManager 製品紹介ページはこちら ↓
https://www.manageengine.jp/products/OpManager/
★-----------------------------------------------------------------------------★