我在mac中启动了一个结构样本网络,并在peer0.org1.example.com中安装了一个链代码。
点击后:
docker exec -it cli bash
现在我用
peer chaincode -C myChannel list --instantiated
但收到了错误消息:
Error: Error endorsing chaincode: rpc error: code = Unknown desc = access denied: channel [myChannel] creator org [Org1MSP]
我不知道这个错误。它似乎有一些权限错误。谢谢你,如果你可以帮我解决这个问题。
答案 0 :(得分:1)
根据错误消息,从文件msgvalidation.go,方法ValidateProposalMessage片段如下,
// validate the signature
err = checkSignatureFromCreator(shdr.Creator, signedProp.Signature, signedProp.ProposalBytes, chdr.ChannelId)
if err != nil {
// log the exact message on the peer but return a generic error message to
// avoid malicious users scanning for channels
putilsLogger.Warningf("channel [%s]: %s", chdr.ChannelId, err)
sId := &msp.SerializedIdentity{}
err := proto.Unmarshal(shdr.Creator, sId)
if err != nil {
// log the error here as well but still only return the generic error
err = errors.Wrap(err, "could not deserialize a SerializedIdentity")
putilsLogger.Warningf("channel [%s]: %s", chdr.ChannelId, err)
}
return nil, nil, nil, errors.Errorf("access denied: channel [%s] creator org [%s]", chdr.ChannelId, sId.Mspid)
}
你似乎在这一步失败了:
err = checkSignatureFromCreator(shdr.Creator, signedProp.Signature, signedProp.ProposalBytes, chdr.ChannelId)
您的signedproposal未验证,
export CORE_PEER_ADDRESS=peer.org1.example.com:17051 export CORE_PEER_LOCALMSPID=Org1MSP export CORE_PEER_MSPCONFIGPATH=xxx/msp
2.您是否使用管理员证书发送此交易?
3.请提供更有用的信息,如警告信息(来自源代码,警告信息可能更有帮助),而不仅仅是错误信息。