Hyperledger Fabric - Orderer logs show error during broadcast even though the transaction is successful and committed to all peers - hyperledger-fabric

Orderer logs show following error(highlighted) during broadcast even though the transaction is successful and committed to all peers:
2018-12-19 13:43:42.724 UTC [policies] Evaluate -> DEBU 997 == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Writers
2018-12-19 13:43:42.724 UTC [orderer/common/broadcast] Handle -> DEBU 998 [channel: mychannel] Broadcast has successfully enqueued message of type ENDORSER_TRANSACTION from 172.19.0.7:40978
2018-12-19 13:43:42.724 UTC [orderer/common/blockcutter] Ordered -> DEBU 999 Enqueuing message into batch
2018-12-19 13:43:42.724 UTC [orderer/consensus/solo] main -> DEBU 99a Just began 2s batch timer
2018-12-19 13:43:42.730 UTC [grpc] infof -> DEBU 99b transport: loopyWriter.run returning. connection error: desc = "transport is closing"
2018-12-19 13:43:42.730 UTC [orderer/common/broadcast] Handle -> WARN
99c Error reading from 172.19.0.7:40978: rpc error: code = Canceled
desc = context canceled
2018-12-19 13:43:42.731 UTC [orderer/common/server] func1 -> DEBU 99d Closing Broadcast stream
2018-12-19 13:43:44.724 UTC [orderer/consensus/solo] main -> DEBU 99e Batch timer expired, creating block
2018-12-19 13:43:44.724 UTC [msp] GetDefaultSigningIdentity -> DEBU 99f Obtaining default signing identity
Fabric Config: All configs and setup same as specified in Build you First Network tutorial at https://hyperledger-fabric.readthedocs.io/en/release-1.3/build_network.html
Query
What is meant by this error? What does orderer read from cli(IP of cli: 172.19.0.7:40978) during broadcast?

Related

Hyperledger fabric nodejs chaincode - devMode

I am following the below link which outlines a GO example and runs fine, I am trying to alter it to run a nodejs smart contract.
https://hyperledger-fabric.readthedocs.io/en/latest/peer-chaincode-devmode.html#build-the-chaincode
For GO - works fine
go build -o simpleChaincode ./integration/chaincode/simple/cmd
CORE_CHAINCODE_LOGLEVEL=debug CORE_PEER_TLS_ENABLED=false
CORE_CHAINCODE_ID_NAME=mycc:1.0 ./simpleChaincode -peer.address
127.0.0.1:7052
For Nodejs
cd ./chaincode/asset-transfer-basic/chaincode-typescript
CORE_CHAINCODE_LOGLEVEL=debug CORE_PEER_TLS_ENABLED=false
CORE_CHAINCODE_ID_NAME=$CORE_CHAINCODE_ID_NAME npm run
start:server-debug -peer.address 127.0.0.1:7052
For Nodejs - in the peer logs
# 2022-04-05 16:30:56.427 PDT 013b DEBU [chaincode] CheckInvocation -> [0cda8fd8] getting chaincode data for cscc on channel
# 2022-04-05 16:30:56.427 PDT 013c DEBU [chaincode] Execute -> Entry
# 2022-04-05 16:30:56.428 PDT 013d INFO [ledgermgmt] CreateLedger -> Creating ledger [ch1] with genesis block
# 2022-04-05 16:30:56.429 PDT 013e DEBU [chaincode] handleMessage -> [0cda8fd8] Fabric side handling ChaincodeMessage of type: COMPLETED in state ready
# 2022-04-05 16:30:56.429 PDT 013f DEBU [chaincode] Notify -> [0cda8fd8] notifying Txid:0cda8fd80e6b204e45bfc10716924e689da5a2e50fc5c03de36692e3845a22a9, channelID:
# 2022-04-05 16:30:56.429 PDT 0140 DEBU [chaincode] Execute -> Exit
# 2022-04-05 16:30:56.429 PDT 0141 INFO [endorser] callChaincode -> finished chaincode: cscc duration: 1ms channel= txID=0cda8fd8
# 2022-04-05 16:30:56.429 PDT 0142 INFO [comm.grpc.server] 1 -> unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=127.0.0.1:55599 grpc.code=OK grpc.call_duration=1.393458ms
Below messages for Peer are listed in GO but not in NodeJS
# 2022-04-05 16:30:56.822 PDT 0143 DEBU [chaincode] handleMessage -> [] Fabric side handling ChaincodeMessage of type: REGISTER in state created
# 2022-04-05 16:30:56.822 PDT 0144 DEBU [chaincode] HandleRegister -> Received REGISTER in state created
# 2022-04-05 16:30:56.822 PDT 0145 DEBU [chaincode] Register -> registered handler complete for chaincode mycc:1.0
# 2022-04-05 16:30:56.822 PDT 0146 DEBU [chaincode] HandleRegister -> Got REGISTER for chaincodeID = mycc:1.0, sending back REGISTERED
# 2022-04-05 16:30:56.822 PDT 0147 DEBU [chaincode] HandleRegister -> Changed state to established for mycc:1.0
# 2022-04-05 16:30:56.822 PDT 0148 DEBU [chaincode] sendReady -> sending READY for chaincode mycc:1.0
# 2022-04-05 16:30:56.822 PDT 0149 DEBU [chaincode] sendReady -> Changed to state ready for chaincode mycc:1.0
When I try to invoke the Nodejs chaincode
CORE_PEER_ADDRESS=127.0.0.1:7051 peer chaincode invoke -o
127.0.0.1:7050 -C ch1 -n $CC_NAME -c '{"Args":["InitLedger"]}' --isInit
I receive the below error which indicates that the peer is expecting the chaincode to installed in peer, but for devmode it should happen automatically.
Error: endorsement failure during invoke. response: status:500 message:"error in simulation: failed to execute transaction edd6e811393cf4938a02b8d7773be85e57b5053ab5bfb2b38c06e8f88044d340: could not launch chaincode mycc-node:1.0: error building chaincode: error building image: failed to get chaincode package for external build: could not get legacy chaincode package 'mycc-node:1.0': open /var/hyperledger/production/chaincodes/mycc-node.1.0: no such file or directory"
Any suggestions or guidance will be greatly appreciated.
Thanks

