网络重启后,Hyperledger Composer Identity Issue错误(代码:20,授权失败) [英] Hyperledger Composer Identity Issue error after network restart (code:20, authorization failure)

查看:325
本文介绍了网络重启后,Hyperledger Composer Identity Issue错误(代码:20,授权失败)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Docker Swarm和docker-compose设置我的Fabric(v1.1)和Composer(v0.19.18)网络。
我想测试Swarm / Fabric网络如何响应主机/ ec2故障,因此我手动重新启动了运行fabric-ca,orderer和peer0容器的主机。



在重新启动之前,就颁发身份而言,一切运行良好。重新启动后,尽管所有的Fabric容器都已重新启动并且似乎运行正常,但是我无法使用主 admin @ network 卡发行身份。



重新启动后,组成计算机网络ping -c admin @ network 成功返回,但是组成计算机身份出现(通过CLI或javascript)均返回代码20错误,如下所述:

fabric-ca请求注册失败,错误为[[{\ code \:20,\消息\:\授权失败\}]]



<我猜测问题出在主机重启,以及重启Fabric容器的方式有些不同。如有必要,我可以发布我的docker-compose文件。

解决方案

如果您的fabric-ca-server已重新启动并且其注册数据库还没有不会被持久化(例如,数据库存储在容器的文件系统上,并且该容器的丢失意味着该文件系统内容的丢失),那么ca服务器将创建一个名为admin的全新引导身份,用于颁发身份它将不再是您已经拥有的那个,因此对于fabric-ca-server而言不再是有效的标识。请注意,它将仍然是结构网络的有效身份。因此,这就是为什么您现在从fabric-ca-server获得授权失败的原因。您的fabric-ca-server不再知道您当前拥有的身份admin。


I am using Docker Swarm and docker-compose to setup my Fabric (v1.1) and Composer (v0.19.18) networks. I wanted to test how my Swarm/Fabric networks would respond to a host/ec2 failure, so I manually reboot the host which is running the fabric-ca, orderer, and peer0 containers.

Before the reboot, everything runs perfectly with respect to issuing identities. After the reboot, though all of the Fabric containers are restarted and appear to be functioning properly, I am unable to issue identities with the main admin@network card.

After reboot, composer network ping -c admin@network returns successfully, but composer identity issue (via CLI or javascript) both return code 20 errors as described here: "fabric-ca request register failed with errors [[{\"code\":20,\"message\":\"Authorization failure\"}]]"

I am guessing the issue is stemming from the host reboot and some difference in how it is restarting the Fabric containers. I can post my docker-compose files if necessary.

解决方案

If your fabric-ca-server has restarted and it's registration database hasn't been persisted (for example the database is stored on the file system of the container and loss of that container means loss of the contents of that file system) then the ca-server will create a completely new bootstrap identity called admin for issuing identities and it won't be the one you have already have and therefore isn't a valid identity anymore for the fabric-ca-server. Note that it will be a valid identity for the fabric network still. So this is why you now get authorisation failure from the fabric-ca-server. The identity called admin that you currently have is not known to your fabric-ca-server anymore.

这篇关于网络重启后,Hyperledger Composer Identity Issue错误(代码:20,授权失败)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