尝试使用以下命令在hyperledger中实例化链代码时:
CORE_PEER_ADDRESS=peer0.org1.gnaledger.org:7051 peer chaincode instantiate -C gna-channel -n gnacc -v v0 -c '{"Args":[]}' -o orderer.gnaledger.org:7050
我收到以下错误:
2018-03-27 23:32:13.195 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-03-27 23:32:13.195 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-03-27 23:32:13.203 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2018-03-27 23:32:13.203 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2018-03-27 23:32:13.203 UTC [grpc] Printf -> DEBU 005 transport: http2Client.notifyError got notified that the client transport was broken read tcp 172.18.0.7:33712->172.18.0.4:7050: read: connection reset by peer.
2018-03-27 23:32:13.209 UTC [msp/identity] Sign -> DEBU 006 Sign: plaintext: 0A9A070A6808031A0B08FDA8EBD50510...1A000A000A04657363630A0476736363
2018-03-27 23:32:13.209 UTC [msp/identity] Sign -> DEBU 007 Sign: digest: 7EF3FD93154CC3D3809AA89E945DC21ADCD9EBB9E80BF1D516162F137078FF81
Error: Error endorsing chaincode: rpc error: code = Unknown desc = Failed to deserialize creator identity, err MSP Org1MSP is unknown
2018-03-27 23:32:13.213 UTC [grpc] Printf -> DEBU 008 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.
2018-03-27 23:32:13.213 UTC [grpc] Printf -> DEBU 009 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: failed to write window update: write tcp 172.18.0.7:33714->172.18.0.4:7050: write: broken pipe"; Reconnecting to {orderer.dcmledger.org:7050 <nil>}
2018-03-27 23:32:13.213 UTC [grpc] Printf -> DEBU 00a grpc: addrConn.transportMonitor exits due to: grpc: the connection is closing
Usage:
peer chaincode instantiate [flags]
首先是破管,然后无法找到MSP?
答案 0 :(得分:0)
关键错误是
Error: Error endorsing chaincode: rpc error: code = Unknown desc = Failed to deserialize creator identity, err MSP Org1MSP is unknown
我遇到了类似的问题。我建议您仔细检查整个预配置过程中使用的MSP的大小写,即Org1MSP
与org1MSP
。
更具体地说,我要看的一个细节是configtx.yaml
,- Org1
元素,ID
键。通常是org1MSP
或Org1MSP
。尝试一下,看看是否有任何区别。
答案 1 :(得分:-1)
如果你是真的,你必须添加: --tls true --cafile ./orrerOrganizations/orderer.com/orderers/orderer0.org1.com/msp/tlscacerts/tlsca.crfchina.com-cert.pem