Hyperledger Composer: Error: failed to request identity. Error trying to enroll user and return certificates

Hyperledger Composer: Error: failed to request identity. Error trying to enroll user and return certificates

我正在关注 hyperledger composer tutorial

我无法执行第 15 步。在执行命令时:

composer identity request -c PeerAdmin@byfn-network-org1-only -u admin -s adminpw -d alice

我收到以下错误:

Error: failed to request identity. Error trying to enroll user and return certificates. Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054]

当我检查 运行 容器时,CA 不是 运行.. 如果是这样,我不明白为什么没有启动命令byfn 脚本中的 CA。

谁能提出一个解决方法来执行上述命令?

本 Composer 教程使用 byfn.sh 的修改版本,其中有一个 -a 选项来启动 CA。

请务必按如下所示克隆特定的存储库:
git clone -b issue-6978 https://github.com/sstone1/fabric-samples.git

然后使用 -a 选项启动 byfn:./byfn.sh -m up -s couchdb -a

或者您可以通过 fabric-ca-server start -b admin:$ADMIN_PASSWORD 命令手动启动 fabric-ca

谢谢 基兰塔卡

我按照这个建议成功了。请试试:

说明:查找您的 docker 的 IP 地址并在所有文件中替换为 'localhost':enrollAdmin.js、invoke.js...