我正在尝试使用不同的AWS EC2实例在多台主机上设置Hyperledger Fabric。我在第二个实例上设置对等节点时遇到问题。
我一直在这篇中篇文章中遵循指南:
https://medium.com/@wahabjawed/hyperledger-fabric-on-multiple-hosts-a33b08ef24f
在“设置网络”下,我进行到第6步,该步骤在第二个实例上建立了一个对等体。
我使用了以下命令:
docker run --rm -it --network="my-net" --link orderer.example.com:orderer.example.com --link peer0.org1.example.com:peer0.org1.example.com --name peer1.org1.example.com -p 9051:7051 -p 9053:7053 -e CORE_LEDGER_STATE_STATEDATABASE=CouchDB -e CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb1:5984 -e CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= -e CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= -e CORE_PEER_ADDRESSAUTODETECT=true -e CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock -e FABRIC_LOGGING_SPEC=DEBUG -e CORE_PEER_NETWORKID=peer1.org1.example.com -e CORE_NEXT=true -e CORE_PEER_ENDORSER_ENABLED=true -e CORE_PEER_ID=peer1.org1.example.com -e CORE_PEER_PROFILE_ENABLED=true -e CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer.example.com:7050 -e CORE_PEER_GOSSIP_ORGLEADER=true -e CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7051 -e CORE_PEER_GOSSIP_IGNORESECURITY=true -e CORE_PEER_LOCALMSPID=Org1MSP -e CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=my-net -e CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051 -e CORE_PEER_GOSSIP_USELEADERELECTION=false -e CORE_PEER_TLS_ENABLED=false -v /var/run/:/host/var/run/ -v $(pwd)/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/msp -w /opt/gopath/src/github.com/hyperledger/fabric/peer hyperledger/fabric-peer peer node start
它导致了此错误:
2019-04-24 20:06:29.798 UTC [msp] getSigningIdentityFromConf -> DEBU 036 Could not find SKI [8d25ff0a9c02de411acf743e7a6577fac0573d0d2561f988fb2305be74918de7], trying KeyMaterial field: Key with SKI 8d25ff0a9c02de411acf743e7a6577fac0573d0d2561f988fb2305be74918de7 not found in /etc/hyperledger/fabric/msp/keystore
Failed getting key for SKI [[141 37 255 10 156 2 222 65 26 207 116 62 122 101 119 250 192 87 61 13 37 97 249 136 251 35 5 190 116 145 141 231]]
github.com/hyperledger/fabric/bccsp/sw.(*CSP).GetKey
/opt/gopath/src/github.com/hyperledger/fabric/bccsp/sw/impl.go:170
github.com/hyperledger/fabric/msp.(*bccspmsp).getSigningIdentityFromConf
/opt/gopath/src/github.com/hyperledger/fabric/msp/mspimpl.go:181
github.com/hyperledger/fabric/msp.(*bccspmsp).setupSigningIdentity
/opt/gopath/src/github.com/hyperledger/fabric/msp/mspimplsetup.go:267
github.com/hyperledger/fabric/msp.(*bccspmsp).preSetupV1
/opt/gopath/src/github.com/hyperledger/fabric/msp/mspimplsetup.go:413
github.com/hyperledger/fabric/msp.(*bccspmsp).setupV1
/opt/gopath/src/github.com/hyperledger/fabric/msp/mspimplsetup.go:373
github.com/hyperledger/fabric/msp.(*bccspmsp).setupV1-fm
/opt/gopath/src/github.com/hyperledger/fabric/msp/mspimpl.go:112
github.com/hyperledger/fabric/msp.(*bccspmsp).Setup
/opt/gopath/src/github.com/hyperledger/fabric/msp/mspimpl.go:225
github.com/hyperledger/fabric/msp/cache.(*cachedMSP).Setup
/opt/gopath/src/github.com/hyperledger/fabric/msp/cache/cache.go:88
github.com/hyperledger/fabric/msp/mgmt.LoadLocalMspWithType
/opt/gopath/src/github.com/hyperledger/fabric/msp/mgmt/mgmt.go:32
github.com/hyperledger/fabric/peer/common.InitCrypto
/opt/gopath/src/github.com/hyperledger/fabric/peer/common/common.go:143
github.com/hyperledger/fabric/peer/common.InitCmd
/opt/gopath/src/github.com/hyperledger/fabric/peer/common/common.go:309
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:746
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:852
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:800
main.main
/opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:53
runtime.main
/opt/go/src/runtime/proc.go:201
runtime.goexit
/opt/go/src/runtime/asm_amd64.s:1333
2019-04-24 20:06:29.798 UTC [main] InitCmd -> ERRO 037 Cannot run peer because error when setting up MSP of type bccsp from directory /etc/hyperledger/fabric/msp: KeyMaterial not found in SigningIdentityInfo
我尝试搜索解决方案,但找不到任何东西。我对Fabric的经验很少。有什么想法吗?