我使用docker-toolbox和vagrant在本地开发中设置了hypledger fabric 0.6。我第一次使用命令
运行了四个peer-ca.yaml示例docker-compose -f four-peer-ca.yaml up
Four-peer-ca.yaml文件可用于: https://github.com/hyperledger/fabric/tree/v0.6/examples/docker-compose
一切都运作良好。但是当退出此docker撰写任务并尝试再次运行该命令时,我收到以下错误:
vp1_1 | 10:29:42.752 [crypto] Errorf -> ERRO 01b [validator.test_vp1] Failed invoking CreateCertficatePair [rpc error: code = 2 desc = Identity or token does not match.].
vp1_1 | 10:29:42.752 [crypto] Errorf -> ERRO 01c [validator.test_vp1] Failed getting enrollment certificate [id=test_vp1]: [rpc error: code = 2 desc = Identity or token does not match.]
vp1_1 | 10:29:42.752 [crypto] Errorf -> ERRO 01d [validator.test_vp1] Failed retrieving enrollment data [rpc error: code = 2 desc = Identity or token does not match.].
vp1_1 | 10:29:42.752 [crypto] Errorf -> ERRO 01e [validator.test_vp1] Failed registering node crypto engine [rpc error: code = 2 desc = Identity or token does not match.].
vp1_1 | 10:29:42.755 [crypto] Errorf -> ERRO 01f [validator.test_vp1] Failed registering peer [test_vp1]: [rpc error: code = 2 desc = Identity or token does not match.]
vp1_1 | 10:29:42.755 [crypto] Errorf -> ERRO 020 [validator.test_vp1] Failed registering [test_vp1]: [rpc error: code = 2 desc = Identity or token does not match.]
vp1_1 | 10:29:42.755 [crypto] RegisterValidator -> ERRO 021 Failed registering validator [test_vp1] with name [test_vp1] [rpc error: code = 2 desc = Identity or token does not match.].
关闭并重新启动虚拟框没有帮助。任何人都知道导致上述错误的原因是什么以及如何解决?
答案 0 :(得分:1)
使用docker-compose -f four-peer-ca.yaml down
命令应停止此compose文件的所有正在运行的docker容器并删除容器。这应该删除对等体和CA中任何已存在的加密材料,您应该能够再次运行docker-compose -f four-peer-ca.yaml up
。