Я пытаюсь добавить postgres как db в fabric-ca? я пытаюсь добавить его в fabric-ca-server-config.yaml
, добавив
db:
type: postgres
datasource: host=localhost port=5432 user=Username password=Password dbname=fabric_ca sslmode=verify-full
, но я получаю сообщение об ошибке, когда пытаюсь инициализировать fabric-ca, выдается предупреждение, которое не может подключиться к postgres,Я добавляю журналы ошибок и предупреждений внизу.
fabric-ca-server init -b admin:adminpw
2019/10/07 10:16:54 [INFO] Configuration file location: /home/ubuntu/fabric-ca/fabric-ca-server-config.yaml
2019/10/07 10:16:54 [INFO] Server Version: 1.4.4
2019/10/07 10:16:54 [INFO] Server Levels: &{Identity:2 Affiliation:1 Certificate:1 Credential:1 RAInfo:1 Nonce:1}
2019/10/07 10:16:54 [INFO] The CA key and certificate already exist
2019/10/07 10:16:54 [INFO] The key is stored by BCCSP provider 'SW'
2019/10/07 10:16:54 [INFO] The certificate is at: /home/ubuntu/fabric-ca/ca-cert.pem
2019/10/07 10:16:54 [WARNING] Failed to connect to database 'fabric_ca'
2019/10/07 10:16:54 [WARNING] Failed to connect to database 'postgres'
2019/10/07 10:16:54 [WARNING] Failed to connect to database 'template1'
2019/10/07 10:16:54 [ERROR] Error occurred initializing database: Failed to connect to Postgres database. Postgres requires connecting to a specific database, the following databases were tried: [fabric_ca postgres template1]. Please create one of these database before continuing
2019/10/07 10:16:54 [INFO] Home directory for default CA: /home/ubuntu/fabric-ca
2019/10/07 10:16:54 [INFO] Initialization was successful