【ERROR】Error: transaction invalidated with status (ENDORSEMENT_POLICY_FAILURE)

简介: 【ERROR】Error: transaction invalidated with status (ENDORSEMENT_POLICY_FAILURE)

fabric提交链码时报错:Error: transaction invalidated with status (ENDORSEMENT_POLICY_FAILURE)


peer lifecycle chaincode commit -o orderer.example.com:7050 --channelID mychannel --name oilcc --version 1.0 --sequence 1 --init-required --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem --peerAddresses peer0.department1.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/department1.example.com/peers/peer0.department1.example.com/tls/ca.crt




报错说得很明白,department2节点没有进行背书。

先查询一下链码定义是否已经被所有组织批准: peer lifecycle chaincode queryapproved --channelID mychannel --name oilcc --sequence 1 --output json



两个组织都为true,说明问题应该不是出在背书策略上。

返回去查看commit命令,发现该命令只写了一个department1组织,但该网络中一共有两个组织,必须所有的组织都进行提交才能将链码正常运行在fabric通道中。结合报错的大意:department1提交成功,但department2缺少相应背书策略。

补上另一个组织department2:


peer lifecycle chaincode commit -o orderer.example.com:7050 --channelID mychannel --name oilcc --version 1.0 --sequence 1 --init-required --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem --peerAddresses peer0.department1.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/department1.example.com/peers/peer0.department1.example.com/tls/ca.crt --peerAddresses peer0.department2.example.com:9051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/department2.example.com/peers/peer0.department2.example.com/tls/ca.crt


提交成功:



目录
相关文章
|
6月前
|
应用服务中间件 Python 容器
ERROR [ntContainer#0-1] o.s.a.r.l.SimpleMessageListenerContainer 1917: Failed to check/redeclare aut
ERROR [ntContainer#0-1] o.s.a.r.l.SimpleMessageListenerContainer 1917: Failed to check/redeclare aut
233 0
|
6月前
|
NoSQL Redis
解决(error) ERR Errors trying to SHUTDOWN. Check logs.问题~
解决(error) ERR Errors trying to SHUTDOWN. Check logs.问题~
173 0
ERR Errors trying to SHUTDOWN. Check logs.
ERR Errors trying to SHUTDOWN. Check logs.
121 0
schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326)
schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326)
407 0
schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326)
Error information: “Error: SignerSign() failed.“ (-2147012889/0x80072ee7)
Error information: “Error: SignerSign() failed.“ (-2147012889/0x80072ee7)
125 0
SignTool Error: An error occurred while attempting/Error information: “SignerTimeStamp() failed.“
SignTool Error: An error occurred while attempting/Error information: “SignerTimeStamp() failed.“
148 0
abort: error: Temporary failure in name resolution
abort: error: Temporary failure in name resolution
197 0
unknown type name err_status_t; did you mean srtp_err_status_t/err_status_ok/err_status_replay_fail
unknown type name err_status_t; did you mean srtp_err_status_t/err_status_ok/err_status_replay_fail
162 0
|
Go iOS开发
The operation couldn’t be completed. Unable to log in with account 'myappleid'. An unexpected failure occurred while logging in (Underlying error code 1100).解决方法
The operation couldn’t be completed. Unable to log in with account 'myappleid'. An unexpected failure occurred while logging in (Underlying error code 1100).解决方法
452 0
|
SQL 监控
backup log is terminating abnormally because for write on file failed: 112(error not found)
昨天遇到一个案例,YourSQLDba做事务日志备份时失败,检查YourSQLDba输出的错误信息如下:   yMaint.backups backup log [gewem] to disk = 'M:\DB_BACKUP\LOG_BACKUP\xxxx_[2016-11-22_01h11m05_Tue]_logs.
1237 0