Hyperledger Composer Identity Issue error after network restart (code:20, authorization failure)

不问归期 提交于 2019-12-25 01:36:46

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/53506355/hyperledger-composer-identity-issue-error-after-network-restart-code20-author

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!