Unable to update batchtimeout in orderer configuration?

I have created a network of fabric and it running fine. I want to update the oderer configuration such as batchtimeout in running network. I have followed this tutorial to update the channel configuration at runtime. This tutorial works for adding a new org. But when i am updating orderer configuration then i am getting error as
Error: got unexpected status: BAD_REQUEST -- error applying config
update to existing channel 'mychannel': error authorizing update:
error validating DeltaSet: policy for [Value]
/Channel/Orderer/BatchTimeout not satisfied: implicit policy
evaluation failed - 0 sub-policies were satisfied, but this policy
requires 1 of the 'Admins' sub-policies to be satisfied
I sigining the envelope.pb file from all the org admins such as org1 and org2. Kindly help me with this.
Note: I have used fabric-samples first-network for this.
EDIT:
I have signed pb file with org1 and org2.I have also signed it with orderer by exporting below variables
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/users/Admin\#example.com/msp/
CORE_PEER_ADDRESS=orderer.example.com:7050
CORE_PEER_LOCALMSPID=OrdererMSP
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt
Logs
11-28 09:13:57.207 UTC [policies] Manager -> DEBU cc4 Manager Channel/Orderer looking up path []
2019-11-28 09:13:57.207 UTC [policies] Manager -> DEBU cc5 Manager Channel/Orderer has managers OrdererOrg
2019-11-28 09:13:57.207 UTC [policies] Evaluate -> DEBU cc6 == Evaluating *policies.implicitMetaPolicy Policy /Channel/Orderer/Admins ==
2019-11-28 09:13:57.207 UTC [policies] Evaluate -> DEBU cc7 This is an implicit meta policy, it will trigger other policy evaluations, whose failures may be benign
2019-11-28 09:13:57.207 UTC [policies] Evaluate -> DEBU cc8 == Evaluating *cauthdsl.policy Policy /Channel/Orderer/OrdererOrg/Admins ==
2019-11-28 09:13:57.207 UTC [cauthdsl] deduplicate -> WARN cc9 De-duplicating identity [OrdererMSP95598fd8d4ea9aa73dad2aee5bc32375d01e3ed9da0a25c2f64ae1067af7ac74] at index 1 in signature set
2019-11-28 09:13:57.207 UTC [cauthdsl] deduplicate -> WARN cca De-duplicating identity [OrdererMSP95598fd8d4ea9aa73dad2aee5bc32375d01e3ed9da0a25c2f64ae1067af7ac74] at index 2 in signature set
2019-11-28 09:13:57.208 UTC [cauthdsl] func1 -> DEBU ccb 0xc000c99ef0 gate 1574932437208001961 evaluation starts
2019-11-28 09:13:57.208 UTC [cauthdsl] func2 -> DEBU ccc 0xc000c99ef0 signed by 0 principal evaluation starts (used [false false false])
2019-11-28 09:13:57.208 UTC [cauthdsl] func2 -> DEBU ccd 0xc000c99ef0 processing identity 0 with bytes of a1f390
2019-11-28 09:13:57.208 UTC [msp] satisfiesPrincipalInternalV143 -> DEBU cce Checking if identity has been named explicitly as an admin for OrdererMSP
2019-11-28 09:13:57.208 UTC [msp] satisfiesPrincipalInternalV143 -> DEBU ccf Checking if identity carries the admin ou for OrdererMSP
2019-11-28 09:13:57.208 UTC [msp] Validate -> DEBU cd0 MSP OrdererMSP validating identity
2019-11-28 09:13:57.208 UTC [msp] getCertificationChain -> DEBU cd1 MSP OrdererMSP getting certification chain
2019-11-28 09:13:57.208 UTC [msp] hasOURole -> DEBU cd2 MSP OrdererMSP checking if the identity is a client
2019-11-28 09:13:57.208 UTC [msp] getCertificationChain -> DEBU cd3 MSP OrdererMSP getting certification chain
2019-11-28 09:13:57.208 UTC [cauthdsl] func2 -> DEBU cd4 0xc000c99ef0 identity 0 does not satisfy principal: The identity is not an admin under this MSP [OrdererMSP]: The identity does not contain OU [ADMIN], MSP: [OrdererMSP]
2019-11-28 09:13:57.208 UTC [cauthdsl] func2 -> DEBU cd5 0xc000c99ef0 principal evaluation fails
2019-11-28 09:13:57.208 UTC [cauthdsl] func1 -> DEBU cd6 0xc000c99ef0 gate 1574932437208001961 evaluation fails
2019-11-28 09:13:57.208 UTC [policies] Evaluate -> DEBU cd7 Signature set did not satisfy policy /Channel/Orderer/OrdererOrg/Admins
2019-11-28 09:13:57.208 UTC [policies] Evaluate -> DEBU cd8 == Done Evaluating *cauthdsl.policy Policy /Channel/Orderer/OrdererOrg/Admins
2019-11-28 09:13:57.208 UTC [policies] func1 -> DEBU cd9 Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ OrdererOrg/Admins ]
2019-11-28 09:13:57.208 UTC [policies] Evaluate -> DEBU cda Signature set did not satisfy policy /Channel/Orderer/Admins
2019-11-28 09:13:57.208 UTC [policies] Evaluate -> DEBU cdb == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Orderer/Admins
2019-11-28 09:13:57.208 UTC [orderer.common.broadcast] ProcessMessage -> WARN cdc [channel: mychannel] Rejecting broadcast of config message from 172.25.0.7:42570 because of error: error applying config update to existing channel 'mychannel': error authorizing update: error validating DeltaSet: policy for [Value] /Channel/Orderer/BatchTimeout not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied
2019-11-28 09:13:57.208 UTC [orderer.common.server] func1 -> DEBU cdd Closing Broadcast stream
2019-11-28 09:13:57.208 UTC [comm.grpc.server] 1 -> INFO cde streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.peer_address=172.25.0.7:42570 grpc.code=OK grpc.call_duration=1.864323ms
2019-11-28 09:13:57.209 UTC [grpc] warningf -> DEBU cdf transport: http2Server.HandleStreams failed to read frame: read tcp 172.25.0.3:7050->172.25.0.7:42570: read: connection reset by peer
2019-11-28 09:13:57.209 UTC [grpc] infof -> DEBU ce0 transport: loopyWriter.run returning. connection error: desc = "transport is closing"
2019-11-28 09:13:57.209 UTC [grpc] infof -> DEBU ce1 transport: loopyWriter.run returning. connection error: desc = "transport is closing"
2019-11-28 09:13:57.209 UTC [common.deliver] Handle -> WARN ce2 Error reading from 172.25.0.7:42568: rpc error: code = Canceled desc = context canceled
2019-11-28 09:13:57.209 UTC [orderer.common.server] func1 -> DEBU ce3 Closing Deliver stream
2019-11-28 09:13:57.209 UTC [comm.grpc.server] 1 -> INFO ce4 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=172.25.0.7:42568 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=4.921585ms
Updated env
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=OrdererMSP
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/users/Admin#example.com/msp/
CORE_PEER_ID=cli
CORE_PEER_ADDRESS=orderer.example.com:7050
I am facing the same issue, but on BatchSize updating.
You can see the orderer log below:
2019-11-28 11:28:42.768 UTC [policies] Evaluate -> DEBU d6e This is an implicit meta policy, it will trigger other policy evaluations, whose failures may be benign
2019-11-28 11:28:42.768 UTC [policies] Evaluate -> DEBU d6f == Evaluating *cauthdsl.policy Policy /Channel/Orderer/OrdererOrg/Admins ==
2019-11-28 11:28:42.768 UTC [cauthdsl] deduplicate -> WARN d70 De-duplicating identity [OrdererMSPde02f61469eb325656c1a87232aeff9f44728b59015fccc5995bd849935812cb] at index 1 in signature set
2019-11-28 11:28:42.768 UTC [cauthdsl] deduplicate -> WARN d71 De-duplicating identity [OrdererMSPde02f61469eb325656c1a87232aeff9f44728b59015fccc5995bd849935812cb] at index 2 in signature set
2019-11-28 11:28:42.768 UTC [cauthdsl] func1 -> DEBU d72 0xc000453620 gate 1574940522768302200 evaluation starts
2019-11-28 11:28:42.768 UTC [cauthdsl] func2 -> DEBU d73 0xc000453620 signed by 0 principal evaluation starts (used [false false false])
2019-11-28 11:28:42.768 UTC [cauthdsl] func2 -> DEBU d74 0xc000453620 processing identity 0 with bytes of fd5830
2019-11-28 11:28:42.768 UTC [cauthdsl] func2 -> DEBU d75 0xc000453620 identity 0 does not satisfy principal: The identity is not an admin under this MSP [OrdererMSP]: The identity does not contain OU [ADMIN], MSP: [OrdererMSP]
2019-11-28 11:28:42.768 UTC [cauthdsl] func2 -> DEBU d76 0xc000453620 principal evaluation fails
2019-11-28 11:28:42.768 UTC [cauthdsl] func1 -> DEBU d77 0xc000453620 gate 1574940522768302200 evaluation fails
2019-11-28 11:28:42.768 UTC [policies] Evaluate -> DEBU d78 Signature set did not satisfy policy /Channel/Orderer/OrdererOrg/Admins
2019-11-28 11:28:42.768 UTC [policies] Evaluate -> DEBU d79 == Done Evaluating *cauthdsl.policy Policy /Channel/Orderer/OrdererOrg/Admins
2019-11-28 11:28:42.768 UTC [policies] func1 -> DEBU d7a Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ OrdererOrg/Admins ]
2019-11-28 11:28:42.768 UTC [policies] Evaluate -> DEBU d7b Signature set did not satisfy policy /Channel/Orderer/Admins
2019-11-28 11:28:42.768 UTC [policies] Evaluate -> DEBU d7c == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Orderer/Admins
2019-11-28 11:28:42.768 UTC [orderer.common.broadcast] ProcessMessage -> WARN d7d [channel: mychannel] Rejecting broadcast of config message from 172.29.0.7:43756 because of error: error applying config update to existing channel 'mychannel': error authorizing update: error validating DeltaSet: policy for [Value] /Channel/Orderer/BatchSize not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied
I have tried to add an OrganizationalUnit: ADMIN in the crypto-config.yaml file, in order to fix - The identity does not contain OU [ADMIN]. The OU was added but but this doesn't help me.
I also have tried to copy the orderer sign certificate to the msp/admincerts in order to fix - The identity is not an admin under this MSP [OrdererMSP], e.g.
cp ${ORG_ADMIN_HOME}/msp/signcerts/* ${ORG_ADMIN_HOME}/msp/admincerts
Hope the above steps will help someone, I am still investigating my issue with the channel configuration update. ✌️
For you both.
https://hyperledger-fabric.readthedocs.io/en/release-1.4/msp.html#identity-classification. If you are using NodeOUs, be sure to check the config.yaml in every MSP folder is correct, that the OU fields of the admin certificates include admin (as defined in your config.yaml and in your configtx.yaml organization policies), and that your configtx.yaml at least specifies:
Capabilities:
Channel: &ChannelCapabilities
V1_4_3: true
V1_1: true
#TechChain, you are now signing with a non-admin OrdererMSP, when you have a first policy check expecting any (non-OrdererMSP) organization writer signature and a second policy check expecting an admin OrdererMSP.
Try this:
Export orderer organization environment:
export CH_NAME=<your-channel>
export CORE_PEER_LOCALMSPID="OrdererMSP"
export CORE_PEER_MSPCONFIGPATH=<ca-client-path>/organizations/ordererOrganizations/orderer.com/users/admin#orderer.com/msp/ <OR> <your-orderer-admin-msp-path>
export ORDERER_CONTAINER=localhost:7050
export ORDERER_CA=../../ca/fabric-ca-client/organizations/ordererOrganizations/orderer.com/msp/tlscacerts/<your-tls-cert>.pem <OR> <your-orderer-tlscert-path>
export FABRIC_CFG_PATH=../../peers/<your-org-peer>
Sign-in using the signconfigtx tool:
peer channel signconfigtx -f <your-enveloped-config>.pb
Try to send the config update again:
peer channel update -f <your-enveloped-config>.pb -c $CH_NAME -o $ORDERER_CONTAINER --tls --cafile $TLS_ROOT_CA
Then, the transaction maybe also needs to be signed the orderer's admin.
The way to know what signature is missing is setting FABRIC_LOGGING_SPEC=DEBUG in the orderer and looking for the orderer DEBUG messages previous to the error. There you can see every signature certificate received in pem format and which organizations and roles are checked an passed (or not). I know that logs allergy spreads among many StackOverflow users, but it's the only way to find out what's going on.
EDIT:
What I mean:
Set FABRIC_LOGGING_SPEC=DEBUG in your orderer/s.
Relaunch your orderers so the new environment variable is applied.
Debug the process of checking the policies painstakingly and patiently.
docker logs -f --tail 200 myorderercontainer 2>&1 | grep ERRO -B100 -A10
Thanks, #kekomal!
I have checked config.yaml files in every MSP folder.For example the one for the OrderereMSP looks like this:
NodeOUs:
Enable: true
ClientOUIdentifier:
Certificate: cacerts/ca.example.com-cert.pem
OrganizationalUnitIdentifier: client
PeerOUIdentifier:
Certificate: cacerts/ca.example.com-cert.pem
OrganizationalUnitIdentifier: peer
AdminOUIdentifier:
Certificate: cacerts/ca.example.com-cert.pem
OrganizationalUnitIdentifier: admin
OrdererOUIdentifier:
Certificate: cacerts/ca.example.com-cert.pem
OrganizationalUnitIdentifier: orderer
I have updated and the channel capabilities section with:
Capabilities:
# Channel capabilities apply to both the orderers and the peers and must be
# supported by both.
# Set the value of the capability to true to require it.
Channel: &ChannelCapabilities
# V1.4.3 for Channel is a catchall flag for behavior which has been
# determined to be desired for all orderers and peers running at the v1.4.3
# level, but which would be incompatible with orderers and peers from
# prior releases.
# Prior to enabling V1.4.3 channel capabilities, ensure that all
# orderers and peers on a channel are at v1.4.3 or later.
V1_4_3: true
# V1.3 for Channel enables the new non-backwards compatible
# features and fixes of fabric v1.3
V1_3: true
# V1.1 for Channel enables the new non-backwards compatible
# features and fixes of fabric v1.1
V1_1: true
The end result is the same, failed channel update tx.
If you have any other suggestions, please share.

Hyperledger Fabric endorsement failing: txid exists

I am currently trying to successfully invoke a chaincode on an Hyperledger Fabric network using Docker Swarm, based on this example. My network is the following:
org1 with peer0.org1.com + 1 CA org1 + CLI org1 + orderer.example.com from ordererOrg on PC1
org2 with peer0.org2.com + 1 CA org2 on PC2
It seems that my network is working, but once a chaincode is instantiated on a peer then invoked, the operation is not propagated. E.g I insert data into the ledger, the chaincode container logs show that they process the data, the peer container used to invoke the chaincode seems to have correctly endorsed and simulated the query too. All of this using commands manually from inside the CLI.
peer0.org1.com container logs
2019-07-09 08:52:08.753 UTC [endorser] EndorseWithPlugin -> DEBU 3784 Entering endorsement for {plugin: escc, channel: mychannel, tx: 50732326bbe19c9eb8de42fa327ee67fc2c8102337ef96cdf9ca49fb7a0b7703, chaincode: fabcar}
2019-07-09 08:52:08.753 UTC [msp.identity] Sign -> DEBU 3785 Sign: plaintext: 0A2040CDC0100B7F12FA1505C311EF86...455254494649434154452D2D2D2D2D0A
2019-07-09 08:52:08.753 UTC [msp.identity] Sign -> DEBU 3786 Sign: digest: 5E7E6A043E851C3316B08F5CB4A05D31840D213793C55BF14EBE64213E852F84
2019-07-09 08:52:08.756 UTC [endorser] EndorseWithPlugin -> DEBU 3787 Exiting {plugin: escc, channel: mychannel, tx: 50732326bbe19c9eb8de42fa327ee67fc2c8102337ef96cdf9ca49fb7a0b7703, chaincode: fabcar}
2019-07-09 08:52:08.756 UTC [endorser] endorseProposal -> DEBU 3788 [mychannel][50732326] Exit
2019-07-09 08:52:08.756 UTC [lockbasedtxmgr] Done -> DEBU 3789 Done with transaction simulation / query execution [50732326bbe19c9eb8de42fa327ee67fc2c8102337ef96cdf9ca49fb7a0b7703]
2019-07-09 08:52:08.756 UTC [endorser] func1 -> DEBU 378a Exit: request from 10.0.0.4:34978
2019-07-09 08:52:08.756 UTC [comm.grpc.server] 1 -> INFO 378b unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=10.0.0.4:34978 grpc.code=OK grpc.call_duration=8.895639ms
A (successfully executed) query on the ledger then shows that the ledger state didn't change.
However, if I use the node SDK provided in the fabcar example from the official samples repo (invoke.js) to invoke the same chaincode operation I get an error:
node sdk error with node invoke.js
2019-07-09T09:22:03.277Z - warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:1 - endorsement failed - Error: failed to execute transaction a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9: error sending: txid: a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9(mychannel) exists
Failed to submit transaction: Error: Endorsement has failed
peer0.org1.com container logs after node invoke
2019-07-09 09:22:03.273 UTC [endorser] callChaincode -> INFO 15480 [mychannel][a0a2570d] Entry chaincode: name:"fabcar"
2019-07-09 09:22:03.273 UTC [chaincode] Execute -> DEBU 15481 Entry
2019-07-09 09:22:03.273 UTC [chaincode] Execute -> DEBU 15482 Exit
2019-07-09 09:22:03.273 UTC [endorser] callChaincode -> INFO 15483 [mychannel][a0a2570d] Exit chaincode: name:"fabcar" (0ms)
2019-07-09 09:22:03.273 UTC [chaincode] handleMessage -> DEBU 15484 [a0a2570d] Fabric side handling ChaincodeMessage of type: PUT_STATE in state ready
2019-07-09 09:22:03.273 UTC [endorser] SimulateProposal -> ERRO 15485 [mychannel][a0a2570d] failed to invoke chaincode name:"fabcar" , error: txid: a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9(mychannel) exists
github.com/hyperledger/fabric/core/chaincode.(*TransactionContexts).Create
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/transaction_contexts.go:59
github.com/hyperledger/fabric/core/chaincode.(*Handler).Execute
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:1207
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).execute
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:313
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Invoke
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:302
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:239
github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/support.go:147
github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:146
github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:247
github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:500
github.com/hyperledger/fabric/core/handlers/auth/filter.(*expirationCheckFilter).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/expiration.go:61
github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:32
github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler.func1
/opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:169
github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:31
github.com/hyperledger/fabric/core/comm.(*Throttle).UnaryServerIntercptor
/opt/gopath/src/github.com/hyperledger/fabric/core/comm/throttle.go:54
github.com/hyperledger/fabric/core/comm.(*Throttle).UnaryServerIntercptor-fm
/opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:224
github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34
github.com/hyperledger/fabric/common/grpclogging.UnaryServerInterceptor.func1
/opt/gopath/src/github.com/hyperledger/fabric/common/grpclogging/server.go:91
github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34
github.com/hyperledger/fabric/common/grpcmetrics.UnaryServerInterceptor.func1
/opt/gopath/src/github.com/hyperledger/fabric/common/grpcmetrics/interceptor.go:30
github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:39
github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler
/opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:171
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).processUnaryRPC
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:982
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).handleStream
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1208
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:686
runtime.goexit
/opt/go/src/runtime/asm_amd64.s:1333
error sending
failed to execute transaction a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9
github.com/hyperledger/fabric/core/chaincode.processChaincodeExecutionResult
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:245
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:240
github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/support.go:147
github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:146
github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:247
github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:500
github.com/hyperledger/fabric/core/handlers/auth/filter.(*expirationCheckFilter).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/expiration.go:61
github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:32
github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler.func1
/opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:169
github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:31
github.com/hyperledger/fabric/core/comm.(*Throttle).UnaryServerIntercptor
/opt/gopath/src/github.com/hyperledger/fabric/core/comm/throttle.go:54
github.com/hyperledger/fabric/core/comm.(*Throttle).UnaryServerIntercptor-fm
/opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:224
github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34
github.com/hyperledger/fabric/common/grpclogging.UnaryServerInterceptor.func1
/opt/gopath/src/github.com/hyperledger/fabric/common/grpclogging/server.go:91
github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34
github.com/hyperledger/fabric/common/grpcmetrics.UnaryServerInterceptor.func1
/opt/gopath/src/github.com/hyperledger/fabric/common/grpcmetrics/interceptor.go:30
github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:39
github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler
/opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:171
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).processUnaryRPC
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:982
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).handleStream
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1208
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:686
runtime.goexit
/opt/go/src/runtime/asm_amd64.s:1333
2019-07-09 09:22:03.273 UTC [endorser] SimulateProposal -> DEBU 15486 [mychannel][a0a2570d] Exit
2019-07-09 09:22:03.273 UTC [lockbasedtxmgr] Done -> DEBU 15487 Done with transaction simulation / query execution [a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9]
2019-07-09 09:22:03.273 UTC [endorser] func1 -> DEBU 15488 Exit: request from 172.18.0.1:51702
2019-07-09 09:22:03.273 UTC [chaincode] HandleTransaction -> DEBU 15489 [a0a2570d] handling PUT_STATE from chaincode
2019-07-09 09:22:03.273 UTC [comm.grpc.server] 1 -> INFO 1548a unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.18.0.1:51702 grpc.code=OK grpc.call_duration=4.573006ms
2019-07-09 09:22:03.274 UTC [chaincode] HandleTransaction -> DEBU 1548b [a0a2570d] Completed PUT_STATE. Sending RESPONSE
2019-07-09 09:22:03.274 UTC [chaincode] handleMessage -> DEBU 1548c [a0a2570d] Fabric side handling ChaincodeMessage of type: PUT_STATE in state ready
2019-07-09 09:22:03.274 UTC [chaincode] HandleTransaction -> DEBU 1548d [a0a2570d] handling PUT_STATE from chaincode
2019-07-09 09:22:03.274 UTC [chaincode] HandleTransaction -> DEBU 1548e [a0a2570d] Completed PUT_STATE. Sending RESPONSE
2019-07-09 09:22:03.275 UTC [chaincode] handleMessage -> DEBU 1548f [a0a2570d] Fabric side handling ChaincodeMessage of type: COMPLETED in state ready
2019-07-09 09:22:03.275 UTC [chaincode] Notify -> DEBU 15490 [a0a2570d] notifying Txid:a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9, channelID:mychannel
2019-07-09 09:22:03.275 UTC [chaincode] Execute -> DEBU 15491 Exit
2019-07-09 09:22:03.275 UTC [endorser] callChaincode -> INFO 15492 [mychannel][a0a2570d] Exit chaincode: name:"fabcar" (3ms)
2019-07-09 09:22:03.275 UTC [lockbasedtxmgr] GetTxSimulationResults -> DEBU 15493 Simulation completed, getting simulation results
2019-07-09 09:22:03.275 UTC [lockbasedtxmgr] Done -> DEBU 15494 Done with transaction simulation / query execution [a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9]
2019-07-09 09:22:03.275 UTC [endorser] SimulateProposal -> DEBU 15495 [mychannel][a0a2570d] Exit
2019-07-09 09:22:03.275 UTC [endorser] endorseProposal -> DEBU 15496 [mychannel][a0a2570d] Entry chaincode: name:"fabcar"
2019-07-09 09:22:03.275 UTC [endorser] endorseProposal -> DEBU 15497 [mychannel][a0a2570d] escc for chaincode name:"fabcar" is escc
2019-07-09 09:22:03.275 UTC [endorser] EndorseWithPlugin -> DEBU 15498 Entering endorsement for {plugin: escc, channel: mychannel, tx: a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9, chaincode: fabcar}
2019-07-09 09:22:03.275 UTC [msp.identity] Sign -> DEBU 15499 Sign: plaintext: 0A20828C242C3048295EE0453AD5EA85...455254494649434154452D2D2D2D2D0A
2019-07-09 09:22:03.275 UTC [msp.identity] Sign -> DEBU 1549a Sign: digest: F3BEDFED5C78408FD01F0A41C0714245508FD2F5AEF8A34F33E7F3C61DEFF987
2019-07-09 09:22:03.275 UTC [endorser] EndorseWithPlugin -> DEBU 1549b Exiting {plugin: escc, channel: mychannel, tx: a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9, chaincode: fabcar}
2019-07-09 09:22:03.276 UTC [endorser] endorseProposal -> DEBU 1549c [mychannel][a0a2570d] Exit
2019-07-09 09:22:03.276 UTC [lockbasedtxmgr] Done -> DEBU 1549d Done with transaction simulation / query execution [a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9]
2019-07-09 09:22:03.276 UTC [endorser] func1 -> DEBU 1549e Exit: request from 172.18.0.1:51702
2019-07-09 09:22:03.276 UTC [comm.grpc.server] 1 -> INFO 1549f unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.18.0.1:51702 grpc.code=OK grpc.call_duration=6.750666ms
I tried some solutions found on SO such as:
having anchor peers set for each org: was already done
setting CORE_PEER_LISTENADDRESS=org1.example.com:7051 -> failed the peer containers. If I set the address to 0.0.0.0:7051 the containers starts again but the error stays the same
restarting Docker / removing volumes / redownloading images: didn't change a thing
Further points:
The orderer doesn't seem to be notified, as we can see in its logs.
When I use node invoke.js I sometimes get this error, which disappears when I launch the command again. Peer logs don't show an error.
node invoke.js inconsistent error
2019-07-09T14:13:21.232Z - error: [AbstractStrategy]: constructor: No event hubs for strategy
Failed to submit transaction: Error: No event hubs for strategy
When I query using node, I'll sometimes get the following error:
node query.js inconsistent error
2019-07-09T13:23:13.602Z - error: [SingleQueryHandler]: evaluate: message=No peers available to query. Errors: [], stack=FabricError: No peers available to query. Errors: []
at SingleQueryHandler.evaluate (/home/path_to_dir/app/javascript/node_modules/fabric-network/lib/impl/query/singlequeryhandler.js:39:17)
at Transaction.evaluate (/home/path_to_dir/app/javascript/node_modules/fabric-network/lib/transaction.js:246:29)
at Contract.evaluateTransaction (/home/path_to_dir/app/javascript/node_modules/fabric-network/lib/contract.js:172:39)
at main (/home/path_to_dir/app/javascript/query.js:47:39)
at <anonymous>, name=FabricError
Failed to evaluate transaction: FabricError: No peers available to query. Errors: []
This error usually disappears when I start a query again but will pop off from time to time. When the query comes from the CLIorg1 it never happens.
Some probably useful files:
configtx.yaml
crypto-config.yaml
docker-compose-org1.yaml
docker-compose-org2.yaml
EDIT: added insert.js file and logs after trying to node insert.js (see comments)
Configuration information
HLF 1.4.1 ; Docker 18.09.7 ; docker-compose 1.23.2 ; node v8.16.0 ; npm 6.4.1 ; Ubuntu 18.04.2 LTS
Apologies for the multitude of errors which makes the question broad, but I assume they are somehow all connected to an endorsement issue. If not, do not hesitate to edit / ping me to narrow it down.

Chaincode is instantiated but doesn't appear in the list of instantiated codes

I am running Hyperledger Fabric 1.4.0
I have 1 org (Org1), 2 peers (peer0, peer1) and two orderers (ord0, ord1). The peers use couchdb as a storage backend.
I am able to successfully install my chaincode, then instantiate it.
Looking at peer0 logs, the docker image is built and the container started. peer0 also receives and acknowledges the REGISTER request sent by the chaincode binary within the container:
2019-06-24 10:15:57.003 UTC [dockercontroller] createContainer -> DEBU b563 created container {"imageID": "nid1-peer0-mynet-mychain-v1-613158e6e99c2c9e7d567e8b57fe2dfb56444f7fdcbc263dd1f61626a374843d", "containerID": "nid1-peer0-mynet-mychain-v1"}
2019-06-24 10:15:57.160 UTC [dockercontroller] Start -> DEBU b564 Started container nid1-peer0-mynet-mychain-v1
2019-06-24 10:15:57.160 UTC [container] unlockContainer -> DEBU b565 container lock deleted(mychain-v1)
2019-06-24 10:15:57.181 UTC [chaincode] handleMessage -> DEBU b566 [] Fabric side handling ChaincodeMessage of type: REGISTER in state created
2019-06-24 10:15:57.181 UTC [chaincode] HandleRegister -> DEBU b567 Received REGISTER in state created
2019-06-24 10:15:57.182 UTC [chaincode] Register -> DEBU b568 registered handler complete for chaincode mychain:v1
2019-06-24 10:15:57.182 UTC [chaincode] HandleRegister -> DEBU b569 Got REGISTER for chaincodeID = name:"mychain:v1" , sending back REGISTERED
2019-06-24 10:15:57.182 UTC [chaincode] HandleRegister -> DEBU b56a Changed state to established for name:"mychain:v1"
2019-06-24 10:15:57.182 UTC [chaincode] sendReady -> DEBU b56b sending READY for chaincode name:"mychain:v1"
2019-06-24 10:15:57.182 UTC [chaincode] sendReady -> DEBU b56c Changed to state ready for chaincode name:"mychain:v1"
2019-06-24 10:15:57.182 UTC [chaincode] Launch -> DEBU b56d launch complete
2019-06-24 10:15:57.182 UTC [chaincode] Execute -> DEBU b56e Entry
2019-06-24 10:15:57.182 UTC [chaincode] handleMessage -> DEBU b56f [1a98f442] Fabric side handling ChaincodeMessage of type: COMPLETED in state ready
Despite this, the chaincode is not registered in couchdb:
$ peer chaincode list --instantiated -C mychannel
2019-06-24 11:26:29.317 BST [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-06-24 11:26:29.332 BST [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
Get instantiated chaincodes on channel mychannel:
peer0 logs immediately after submitting the list command:
2019-06-24 10:26:30.057 UTC [couchdb] ReadDocRange -> DEBU c02e [mychannel_lscc] HTTP/1.1 200 OK
Transfer-Encoding: chunked
Cache-Control: must-revalidate
Content-Type: application/json
Date: Mon, 24 Jun 2019 10:26:30 GMT
Server: CouchDB/2.1.1 (Erlang OTP/18)
X-Couch-Request-Id: 20d0beb9c3
X-Couchdb-Body-Time: 0
2a
{"total_rows":0,"offset":0,"rows":[
]}
0
If I try to invoke a method on the chaincode, I get this error:
Error: endorsement failure during invoke. response: status:500 message:"make sure the chaincode mychain has been successfully instantiated and try again: chaincode mychain not found"
which just confirms that the chaincode has not been registered within the network.
Update
I realised I had missed an important detail: the peer logs repeatedly report errors connecting to the orderer, e.g.:
2019-06-24 11:30:35.931 UTC [ConnProducer] NewConnection -> ERRO 100e6 Failed connecting to ord0.mynet.example.com , error: context deadline exceeded
which might be the reason why the "chaincode instantiated" message doesn't get propagated...
After much debugging, it turned out the issue was pretty simple: the peers could not communicate with the orderers.
In my particular case the addresses of the orderers were wrong in configtx.yaml. Fixing them resulted in the chaincode instantiation process tu fully succeed.

Hyperledger fabric channel create failed: Principal deserialization failure

I'm trying to create channel to test my fabric environment, and I don't use docker instead I am running the actual executable itself. However, the creation failed with errors.
Error on the orderer:
2018-09-04 20:36:55.034 CST [cauthdsl] deduplicate -> ERRO 251 Principal deserialization failure (MSP OrdererOrg is unknown) for identity 0a0a4f7264657265724f72671281062d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949434444434341624b67417749424167495158346c644c424e55705271796451705845475767446a414b42676771686b6a4f50515144416a42704d5173770a435159445651514745774a56557a45544d4245474131554543424d4b5132467361575a76636d3570595445574d4251474131554542784d4e5532467549455a790a5957356a61584e6a627a45554d4249474131554543684d4c5a586868625842735a53356a62323078467a415642674e5642414d54446d4e684c6d5634595731770a62475575593239744d423458445445344d446b774e4445794d6a55784d466f58445449344d446b774d5445794d6a55784d466f775744454c4d416b47413155450a42684d4356564d78457a415242674e5642416754436b4e6862476c6d62334a7561574578466a415542674e564241635444564e6862694247636d467559326c7a0a593238784844416142674e5642414d54453239795a4756795a5849755a586868625842735a53356a623230775754415442676371686b6a4f50514942426767710a686b6a4f50514d4242774e434141514670514e4b7665305a332f5059377369315730537550553347326d6a61366b3744495756727a41766541516d6a4169415a0a6e4b6d6c4c4a742b5164655a4e4342446c6558742b72384b69656c4d72556b6e7159554e6f303077537a414f42674e56485138424166384542414d43423441770a44415944565230544151482f424149774144417242674e5648534d454a444169674341716e446c77684434524f6e6f6b424d72476249496d51724871697934680a6e514279524657617a5233774f54414b42676771686b6a4f5051514441674e4941444246416945416b6c356336596a64515038565352384679694462393553310a325130633032727269593662764a454d53544d4349435445346f6f79627843414a577a5a4f5069507173766d4c53667a316238676a337572692b5a434d664e470a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a
>2018-09-04 20:36:55.035 CST [cauthdsl] func1 -> DEBU 252 0xc00000f0e8 gate 1536064615035064391 evaluation starts
2018-09-04 20:36:55.035 CST [cauthdsl] func2 -> DEBU 253 0xc00000f0e8 signed by 0 principal evaluation starts (used [false])
2018-09-04 20:36:55.035 CST [cauthdsl] func2 -> DEBU 254 0xc00000f0e8 principal evaluation fails
2018-09-04 20:36:55.035 CST [cauthdsl] func1 -> DEBU 255 0xc00000f0e8 gate 1536064615035064391 evaluation fails
2018-09-04 20:36:55.035 CST [policies] Evaluate -> DEBU 256 Signature set did not satisfy policy /Channel/Orderer/OrdererOrg/Writers
2018-09-04 20:36:55.035 CST [policies] Evaluate -> DEBU 257 == Done Evaluating *cauthdsl.policy Policy /Channel/Orderer/OrdererOrg/Writers
2018-09-04 20:36:55.035 CST [policies] func1 -> DEBU 258 Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ OrdererOrg.Writers ]
2018-09-04 20:36:55.035 CST [policies] Evaluate -> DEBU 259 Signature set did not satisfy policy /Channel/Orderer/Writers
2018-09-04 20:36:55.035 CST [policies] Evaluate -> DEBU 25a == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Orderer/Writers
2018-09-04 20:36:55.035 CST [policies] func1 -> DEBU 25b Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ Orderer.Writers Consortiums.Writers ]
2018-09-04 20:36:55.035 CST [policies] Evaluate -> DEBU 25c Signature set did not satisfy policy /Channel/Writers
2018-09-04 20:36:55.035 CST [policies] Evaluate -> DEBU 25d == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Writers
2018-09-04 20:36:55.035 CST [orderer/common/broadcast] Handle -> WARN 25e [channel: roberttestchannel] Rejecting broadcast of config message from 192.168.136.100:54494 because of error: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied
2018-09-04 20:36:55.035 CST [orderer/common/server] func1 -> DEBU 25f Closing Broadcast stream
2018-09-04 20:36:55.037 CST [common/deliver] Handle -> WARN 260 Error reading from 192.168.136.100:54492: rpc error: code = Canceled desc = context canceled
2018-09-04 20:36:55.037 CST [orderer/common/server] func1 -> DEBU 261 Closing Deliver stream
2018-09-04 20:36:55.037 CST [grpc] infof -> DEBU 262 transport: loopyWriter.run returning. connection error: desc = "transport is closing"
2018-09-04 20:36:55.037 CST [grpc] infof -> DEBU 263 transport: loopyWriter.run returning. connection error: desc = "transport is closing"
Error on the peer:
2018-09-04 20:36:55.007 CST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
Error: got unexpected status: FORBIDDEN -- Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied
I have tried to reboot or delete all the project files. But it didn't work.
Thank you for your attention!
Here is the condition from you description:
modifying the crypto-config.yaml and configtx.yaml file to create your own fabric network.
using cryptogen and configtxgen to generate the channel artifacts and keycerts file
then your may use fabric-tool or Node-SDK to handle the fabric network like enroll the user, create channel and join channel.
the error threw out when your are create channel
In the head of the log, it shows that MSP OrdererOrg is unknown. That problem may cause by after using orderer certs signed the channel-creating request then the client sent the request to the orderer. It is fine that you use the order to sign the channel-creating request, only if you configured your Signature policy to your target member. Like setting the Rule like:
Policies:
Readers:
Type: Signature
Rule: "OR('OrgOrderer.admin','OrgOrderer.client')"
Writers:
Type: Signature
Rule: "OR('OrgOrderer.admin')"
If you are left the Policies setting to blank, it will follow the default policy.
The logs similar to Signature set did not satisfy policy /Channel/Orderer/OrdererOrg/Writers do shows that your signature is not valid. If you want to know more detail about what specific policy configuration, using the configentx to inspect the channel.tx or genesis.block:
configtxgen -inspectBlock ./channel-artifacts/genesis.block -configPath ./crypto-config/example.com/ >genesis.json
configtxgen -inspectChannelCreateTx ./channel-artifacts/channel.tx --configPath ./crypto-config/example.com/ >channel.json

Resources