【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


提交成功:



目录
相关文章
|
7月前
|
应用服务中间件 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
266 0
|
7月前
|
NoSQL Redis
解决(error) ERR Errors trying to SHUTDOWN. Check logs.问题~
解决(error) ERR Errors trying to SHUTDOWN. Check logs.问题~
212 0
|
数据安全/隐私保护
Do Sync Disk 0 Part 0 Failed, code=S3_F42, msg=Sync Failed after retry 5 times
Do Sync Disk 0 Part 0 Failed, code=S3_F42, msg=Sync Failed after retry 5 times
199 1
schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326)
schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326)
427 0
schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326)
SignTool Error: An error occurred while attempting/Error information: “SignerTimeStamp() failed.“
SignTool Error: An error occurred while attempting/Error information: “SignerTimeStamp() failed.“
152 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
168 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).解决方法
481 0
Whitelabel Error Page There was an unexpected error (type=Not Found, status=404). No message availab
Whitelabel Error Page There was an unexpected error (type=Not Found, status=404). No message availab
189 0
|
Java Apache
log4j:ERROR setFile(null,true) call failed.
log4j:ERROR setFile(null,true) call failed.java.io.FileNotFoundException: /opt/logs/log.log (没有那个文件或目录) at java.
3357 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.
1241 0
下一篇
DataWorks