sha*_*ine 7 hyperledger-fabric
我在我的mac中启动了一个结构样本网络,并在peer0.org1.example.com中安装了一个链代码.
点击后:
docker exec -it cli bash
Run Code Online (Sandbox Code Playgroud)
现在我用
peer chaincode -C myChannel list --instantiated
Run Code Online (Sandbox Code Playgroud)
但得到了错误信息:
Error: Error endorsing chaincode: rpc error: code = Unknown desc = access denied: channel [myChannel] creator org [Org1MSP]
Run Code Online (Sandbox Code Playgroud)
我不知道这个错误.它似乎有一些权限错误.谢谢你,如果你可以帮我解决这个问题.
根据错误消息,从文件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)
}
Run Code Online (Sandbox Code Playgroud)
看来您在这一步失败了:
err = checkSignatureFromCreator(shdr.Creator, signedProp.Signature, signedProp.ProposalBytes, chdr.ChannelId)
Run Code Online (Sandbox Code Playgroud)
您签署的提案无效,
Run Code Online (Sandbox Code Playgroud)export CORE_PEER_ADDRESS=peer.org1.example.com:17051 export CORE_PEER_LOCALMSPID=Org1MSP export CORE_PEER_MSPCONFIGPATH=xxx/msp
2.您是否使用管理证书发送此交易?
3.请提供更多有用的信息,例如警告信息(从源代码来看,警告信息可能更有帮助),而不仅仅是错误信息。
| 归档时间: |
|
| 查看次数: |
556 次 |
| 最近记录: |