Error Connecting to database FATAL : no pg_hba.conf entry for host"x.x.x.x", user"jiradbuser", database"jiradb", SSL off

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

When testing database connectivity and performing a test connection, the following error appears

Error Connecting to database FATAL : no pg_hba.conf entry for host"x.x.x.x", user"jiradbuser", database"jiradb", SSL off


原因

Client authentication is controlled by a configuration file, which traditionally is named pg_hba.conf and is stored in the database cluster's data directory. For more information on postgres configuration file details:

http://www.postgresql.org/docs/9.2/static/auth-pg-hba-conf.html

ソリューション

Add the IP address of the application (e.g., Jira) server to the pg_hba.conf and make sure that the method is not set to reject. You need to modify the xxx.xxx.xxx.xxx and put the IP address to allow connections.

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
 
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
host    all  	    all  	xxx.xxx.xxx.xxx       md5
# IPv6 local connections:
host    all         all         ::1/128               md5

Another example, 192.168.132.17/24 where 24 is the mask which would be 255.255.255.0. If it was 255.255.0.0 then the number would be 16. For more information consult the pg_hba.conf documentation page.

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
 
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
host    all         all         192.168.132.17/24     trust
# IPv6 local connections:
host    all         all         ::1/128               md5

After pg_hba.conf has been updated, run the following command in the database to reload the new information added.

SELECT pg_reload_conf()
最終更新日: 2021 年 10 月 11 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.