记录一次fabric部署环境的错误
本人使用的fabric环境是1.4版本,写这篇文章的意思是记录下这次错误的原因及解决方法。如果能帮助到某些朋友,那本人就感觉很奈斯了~
错误信息如下:
其中的错误信息:ERRO 09c Principal deserialization failure (the supplied identity is not valid: x509:
certificate signed by unknown authority (possibly because of “x509: ECDSA verification failure” while trying to verify candidate authority certif
icate “ca.iotOrg.example.com”)) for identity 0
2021-06-10 12:35:34.230 CST [orderer.common.broadcast] ProcessMessage -> WARN 09d [channel: iot] Rejecting broadcast of config message from
10.244.1.37:58314 because of error: config update for existing channel did not pass initial checks: implicit policy evaluation failed - 0 sub-pol
icies were satisfied, but this policy requires 1 of the ‘Writers’ sub-policies to be satisfied: permission denied
报错原因:之前有部署过的fabric环境数据没有清理干净!!!
解决方法如下:
1、清除环境之前的volume及映射到本地路径下的数据(本人的解决方法)
(1)找到自己映射到本地的数据目录并删除,例如:
(2)找到自己docker路径下的volumes(一般都是在/var/lib/docker/volumes下)
进入到volumes目录后可以执行tree命令,找到如下图所示的目录删除即可
有些目录名是以orderer.example.com,peer0.org1.example.com命名的,但目录里的内容格式都是跟上图一样的
2、解决方案:执行如下命令删除卷(网络方法,本人未验证,写这里的意思是可能某位朋友会用到)
docker-compose -f docker-compose-cli.yaml down --volumes --remove-orphans
docker rm -f $(docker ps -a | grep “hyperledger/*” | awk “{print $1}”)
docker volume prune