我遇到FABRIC CA server链接DB的问题,我的CA-SERVER的DB设置如下db:
type: postgres
datasource: host=9.110.24.46 port=5432 user=postgres password=9XXXXX dbname=postgres
tls:
我的postgres能用PGADMIN和pgql远端登录。但就在FABRIC链接的时候失败,在FABRIC端可以看到出错信息,但在PG端没有任何LOG。有没同行能提供pg_hba.conf设置?我的pg_hba.conf设置如下
IPv4 local connections:
host all all 0.0.0.0/0 ident
host all all 0.0.0.0/0 trust
host all all 127.0.0.1/32 trust
local all postgres trust
host all all 9.110.24.46/0 trust
host all postgres 127.0.0.1/32 trust
host all postgres 127.0.0.1/32 trust
host all postgres 0.0.0.0/32 trust
host all postgres 0.0.0.0/0 trust
2018/07/16 23:19:56 [WARNING] Failed to connect to database 'postgres'
2018/07/16 23:19:56 [DEBUG] Connecting to PostgreSQL server, using connection string: host=9.110.24.46 port=5432 user= password= dbname=postgres
2018/07/16 23:19:56 [WARNING] Failed to connect to database 'postgres'
2018/07/16 23:19:56 [DEBUG] Connecting to PostgreSQL server, using connection string: host=9.110.24.46 port=5432 user= password= dbname=template1
2018/07/16 23:19:56 [WARNING] Failed to connect to database 'template1'
2018/07/16 23:19:56 [ERROR] Error occurred initializing database: Failed to create user registry for PostgreSQL: Failed to connect to Postgres database. Postgres requires connecting to a specific database, the following databases were tried: [postgres postgres template1]. Please create one of these database before continuing
收起