通过Fabric-ca将用户注册到网络时遇到错误

时间:2018-10-28 20:13:17

标签: hyperledger-fabric hyperledger hyperledger-fabric-ca

我正在fabric-samples文件夹中创建一个Fabric项目。设置好网络和链码后,我将创建一个node.js客户端,将用户注册到我的网络中。

但是,我不断遇到Failed getting affiliation 'party1': : scode: 404, code: 63, msg: Failed to get Affiliation: sql: no rows in result set"}]]错误。

fabric_ca_client.register(...)似乎仅在affiliation设置为org1.department1时有效。

我已经包含了容器说明

ca.banking.org: container_name: ca.banking.org image: hyperledger/fabric-ca:latest environment: - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - FABRIC_CA_SERVER_CA_NAME=ca.microgrid.org - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.party1.bank.org-cert.pem - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/3cbb47b309cfc527524fa31d85aa437b119f410e2396b63fceed4d90f4dbbacc_sk ports: - "7054:7054" command: sh -c 'fabric-ca-server start -b admin:adminpw' volumes: - ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config networks: - bnk

我需要修改CA容器吗?如果是这样怎么办?我不确定接下来要开始什么。

1 个答案:

答案 0 :(得分:0)

默认情况下,fabric-ca仅隶属于两个组织(org1和org2)you can find configuration file here 。如果您想添加或修改从属关系,可以使用fabric-ca客户端API complete documentation is here来完成,也可以更改配置本身。

相关问题