how to set cert when calling createChannel in Fabric Node SDK - hyperledger-fabric

Help me please with channel creation.
In node sdk i have
// // extract the channel config bytes from the envelope to be signed
const envelope = fs.readFileSync(`${channelConfigPath+channelName}.tx`),
channelConfig = client.extractChannelConfig(envelope),
signature = client.signChannelConfig(channelConfig);
// get an admin based transactionID
// send to orderer
const request = {
config: channelConfig,
signatures: [signature],
name: channelName,
txId: client.newTransactionID(true)
};
client.createChannel(request)
But i get error in docker logs orderer.example.com
-2018-06-26 14:41:04.631 UTC [policies] Evaluate -> DEBU 120 Signature set did not satisfy policy /Channel/Application/Gov1MSP/Admins
-2018-06-26 14:41:04.631 UTC [policies] Evaluate -> DEBU 121 == Done Evaluating *cauthdsl.policy Policy /Channel/Application/Gov1MSP/
-2018-06-26 14:41:04.631 UTC [policies] func1 -> DEBU 122 Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ Gov1MSP.Admins ]
-2018-06-26 14:41:04.631 UTC [policies] Evaluate -> DEBU 123 Signature set did not satisfy policy /Channel/Application/ChannelCreationPolicy
-2018-06-26 14:41:04.631 UTC [policies] Evaluate -> DEBU 124 == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Application/ChannelCreationPolicy
-2018-06-26 14:41:04.631 UTC [orderer/common/broadcast] Handle -> WARN 125 [channel: usachannel] Rejecting broadcast of config message from 172.18.0.1:46638 because of error: Error authorizing update: Error validating DeltaSet: Policy for [Groups] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining
-2018-06-26 14:41:04.631 UTC [orderer/common/server] func1 -> DEBU 126 Closing Broadcast stream
So, how should I set cert from /etc/hyperledger/msp/users/Admin#org1.example.com/msp in Fabric Node SDK?
P.S. with the cert above i can create channel using peer channel create

I am using "^1.2.0" version for fabric-client and fabric-ca-client.
To set the signing identity of the client you need to use the setAdminSigningIdentity method.
For the private key I used the private key in the keystore directory of the msp folder.
In my case it was: "crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/keystore".
And for the certificate I used the same folder but the file "signcerts/Admin#org1.example.com-cert.pem".
Then you need to use newTransaction(true) because if you don't it will use the userContext which you do not want because you provided the adminSigningIdentity.

Related

How to connect to Hyperledger Fabric Gateway Service (new in HF 2.4) with TLS enabled?

I have a Hyperlegder Fabric network set-up which is operating fine as long as I don't use new Fabric-Gateway SDK (https://hyperledger-fabric.readthedocs.io/en/release-2.4/gateway.html).
I upgraded my network from 2.3.1 to 2.4.1 and wanted to try the new SDK, but cannot connect to the Peer. Below I give some details of my configuration.
Peer-base docker service:
peer-base:
image: hyperledger/fabric-peer
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_basic
- FABRIC_LOGGING_SPEC=info:gateway,comm,comm.grpc,comm.grpc.server=debug
- CORE_CHAINCODE_LOGGING_LEVEL=info
- CORE_PEER_LISTENADDRESS=0.0.0.0:7051
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/peer/msp
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/peer/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/peer/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/peer/tls/ca.crt
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=***
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=***
- CORE_METRICS_PROVIDER=prometheus
- CORE_OPERATIONS_LISTENADDRESS=0.0.0.0:7055
- CORE_PEER_GATEWAY_ENABLED=true
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: peer node start
volumes:
- ./config:/etc/hyperledger/configtx
- /var/run/:/host/var/run/
networks:
- basic
restart: always
After migrating to 2.4.1, I added CORE_PEER_GATEWAY_ENABLED=true.
The peer docker service, which extends the peer-base:
peer0.org1.tcash.com:
container_name: peer0.org1.tcash.com
extends:
file: docker-compose-org1-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer0.org1.tcash.com
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_ADDRESS=peer0.org1.tcash.com:7051
- CORE_PEER_CHAINCODEADDRESS=peer0.org1.tcash.com:7052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=test2.tcash.sigmacomp.pl:7051
- CORE_PEER_GOSSIP_ENDPOINT=test2.tcash.sigmacomp.pl:7051
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0.org1.tcash.com:5984
ports:
- 7051:7051
- 7053:7053
- 7055:7055
volumes:
- ./crypto-config/peerOrganizations/org1.tcash.com/peers/peer0.org1.tcash.com:/etc/hyperledger/peer
- ./persistence/peer0.org1.tcash.com/:/var/hyperledger/production
depends_on:
- couchdb0.org1.tcash.com
extra_hosts:
- orderer0.tcash.com:146.59.17.169
- orderer1.tcash.com:146.59.17.169
- orderer2.tcash.com:146.59.17.169
- orderer3.tcash.com:146.59.17.169
- orderer4.tcash.com:146.59.17.169
- peer2.org1.tcash.com:51.195.202.90
- peer3.org1.tcash.com:51.195.202.90
- peer4.org1.tcash.com:51.68.172.244
- peer5.org1.tcash.com:51.68.172.244
No changes have been made here during migration to 2.4.1.
I can see in the Peer logs, that new gateway service has been started:
2022-01-21 12:34:09.177 UTC 0023 INFO [nodeCmd] serve -> Starting peer with Gateway enabled
2022-01-21 12:34:09.177 UTC 0024 INFO [nodeCmd] serve -> Starting peer with ID=[peer0.org1.tcash.com], network ID=[dev], address=[peer0.org1.tcash.com:7051]
2022-01-21 12:34:09.177 UTC 0025 INFO [nodeCmd] func7 -> Starting profiling server with listenAddress = 0.0.0.0:6060
2022-01-21 12:34:09.177 UTC 0026 INFO [nodeCmd] serve -> Started peer with ID=[peer0.org1.tcash.com], network ID=[dev], address=[peer0.org1.tcash.com:7051]
After deploying the network, I try to run the transaction with the following code (NodeJS):
'use strict';
const fs = require('fs');
const crypto = require('crypto');
const grpc =require('#grpc/grpc-js');
const { connect, signers } = require('#hyperledger/fabric-gateway');
async function main() {
// Main try/catch block
try {
const credentials = fs.readFileSync('walletOffline/user.cert.pem');
const identity = { mspId: 'Org1MSP', credentials };
const privateKeyPem = fs.readFileSync('walletOffline/user.key.pem');
const privateKey = crypto.createPrivateKey(privateKeyPem);
const signer = signers.newPrivateKeySigner(privateKey);
const ccpJSON = fs.readFileSync('connection.json');
const ccp = JSON.parse(ccpJSON);
const peerName = ccp.organizations.org1.peers[0];
const peerAddress = ccp.peers[peerName].url.replace('grpcs://', '');
const tlsCACert = ccp.peers[peerName].tlsCACerts.pem;
const grpcOptions = ccp.peers[peerName].grpcOptions;
const tlsRootCert = Buffer.from(tlsCACert);
const tlsCredentials = grpc.credentials.createSsl(tlsRootCert);
const client = new grpc.Client(peerAddress, tlsCredentials, grpcOptions);
const gateway = connect({identity, signer, client});
const network = gateway.getNetwork('tcashchannel');
const contract = network.getContract('tcash');
const result = await contract.evaluateTransaction('queryAccountState', '100', '');
console.log('result: ' + result);
} catch (error) {
console.log('Error: ' + error);
console.log(error.stack);
}
}
main();
As you can see, I am extracting connection parameters from the JSON connection profile. This connection profile I use with the 'old' HF Node SDK and it's working without issues. However running this code gives me the following error from contract.evaluateTransaction() after 120 seconds timeout:
GatewayError: 14 UNAVAILABLE: failed to create new connection: context deadline exceeded
at newGatewayError (/Users/michaliwanicki/git/tcash/tcash-application/node_modules/#hyperledger/fabric-gateway/dist/gatewayerror.js:40:12)
at Object.callback (/Users/michaliwanicki/git/tcash/tcash-application/node_modules/#hyperledger/fabric-gateway/dist/client.js:81:67)
at Object.onReceiveStatus (/Users/michaliwanicki/git/tcash/tcash-application/node_modules/#grpc/grpc-js/build/src/client.js:180:36)
at Object.onReceiveStatus (/Users/michaliwanicki/git/tcash/tcash-application/node_modules/#grpc/grpc-js/build/src/client-interceptors.js:365:141)
at Object.onReceiveStatus (/Users/michaliwanicki/git/tcash/tcash-application/node_modules/#grpc/grpc-js/build/src/client-interceptors.js:328:181)
at /Users/michaliwanicki/git/tcash/tcash-application/node_modules/#grpc/grpc-js/build/src/call-stream.js:182:78
at processTicksAndRejections (internal/process/task_queues.js:77:11)
I can also see the corresponding entry in the peer logs:
2022-01-21 14:24:14.961 UTC 007e INFO [comm.grpc.server] 1 -> unary call completed grpc.service=gateway.Gateway grpc.method=Evaluate grpc.peer_address=178.183.68.178:54151 error="rpc error: code = Unavailable desc = failed to create new connection: context deadline exceeded" grpc.code=Unavailable grpc.call_duration=2m0.00087636s
There are no errors or warnings in the peer log.
EDIT:
After switching logging level to DEBUG and filtering it out, I came across the following part:
2022-01-27 13:38:19.217 UTC 67af DEBU [core.comm] ServerHandshake -> Server TLS handshake completed in 69.892651ms server=PeerServer remoteaddress=178.183.68.178:58755
2022-01-27 13:38:19.356 UTC 67b0 DEBU [lockbasedtxmgr] newQueryExecutor -> constructing new query executor txid = [407898ef-0004-4f25-be10-b603a2aaf919]
2022-01-27 13:38:19.357 UTC 67b1 DEBU [statecouchdb] GetState -> GetState(). ns=, key=CHANNEL_CONFIG_ENV_BYTES
2022-01-27 13:38:19.358 UTC 67b2 DEBU [lockbasedtxmgr] Done -> Done with transaction simulation / query execution [407898ef-0004-4f25-be10-b603a2aaf919]
2022-01-27 13:38:19.358 UTC [grpc] WarningDepth -> DEBU 02f [core]Adjusting keepalive ping interval to minimum period of 10s
2022-01-27 13:38:19.359 UTC [grpc] InfoDepth -> DEBU 030 [core]parsed scheme: ""
2022-01-27 13:38:19.359 UTC [grpc] InfoDepth -> DEBU 031 [core]scheme "" not registered, fallback to default scheme
2022-01-27 13:38:19.359 UTC [grpc] InfoDepth -> DEBU 032 [core]ccResolverWrapper: sending update to cc: {[{test2.tcash.sigmacomp.pl:8051 <nil> 0 <nil>}] <nil> <nil>}
2022-01-27 13:38:19.360 UTC [grpc] InfoDepth -> DEBU 033 [core]ClientConn switching balancer to "pick_first"
2022-01-27 13:38:19.360 UTC [grpc] InfoDepth -> DEBU 034 [core]Channel switches to new LB policy "pick_first"
2022-01-27 13:38:19.360 UTC [grpc] InfoDepth -> DEBU 035 [core]Subchannel Connectivity change to CONNECTING
2022-01-27 13:38:19.360 UTC [grpc] InfoDepth -> DEBU 036 [core]pickfirstBalancer: UpdateSubConnState: 0xc002ed2b30, {CONNECTING <nil>}
2022-01-27 13:38:19.361 UTC [grpc] InfoDepth -> DEBU 037 [core]Channel Connectivity change to CONNECTING
2022-01-27 13:38:19.360 UTC [grpc] InfoDepth -> DEBU 038 [core]Subchannel picks a new address "test2.tcash.sigmacomp.pl:8051" to connect
2022-01-27 13:38:19.370 UTC [grpc] InfoDepth -> DEBU 039 [core]Subchannel Connectivity change to TRANSIENT_FAILURE
2022-01-27 13:38:19.370 UTC [grpc] InfoDepth -> DEBU 03a [core]pickfirstBalancer: UpdateSubConnState: 0xc002ed2b30, {TRANSIENT_FAILURE connection closed}
2022-01-27 13:38:19.370 UTC [grpc] InfoDepth -> DEBU 03b [core]Channel Connectivity change to TRANSIENT_FAILURE
2022-01-27 13:38:19.370 UTC [grpc] InfoDepth -> DEBU 03c [transport]transport: loopyWriter.run returning. connection error: desc = "transport is closing"
EDIT 2:
I noticed that there are some errors in peer logs belonging to the other peers in the network (not the one which is called by the client application and running the Gateway service). It seems that there is a problem with establishment of TLS between peers when using Gateway SDK:
2022-02-10 14:36:24.934 UTC 24b0 DEBU [gossip.comm] func1 -> Got message: GossipMessage: Channel: , nonce: 0, tag: CHAN_OR_ORG state_info_pull_req: Channel MAC:23b92135be842b052b823a7c87853436fb579040416405d4fdfd0b6db0aa02d9, Envelope: 39 bytes, Signature: 0 bytes
2022-02-10 14:36:24.934 UTC 24b1 DEBU [gossip.gossip] handleMessage -> Entering, 54.37.226.59:7051 5c2af6d536100ada4e7f1829978c7f0163a6589f47f44207aa51a84987fe6a5b sent us GossipMessage: Channel: , nonce: 0, tag: CHAN_OR_ORG state_info_pull_req: Channel MAC:23b92135be842b052b823a7c87853436fb579040416405d4fdfd0b6db0aa02d9, Envelope: 39 bytes, Signature: 0 bytes
2022-02-10 14:36:24.935 UTC 24b2 DEBU [gossip.gossip] handleMessage -> Exiting
2022-02-10 14:36:24.942 UTC 24b3 ERRO [core.comm] ServerHandshake -> Server TLS handshake failed in 15.541µs with error tls: first record does not look like a TLS handshake server=PeerServer remoteaddress=172.24.0.1:36394
2022-02-10 14:36:24.942 UTC [grpc] WarningDepth -> DEBU 04e [core]grpc: Server.Serve failed to complete security handshake from "172.24.0.1:36394": tls: first record does not look like a TLS handshake
I suspect that there is some piece of configuration which is required for this feature to work, which I am missing. I will appreciate if anyone can help me find it.
It looks like the gateway peer is failing to connect to another endorsing peer in the network. Are you seeing any gossip communication between the peers in the logs?
Try reducing the dialTimeout to something less than the endorsementTimeout in the core.yaml and see if it connects to the other peers.

Instantiate chaincode successful but chaincode doesn't appear

I am running Hyperledger Fabric 1.4.x, and release-1.4 of fabric-sdk-java. I am trying to use the following code to instantiate a chaincode:
InstantiateProposalRequest instantiateProposalRequest = client.newInstantiationProposalRequest();
instantiateProposalRequest.setProposalWaitTime(180000);
instantiateProposalRequest.setChaincodeID(buildChaincodeID(name, version, path));
instantiateProposalRequest.setChaincodeLanguage(Type.JAVA);
instantiateProposalRequest.setFcn("init");
instantiateProposalRequest.setArgs(new String[] {""});
Collection<ProposalResponse> responses = channel.sendInstantiationProposal(instantiateProposalRequest);
The instantiation seemed successful, but I don't see it listed when I check with peer chaincode list --instantiated -C deconeb-channel.
The following log is from the point I execute the code (with FABRIC_LOGGING_SPEC=DEBUG:msp=info:gossip=info):
[root#vmdev2 createchannel]# docker logs $(docker ps -aqf name=fabric_peer1) -n 0 -f
... [endorser] ProcessProposal -> DEBU 22d2 Entering: request from 192.168.50.126:3280
... [protoutils] ValidateProposalMessage -> DEBU 22d3 ValidateProposalMessage starts for signed proposal 0xc003725b30
... [protoutils] validateChannelHeader -> DEBU 22d4 validateChannelHeader info: header type 3
... [protoutils] checkSignatureFromCreator -> DEBU 22d5 begin
... [protoutils] checkSignatureFromCreator -> DEBU 22d6 creator is &{myMSP 0167d1f59420e22fb1032bc6a17b528414378511c23a07719d2b364842f862a7}
... [protoutils] checkSignatureFromCreator -> DEBU 22d7 creator is valid
... [protoutils] checkSignatureFromCreator -> DEBU 22d8 exits successfully
... [protoutils] validateChaincodeProposalMessage -> DEBU 22d9 validateChaincodeProposalMessage starts for proposal 0xc001fb47e0, header 0xc0036cc870
... [protoutils] validateChaincodeProposalMessage -> DEBU 22da validateChaincodeProposalMessage info: header extension references chaincode name:"cscc"
... [endorser] preProcess -> DEBU 22db [deconeb-channel][db2d2e4f] processing txid: db2d2e4fef0b7cb0889fe6d0258b2f424426c180be62457c2f2cf5ec00bdd96c
... [fsblkstorage] retrieveTransactionByID -> DEBU 22dc retrieveTransactionByID() - txId = [db2d2e4fef0b7cb0889fe6d0258b2f424426c180be62457c2f2cf5ec00bdd96c]
... [endorser] SimulateProposal -> DEBU 22dd [deconeb-channel][db2d2e4f] Entry chaincode: name:"cscc"
... [endorser] callChaincode -> INFO 22de [deconeb-channel][db2d2e4f] Entry chaincode: name:"cscc"
... [chaincode] Execute -> DEBU 22df Entry
... [cscc] Invoke -> DEBU 22e0 Invoke function: GetConfigBlock
... [aclmgmt] CheckACL -> DEBU 22e1 acl policy not found in config for resource cscc/GetConfigBlock
... [policies] Evaluate -> DEBU 22e2 == Evaluating *policies.implicitMetaPolicy Policy /Channel/Application/Readers ==
... [policies] Evaluate -> DEBU 22e3 This is an implicit meta policy, it will trigger other policy evaluations, whose failures may be benign
... [policies] Evaluate -> DEBU 22e4 == Evaluating *cauthdsl.policy Policy /Channel/Application/myMSP/Readers ==
... [cauthdsl] func1 -> DEBU 22e5 0xc00059ec70 gate 1638419940859552678 evaluation starts
... [cauthdsl] func2 -> DEBU 22e6 0xc00059ec70 signed by 0 principal evaluation starts (used [false])
... [cauthdsl] func2 -> DEBU 22e7 0xc00059ec70 processing identity 0 with bytes of 115a2d0
... [cauthdsl] func2 -> DEBU 22e8 0xc00059ec70 principal matched by identity 0
... [cauthdsl] func2 -> DEBU 22e9 0xc00059ec70 principal evaluation succeeds for identity 0
... [cauthdsl] func2 -> DEBU 22ea 0xc00059ec70 signed by 1 principal evaluation starts (used [true])
... [cauthdsl] func2 -> DEBU 22eb 0xc00059ec70 skipping identity 0 because it has already been used
... [cauthdsl] func2 -> DEBU 22ec 0xc00059ec70 principal evaluation fails
... [cauthdsl] func2 -> DEBU 22ed 0xc00059ec70 signed by 2 principal evaluation starts (used [true])
... [cauthdsl] func2 -> DEBU 22ee 0xc00059ec70 skipping identity 0 because it has already been used
... [cauthdsl] func2 -> DEBU 22ef 0xc00059ec70 principal evaluation fails
... [cauthdsl] func1 -> DEBU 22f0 0xc00059ec70 gate 1638419940859552678 evaluation succeeds
... [policies] Evaluate -> DEBU 22f1 Signature set satisfies policy /Channel/Application/myMSP/Readers
... [policies] Evaluate -> DEBU 22f2 == Done Evaluating *cauthdsl.policy Policy /Channel/Application/myMSP/Readers
... [policies] Evaluate -> DEBU 22f3 Signature set satisfies policy /Channel/Application/Readers
... [policies] Evaluate -> DEBU 22f4 == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Application/Readers
... [chaincode] handleMessage -> DEBU 22f5 [db2d2e4f] Fabric side handling ChaincodeMessage of type: COMPLETED in state ready
... [chaincode] Notify -> DEBU 22f6 [db2d2e4f] notifying Txid:db2d2e4fef0b7cb0889fe6d0258b2f424426c180be62457c2f2cf5ec00bdd96c, channelID:deconeb-channel
... [chaincode] Execute -> DEBU 22f7 Exit
... [endorser] callChaincode -> INFO 22f8 [deconeb-channel][db2d2e4f] Exit chaincode: name:"cscc" (1ms)
... [endorser] SimulateProposal -> DEBU 22f9 [deconeb-channel][db2d2e4f] Exit
... [endorser] endorseProposal -> DEBU 22fa [deconeb-channel][db2d2e4f] Entry chaincode: name:"cscc"
... [endorser] endorseProposal -> DEBU 22fb [deconeb-channel][db2d2e4f] escc for chaincode name:"cscc" is escc
... [endorser] EndorseWithPlugin -> DEBU 22fc Entering endorsement for {plugin: escc, channel: deconeb-channel, tx: db2d2e4fef0b7cb0889fe6d0258b2f424426c180be62457c2f2cf5ec00bdd96c, chaincode: cscc}
... [endorser] EndorseWithPlugin -> DEBU 22fd Exiting {plugin: escc, channel: deconeb-channel, tx: db2d2e4fef0b7cb0889fe6d0258b2f424426c180be62457c2f2cf5ec00bdd96c, chaincode: cscc}
... [endorser] endorseProposal -> DEBU 22fe [deconeb-channel][db2d2e4f] Exit
... [endorser] func1 -> DEBU 22ff Exit: request from 192.168.50.126:3280
... [comm.grpc.server] 1 -> INFO 2300 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=192.168.50.126:3280 grpc.code=OK grpc.call_duration=3.1014ms
... [common.deliverevents] Deliver -> DEBU 2301 Starting new Deliver handler
... [common.deliver] Handle -> DEBU 2302 Starting new deliver loop for 192.168.50.126:3285
... [common.deliver] Handle -> DEBU 2303 Attempting to read seek info message from 192.168.50.126:3285
... [aclmgmt] CheckACL -> DEBU 2304 acl policy not found in config for resource event/Block
... [policies] Evaluate -> DEBU 2305 == Evaluating *policies.implicitMetaPolicy Policy /Channel/Application/Readers ==
... [policies] Evaluate -> DEBU 2306 This is an implicit meta policy, it will trigger other policy evaluations, whose failures may be benign
... [policies] Evaluate -> DEBU 2307 == Evaluating *cauthdsl.policy Policy /Channel/Application/myMSP/Readers ==
... [cauthdsl] func1 -> DEBU 2308 0xc00373d130 gate 1638419941422542679 evaluation starts
... [cauthdsl] func2 -> DEBU 2309 0xc00373d130 signed by 0 principal evaluation starts (used [false])
... [cauthdsl] func2 -> DEBU 230a 0xc00373d130 processing identity 0 with bytes of 115a2d0
... [cauthdsl] func2 -> DEBU 230b 0xc00373d130 principal matched by identity 0
... [cauthdsl] func2 -> DEBU 230c 0xc00373d130 principal evaluation succeeds for identity 0
... [cauthdsl] func2 -> DEBU 230d 0xc00373d130 signed by 1 principal evaluation starts (used [true])
... [cauthdsl] func2 -> DEBU 230e 0xc00373d130 skipping identity 0 because it has already been used
... [cauthdsl] func2 -> DEBU 230f 0xc00373d130 principal evaluation fails
... [cauthdsl] func2 -> DEBU 2310 0xc00373d130 signed by 2 principal evaluation starts (used [true])
... [cauthdsl] func2 -> DEBU 2311 0xc00373d130 skipping identity 0 because it has already been used
... [cauthdsl] func2 -> DEBU 2312 0xc00373d130 principal evaluation fails
... [cauthdsl] func1 -> DEBU 2313 0xc00373d130 gate 1638419941422542679 evaluation succeeds
... [policies] Evaluate -> DEBU 2314 Signature set satisfies policy /Channel/Application/myMSP/Readers
... [policies] Evaluate -> DEBU 2315 == Done Evaluating *cauthdsl.policy Policy /Channel/Application/myMSP/Readers
... [policies] Evaluate -> DEBU 2316 Signature set satisfies policy /Channel/Application/Readers
... [policies] Evaluate -> DEBU 2317 == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Application/Readers
... [common.deliver] deliverBlocks -> DEBU 2318 [channel: deconeb-channel] Received seekInfo (0xc002fa3a40) start:<newest:<> > stop:<specified:<number:9223372036854775807 > > from 192.168.50.126:3285
... [fsblkstorage] Next -> DEBU 2319 Initializing block stream for iterator. itr.maxBlockNumAvailable=1
... [fsblkstorage] newBlockfileStream -> DEBU 231a newBlockfileStream(): filePath=[/var/hyperledger/production/ledgersData/chains/chains/deconeb-channel/blockfile_000000], startOffset=[21642]
... [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 231b Remaining bytes=[4671], Going to peek [8] bytes
... [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 231c Returning blockbytes - length=[4669], placementInfo={fileNum=[0], startOffset=[21642], bytesOffset=[21644]}
... [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 231d blockbytes [4669] read from file [0]
... [common.deliver] deliverBlocks -> DEBU 231e [channel: deconeb-channel] Delivering block [1] for (0xc002fa3a40) for 192.168.50.126:3285
... [fsblkstorage] waitForBlock -> DEBU 231f Going to wait for newer blocks. maxAvailaBlockNumber=[1], waitForBlockNum=[2]
... [endorser] ProcessProposal -> DEBU 2320 Entering: request from 192.168.50.126:3280
... [protoutils] ValidateProposalMessage -> DEBU 2321 ValidateProposalMessage starts for signed proposal 0xc0033d4fa0
... [protoutils] validateChannelHeader -> DEBU 2322 validateChannelHeader info: header type 3
... [protoutils] checkSignatureFromCreator -> DEBU 2323 begin
... [protoutils] checkSignatureFromCreator -> DEBU 2324 creator is &{myMSP 0167d1f59420e22fb1032bc6a17b528414378511c23a07719d2b364842f862a7}
... [protoutils] checkSignatureFromCreator -> DEBU 2325 creator is valid
... [protoutils] checkSignatureFromCreator -> DEBU 2326 exits successfully
... [protoutils] validateChaincodeProposalMessage -> DEBU 2327 validateChaincodeProposalMessage starts for proposal 0xc00014d5e0, header 0xc0033d53b0
... [protoutils] validateChaincodeProposalMessage -> DEBU 2328 validateChaincodeProposalMessage info: header extension references chaincode name:"lscc"
... [endorser] preProcess -> DEBU 2329 [deconeb-channel][bc1525c4] processing txid: bc1525c4a55b0d9115df62e094cc5f651a38bd1e037bf0675296f77f489585da
... [fsblkstorage] retrieveTransactionByID -> DEBU 232a retrieveTransactionByID() - txId = [bc1525c4a55b0d9115df62e094cc5f651a38bd1e037bf0675296f77f489585da]
... [lockbasedtxmgr] NewTxSimulator -> DEBU 232b constructing new tx simulator
... [lockbasedtxmgr] newLockBasedTxSimulator -> DEBU 232c constructing new tx simulator txid = [bc1525c4a55b0d9115df62e094cc5f651a38bd1e037bf0675296f77f489585da]
... [endorser] SimulateProposal -> DEBU 232d [deconeb-channel][bc1525c4] Entry chaincode: name:"lscc"
... [endorser] callChaincode -> INFO 232e [deconeb-channel][bc1525c4] Entry chaincode: name:"lscc"
... [chaincode] Execute -> DEBU 232f Entry
... [chaincode] handleMessage -> DEBU 2330 [bc1525c4] Fabric side handling ChaincodeMessage of type: GET_STATE in state ready
... [chaincode] HandleTransaction -> DEBU 2331 [bc1525c4] handling GET_STATE from chaincode
... [chaincode] HandleGetState -> DEBU 2332 [bc1525c4] getting state for chaincode lscc, key productOwnership, channel deconeb-channel
... [statecouchdb] GetState -> DEBU 2333 GetState(). ns=lscc, key=productOwnership
... [couchdb] ReadDoc -> DEBU 2334 [deconeb-channel_lscc] Entering ReadDoc() id=[productOwnership]
... [couchdb] handleRequest -> DEBU 2335 Entering handleRequest() method=GET url=http://couchdb1.myorg.com:5984 dbName=deconeb-channel_lscc
... [couchdb] handleRequest -> DEBU 2336 Request URL: http://couchdb1.myorg.com:5984/deconeb-channel_lscc/productOwnership?attachments=true
... [couchdb] handleRequest -> DEBU 2337 HTTP Request: GET /deconeb-channel_lscc/productOwnership?attachments=true HTTP/1.1 | Host: couchdb1.myorg.com:5984 | User-Agent: Go-http-client/1.1 | Accept: multipart/related | Authorization: Basic Y291Y2hkYjpjb3VjaGRiMTIz | Accept-Encoding: gzip | |
... [couchdb] handleRequest -> DEBU 2338 Error handling CouchDB request. Error:not_found, Status Code:404, Reason:missing
... [couchdb] ReadDoc -> DEBU 2339 [deconeb-channel_lscc] Document not found (404), returning nil value instead of 404 error
... [chaincode] HandleGetState -> DEBU 233a [bc1525c4] No state associated with key: productOwnership. Sending RESPONSE with an empty payload
... [chaincode] HandleTransaction -> DEBU 233b [bc1525c4] Completed GET_STATE. Sending RESPONSE
... [cauthdsl] func1 -> DEBU 233c 0xc00370e210 gate 1638419941463477320 evaluation starts
... [cauthdsl] func2 -> DEBU 233d 0xc00370e210 signed by 0 principal evaluation starts (used [false])
... [cauthdsl] func2 -> DEBU 233e 0xc00370e210 processing identity 0 with bytes of 115a2d0
... [cauthdsl] func2 -> DEBU 233f 0xc00370e210 principal matched by identity 0
... [cauthdsl] func2 -> DEBU 2340 0xc00370e210 principal evaluation succeeds for identity 0
... [cauthdsl] func1 -> DEBU 2341 0xc00370e210 gate 1638419941463477320 evaluation succeeds
... [chaincode] handleMessage -> DEBU 2342 [bc1525c4] Fabric side handling ChaincodeMessage of type: PUT_STATE in state ready
... [chaincode] HandleTransaction -> DEBU 2343 [bc1525c4] handling PUT_STATE from chaincode
... [chaincode] HandleTransaction -> DEBU 2344 [bc1525c4] Completed PUT_STATE. Sending RESPONSE
... [lscc] putChaincodeCollectionData -> DEBU 2345 No collection configuration specified
... [chaincode] handleMessage -> DEBU 2346 [bc1525c4] Fabric side handling ChaincodeMessage of type: COMPLETED in state ready
... [chaincode] Notify -> DEBU 2347 [bc1525c4] notifying Txid:bc1525c4a55b0d9115df62e094cc5f651a38bd1e037bf0675296f77f489585da, channelID:deconeb-channel
... [chaincode] Execute -> DEBU 2348 Exit
... [chaincode] LaunchConfig -> DEBU 2349 launchConfig: executable:"/root/chaincode-java/start",Args:[/root/chaincode-java/start,--peerAddress,peer1.myorg.com:7052],Envs:[CORE_CHAINCODE_LOGGING_LEVEL=info,CORE_CHAINCODE_LOGGING_SHIM=warning,CORE_CHAINCODE_LOGGING_FORMAT=%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message},CORE_CHAINCODE_ID_NAME=productOwnership:1.0,CORE_PEER_TLS_ENABLED=true,CORE_TLS_CLIENT_KEY_PATH=/etc/hyperledger/fabric/client.key,CORE_TLS_CLIENT_CERT_PATH=/etc/hyperledger/fabric/client.crt,CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer.crt],Files:[/etc/hyperledger/fabric/client.crt /etc/hyperledger/fabric/client.key /etc/hyperledger/fabric/peer.crt]
... [chaincode] Start -> DEBU 234a start container: productOwnership:1.0
... [chaincode] Start -> DEBU 234b start container with args: /root/chaincode-java/start --peerAddress peer1.myorg.com:7052
... [chaincode] Start -> DEBU 234c start container with env:
CORE_CHAINCODE_LOGGING_LEVEL=info
CORE_CHAINCODE_LOGGING_SHIM=warning
CORE_CHAINCODE_LOGGING_FORMAT=%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}
CORE_CHAINCODE_ID_NAME=productOwnership:1.0
CORE_PEER_TLS_ENABLED=true
CORE_TLS_CLIENT_KEY_PATH=/etc/hyperledger/fabric/client.key
CORE_TLS_CLIENT_CERT_PATH=/etc/hyperledger/fabric/client.crt
CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer.crt
... [container] lockContainer -> DEBU 234d waiting for container(productOwnership-1.0) lock
... [container] lockContainer -> DEBU 234e got container (productOwnership-1.0) lock
... [dockercontroller] stopInternal -> DEBU 234f stopping container id=dev-peer1.myorg.com-productOwnership-1.0
... [dockercontroller] stopInternal -> DEBU 2350 stop container result error="No such container: dev-peer1.myorg.com-productOwnership-1.0"
... [dockercontroller] stopInternal -> DEBU 2351 killing container id=dev-peer1.myorg.com-productOwnership-1.0
... [dockercontroller] stopInternal -> DEBU 2352 kill container result id=dev-peer1.myorg.com-productOwnership-1.0 error="No such container: dev-peer1.myorg.com-productOwnership-1.0"
... [dockercontroller] stopInternal -> DEBU 2353 removing container id=dev-peer1.myorg.com-productOwnership-1.0
... [dockercontroller] stopInternal -> DEBU 2354 remove container result id=dev-peer1.myorg.com-productOwnership-1.0 error="No such container: dev-peer1.myorg.com-productOwnership-1.0"
... [dockercontroller] createContainer -> DEBU 2355 create container imageID=dev-peer1.myorg.com-productownership-1.0-8833aa49d3efc325e99f93399c3e02417a6d5a271b81e9013f3095580e89b308 containerID=dev-peer1.myorg.com-productOwnership-1.0
... [dockercontroller] getDockerHostConfig -> DEBU 2356 docker container hostconfig NetworkMode: devbc
... [dockercontroller] createContainer -> DEBU 2357 created container imageID=dev-peer1.myorg.com-productownership-1.0-8833aa49d3efc325e99f93399c3e02417a6d5a271b81e9013f3095580e89b308 containerID=dev-peer1.myorg.com-productOwnership-1.0
... [dockercontroller] Start -> DEBU 2358 Started container dev-peer1.myorg.com-productOwnership-1.0
... [container] unlockContainer -> DEBU 2359 container lock deleted(productOwnership-1.0)
... [container] lockContainer -> DEBU 235a waiting for container(productOwnership-1.0) lock
... [container] lockContainer -> DEBU 235b got container (productOwnership-1.0) lock
... [container] unlockContainer -> DEBU 235c container lock deleted(productOwnership-1.0)
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 235d Dec 02, 2021 4:39:02 AM org.hyperledger.fabric.shim.ChaincodeBase processEnvironmentOptions
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 235e INFO: <<<<<<<<<<<<<Enviromental options>>>>>>>>>>>>
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 235f Dec 02, 2021 4:39:02 AM org.hyperledger.fabric.shim.ChaincodeBase processEnvironmentOptions
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2360 INFO: CORE_CHAINCODE_ID_NAME: productOwnership:1.0
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2361 Dec 02, 2021 4:39:02 AM org.hyperledger.fabric.shim.ChaincodeBase processEnvironmentOptions
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2362 INFO: CORE_PEER_ADDRESS: 127.0.0.1
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2363 Dec 02, 2021 4:39:02 AM org.hyperledger.fabric.shim.ChaincodeBase processEnvironmentOptions
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2364 INFO: CORE_PEER_TLS_ENABLED: true
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2365 Dec 02, 2021 4:39:02 AM org.hyperledger.fabric.shim.ChaincodeBase processEnvironmentOptions
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2366 INFO: CORE_PEER_TLS_ROOTCERT_FILE: /etc/hyperledger/fabric/peer.crt
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2367 Dec 02, 2021 4:39:02 AM org.hyperledger.fabric.shim.ChaincodeBase processEnvironmentOptions
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2368 INFO: CORE_TLS_CLIENT_KEY_PATH: /etc/hyperledger/fabric/client.key
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2369 Dec 02, 2021 4:39:02 AM org.hyperledger.fabric.shim.ChaincodeBase processEnvironmentOptions
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 236a INFO: CORE_TLS_CLIENT_CERT_PATH: /etc/hyperledger/fabric/client.crt
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 236b Dec 02, 2021 4:39:02 AM org.hyperledger.fabric.shim.ChaincodeBase processEnvironmentOptions
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 236c INFO: LOGLEVEL: INFO
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 236d Dec 02, 2021 4:39:03 AM org.hyperledger.fabric.shim.ChaincodeBase processCommandLineOptions
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 236e INFO: <<<<<<<<<<<<<CommandLine options>>>>>>>>>>>>
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 236f Dec 02, 2021 4:39:03 AM org.hyperledger.fabric.shim.ChaincodeBase processCommandLineOptions
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2370 INFO: CORE_CHAINCODE_ID_NAME: productOwnership:1.0
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2371 Dec 02, 2021 4:39:03 AM org.hyperledger.fabric.shim.ChaincodeBase processCommandLineOptions
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2372 INFO: CORE_PEER_ADDRESS: peer1.myorg.com:7052
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2373 Dec 02, 2021 4:39:03 AM org.hyperledger.fabric.shim.ChaincodeBase processCommandLineOptions
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2374 INFO: CORE_PEER_TLS_ENABLED: true
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2375 Dec 02, 2021 4:39:03 AM org.hyperledger.fabric.shim.ChaincodeBase processCommandLineOptions
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2376 INFO: CORE_PEER_TLS_ROOTCERT_FILE: /etc/hyperledger/fabric/peer.crt
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2377 Dec 02, 2021 4:39:03 AM org.hyperledger.fabric.shim.ChaincodeBase processCommandLineOptions
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2378 INFO: CORE_TLS_CLIENT_KEY_PATH: /etc/hyperledger/fabric/client.key
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2379 Dec 02, 2021 4:39:03 AM org.hyperledger.fabric.shim.ChaincodeBase processCommandLineOptions
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 237a INFO: CORE_TLS_CLIENT_CERT_PATH: /etc/hyperledger/fabric/client.crt
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 237b org.hyperledger
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 237c org.hyperledger.fabric.shim.ChaincodeBase
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 237d org.hyperledger
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 237e 04:39:03:119 INFO org.hyperledger.fabric.shim.ChaincodeBase initializeLogging Loglevel set to INFO
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 237f 04:39:03:130 INFO org.hyperledger.fabric.shim.ChaincodeBase getChaincodeConfig <<<<<<<<<<<<<Properties options>>>>>>>>>>>>
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2380 04:39:03:131 INFO org.hyperledger.fabric.shim.ChaincodeBase getChaincodeConfig {CORE_CHAINCODE_ID_NAME=productOwnership:1.0, CORE_PEER_ADDRESS=peer1.myorg.com}
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2381 04:39:03:136 INFO org.hyperledger.fabric.metrics.Metrics initialize Metrics disabled
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2382 04:39:03:840 INFO org.hyperledger.fabric.shim.ChaincodeBase newChannelBuilder ()->Configuring channel connection to peer.peer1.myorg.com:7052 tlsenabled true
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2383 04:39:04:408 INFO org.hyperledger.fabric.shim.impl.InnvocationTaskManager <init> Max Pool Size [TP_MAX_POOL_SIZE]5
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2384 04:39:04:408 INFO org.hyperledger.fabric.shim.impl.InnvocationTaskManager <init> Queue Size [TP_CORE_POOL_SIZE]5000
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2385 04:39:04:413 INFO org.hyperledger.fabric.shim.impl.InnvocationTaskManager <init> Core Pool Size [TP_QUEUE_SIZE]5
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2386 04:39:04:413 INFO org.hyperledger.fabric.shim.impl.InnvocationTaskManager <init> Keep Alive Time [TP_KEEP_ALIVE_MS]5000
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2387 04:39:04:421 INFO org.hyperledger.fabric.shim.impl.InnvocationTaskExecutor <init> Thread pool created
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2388 04:39:04:422 INFO org.hyperledger.fabric.shim.impl.ChaincodeSupportClient start making the grpc call
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2389 04:39:04:596 INFO org.hyperledger.fabric.shim.impl.InnvocationTaskManager register Registering new chaincode name: "productOwnership:1.0"
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 238a
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 238b 04:39:04:620 FINE org.hyperledger.fabric.shim.impl.ChaincodeSupportClient$2 accept > sendToPeer
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 238c 04:39:04:636 FINE org.hyperledger.fabric.shim.impl.ChaincodeSupportClient$2 accept < sendToPeer
... [chaincode.accesscontrol] authenticate -> DEBU 238d Chaincode productOwnership:1.0 's authentication is authorized
... [chaincode] handleMessage -> DEBU 238e [] Fabric side handling ChaincodeMessage of type: REGISTER in state created
... [chaincode] HandleRegister -> DEBU 238f Received REGISTER in state created
... [chaincode] Register -> DEBU 2390 registered handler complete for chaincode productOwnership:1.0
... [chaincode] HandleRegister -> DEBU 2391 Got REGISTER for chaincodeID = name:"productOwnership:1.0" , sending back REGISTERED
... [chaincode] HandleRegister -> DEBU 2392 Changed state to established for name:"productOwnership:1.0"
... [chaincode] sendReady -> DEBU 2393 sending READY for chaincode name:"productOwnership:1.0"
... [chaincode] sendReady -> DEBU 2394 Changed to state ready for chaincode name:"productOwnership:1.0"
... [chaincode] Launch -> DEBU 2395 launch complete
... [chaincode] Execute -> DEBU 2396 Entry
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2397 04:39:05:261 FINE org.hyperledger.fabric.shim.impl.InnvocationTaskManager onChaincodeMessage [ ] {
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2398 "type": "REGISTERED"
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 2399 }
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 239a 04:39:05:269 FINE org.hyperledger.fabric.shim.impl.InnvocationTaskManager onChaincodeMessage [ ] Received REGISTERED: moving to established state
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 239b 04:39:05:273 FINE org.hyperledger.fabric.shim.impl.InnvocationTaskManager onChaincodeMessage [ ] {
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 239c "type": "READY"
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 239d }
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 239e 04:39:05:274 FINE org.hyperledger.fabric.shim.impl.InnvocationTaskManager onChaincodeMessage [ ] Received READY: ready for invocations
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 239f 04:39:05:288 FINE org.hyperledger.fabric.shim.impl.InnvocationTaskManager onChaincodeMessage [bc1525c4] {
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 23a0 "type": "INIT",
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 23a1 "payload": "CgRpbml0CgA=",
... [peer.chaincode.dev-peer1.myorg.com-productOwnership-1.0] func2 -> INFO 23a2 "txid": "bc1525c4a55b0d9115df62e094cc5f651a38bd1e037bf0675296f77f489585da",
I had to truncate the log above to fit post requirements; the full log can be found at https://pastebin.com/XBUtQdwz
I don't see any errors in the log so I'm not sure what the problem is. Can anyone point me in the right direction?

Endorsement policy failure error is taking a long time in hyperledger fabric v2.2

I have discovery enabled and I am testing if a transaction will fail if the endorsing organizations set in the transaction do not match the organizations actually involved in the transaction.
I am attempting to create a private data collection with ORG1 and as part of the transaction I have used the following method to set the endorsing organizations:
transaction.setEndorsingOrganizations(...['ORG2']);
The test is failing but it is taking 60 seconds to do so.
The logs are as follows:
peer (org1) logs:
2021-01-25 13:31:50.876 UTC [gossip.privdata] StoreBlock -> INFO 055 [default] Received block [15] from buffer
2021-01-25 13:31:50.878 UTC [vscc] Validate -> ERRO 056 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for collection _implicit_org_1 chaincode test-chaincode in tx 15:0 failed: signature set did not satisfy policy
2021-01-25 13:31:50.878 UTC [committer.txvalidator] validateTx -> ERRO 057 Dispatch for transaction txId = 5c52e14fa24a6e90effbd9dffcbb3fbc6cac1091c1bf3b6512616084 returned error: validation of endorsement policy for collection _implicit_org_1 chaincode test-chaincode in tx 15:0 failed: signature set did not satisfy policy
2021-01-25 13:31:50.878 UTC [committer.txvalidator] Validate -> INFO 058 [default] Validated block [15] in 1ms
2021-01-25 13:31:50.878 UTC [gossip.privdata] fetchPrivateData -> WARN 059 Do not know any peer in the channel( default ) that matches the policies , aborting
2021-01-25 13:31:50.878 UTC [gossip.privdata] populateFromRemotePeers -> WARN 05a Failed fetching private data from remote peers for dig2src:[map[{5c52e14fa24a6e90effbd9dffcbb3fbc6cac1091c1bf3b6512616084 test-chaincode _implicit_org_1 15 0}:[]]], err: Empty membership channel=default
2021-01-25 13:31:51.879 UTC [gossip.privdata] fetchPrivateData -> WARN 05b Do not know any peer in the channel( default ) that matches the policies , aborting
2021-01-25 13:31:51.879 UTC [gossip.privdata] populateFromRemotePeers -> WARN 05c Failed fetching private data from remote peers for dig2src:[map[{5c52e14fa24a6e90effbd9dffcbb3fbc6cac1091c1bf3b6512616084 test-chaincode _implicit_org_1 15 0}:[]]], err: Empty membership channel=default
2021-01-25 13:31:52.880 UTC [gossip.privdata] fetchPrivateData -> WARN 05d Do not know any peer in the channel( default ) that matches the policies , aborting
2021-01-25 13:31:52.880 UTC [gossip.privdata] populateFromRemotePeers -> WARN 05e Failed fetching private data from remote peers for dig2src:[map[{5c52e14fa24a6e90effbd9dffcbb3fbc6cac1091c1bf3b6512616084 test-chaincode _implicit_org_1 15 0}:[]]], err: Empty membership channel=default
fetchPrivateData and populateFromRemotePeers warnings repeat over and over until
2021-01-25 13:32:50.873 UTC [gossip.privdata] RetrievePvtdata -> WARN 0d4 Could not fetch all 1 eligible collection private write sets for block [15] (0 from local cache, 0 from transient store, 0 from other peers). Will commit block with missing private write sets:[txID: 5c52e14fa24a6e90effbd9dffcbb3fbc6cac1091c1bf3b6512616084, seq: 0, namespace: test-chaincode, collection: _implicit_org_1, hash: c189e3f3e8546ecde9b98b3aae67885cb8effeac1d35371a512c47db6a84
] channel=default
2021-01-25 13:32:50.873 UTC [validation] preprocessProtoBlock -> WARN 0d5 Channel [default]: Block [15] Transaction index [0] TxId [5c52e14fa24a6e90effbd9dffcbb3fbc6cac1091c1bf3b6512616084] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE]
2021-01-25 13:32:50.903 UTC [kvledger] CommitLegacy -> INFO 0d6 [default] Committed block [15] with 1 transaction(s) in 29ms (state_validation=0ms block_and_pvtdata_commit=11ms state_commit=16ms) commitHash=[bcfc168b343de9297a2cd4d9f202840dbde2478ab898998915b2c589]
2021-01-25 13:33:00.433 UTC [gossip.privdata] fetchPrivateData -> WARN 0d7 Do not know any peer in the channel( default ) that matches the policies , aborting
2021-01-25 13:33:00.433 UTC [gossip.privdata] reconcile -> ERRO 0d8 reconciliation error when trying to fetch missing items from different peers: Empty membership
2021-01-25 13:33:00.434 UTC [gossip.privdata] run -> ERRO 0d9 Failed to reconcile missing private info, error: Empty membership
The problem isn't the result, it's the time it takes to return the error. Anyone know what could be causing this and is it expected behaviour to take this long? In the peer logs it looks like the validation of the endorsement policy fails right at the beginning, but then it continues to try and fetch the private data anyway.
Check the core.yaml. The usual default setting is
pvtData:
pullRetryThreshold: 60s
That looks like the variable that might control that.

signature set did not satisfy policy

I've created a network with 2orgs each one with 1peer and 1ca
After setting the EnableNodeOUs:true, I instantiate the contract with "AND ('Org1MSP.peer','Org2MSP.peer')" which works fine. Same for "AND ('Org1MSP.member','Org2MSP.member')".
But after setting the policy to "AND ('Org1MSP.client','Org2MSP.client')" these errors occurs:
peer0.org2.example.com|2020-01-30 07:21:49.745 UTC [vscc] Validate -> ERRO 07c VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode mycc in tx 9:0 failed: signature set did not satisfy policy
peer0.org2.example.com|2020-01-30 07:21:49.745 UTC [committer.txvalidator] validateTx -> ERRO 07d VSCCValidateTx for transaction txId = fd5124b081e92586f091f54e517030ebaeb28fddc71428df32c82cce636a94cd returned error: validation of endorsement policy for chaincode mycc in tx 9:0 failed: signature set did not satisfy policy
peer0.org1.example.com|2020-01-30 07:21:49.745 UTC [vscc] Validate -> ERRO 086 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode mycc in tx 9:0 failed: signature set did not satisfy policy
peer0.org1.example.com|2020-01-30 07:21:49.745 UTC [committer.txvalidator] validateTx -> ERRO 087 VSCCValidateTx for transaction txId = fd5124b081e92586f091f54e517030ebaeb28fddc71428df32c82cce636a94cd returned error: validation of endorsement policy for chaincode mycc in tx 9:0 failed: signature set did not satisfy policy
That's my config.yml file for the NodeOUs
NodeOUs:
Enable: true
ClientOUIdentifier:
Certificate: cacerts/ca.org1.example.com-cert.pem
OrganizationalUnitIdentifier: client
PeerOUIdentifier:
Certificate: cacerts/ca.org1.example.com-cert.pem
OrganizationalUnitIdentifier: peer
AdminOUIdentifier:
Certificate: cacerts/ca.org1.example.com-cert.pem
OrganizationalUnitIdentifier: admin
OrdererOUIdentifier:
Certificate: cacerts/ca.org1.example.com-cert.pem
OrganizationalUnitIdentifier: orderer
Thanks in advance
The identity type with which you are submitting the initiation transaction is 'admin', as mentioned in the comment. However, your policy requires the identity type to be 'client'. Thus, the error.
To resolve, you'll need to create identity with identity type as 'client' and use that identity's msp to submit the initiation transaction.

unable to build a custom Hyperledger Fabric network

I am trying to build own network using fabric sample's first network components. Literally just renamed the organization names and trying to connect. But I am getting the following error.
./byfn.sh up -c "trustrace"
Starting for channel 'trustrace' with CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] Y
proceeding ...
LOCAL_VERSION=1.3.0
DOCKER_IMAGE_VERSION=1.3.0
Starting peer1.supplier.company.org ...
peer1.brand.company.org is up-to-date
Starting peer1.supplier.company.org
peer0.brand.company.org is up-to-date
Starting peer0.supplier.company.org ...
Starting orderer.company.org ...
Starting peer0.supplier.company.org
Starting peer0.supplier.company.org ... done
cli is up-to-date
____ _____ _ ____ _____
/ ___| |_ _| / \ | _ \ |_ _|
\___ \ | | / _ \ | |_) | | |
___) | | | / ___ \ | _ < | |
|____/ |_| /_/ \_\ |_| \_\ |_|
Build your first network (BYFN) end-to-end test
Channel name : trustrace
Creating channel...
+ peer channel create -o orderer.company.org:7050 -c trustrace -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/company.org/orderers/orderer.company.org/msp/tlscacerts/tlsca.company.org-cert.pem
+ res=1
+ set +x
Error: failed to create deliver client: orderer client failed to connect to orderer.company.org:7050: failed to create new connection: context deadline exceeded
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
ERROR !!!! Test failed
EDIT
I have already the company.org in my host file, that is being translated into localhost - 127.0.0.1 and the debug logs goes here:
2018-11-28 07:28:13.588 UTC [msp] setupSigningIdentity -> DEBU 035 Signing identity expires at 2028-11-25 07:23:00 +0000 UTC
2018-11-28 07:28:13.588 UTC [msp] Validate -> DEBU 036 MSP BrandMSP validating identity
2018-11-28 07:28:13.589 UTC [msp] GetDefaultSigningIdentity -> DEBU 037 Obtaining default signing identity
2018-11-28 07:28:13.589 UTC [grpc] DialContext -> DEBU 038 parsed scheme: ""
2018-11-28 07:28:13.589 UTC [grpc] DialContext -> DEBU 039 scheme "" not registered, fallback to default scheme
2018-11-28 07:28:13.589 UTC [grpc] watcher -> DEBU 03a ccResolverWrapper: sending new addresses to cc: [{orderer.company.org:7050 0 <nil>}]
2018-11-28 07:28:13.589 UTC [grpc] switchBalancer -> DEBU 03b ClientConn switching balancer to "pick_first"
2018-11-28 07:28:13.590 UTC [grpc] HandleSubConnStateChange -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc420247a80, CONNECTING
2018-11-28 07:28:13.591 UTC [grpc] createTransport -> DEBU 03d grpc: addrConn.createTransport failed to connect to {orderer.company.org:7050 0 <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp: lookup orderer.company.org on 127.0.0.11:53: no such host". Reconnecting...
2018-11-28 07:28:13.591 UTC [grpc] HandleSubConnStateChange -> DEBU 03e pickfirstBalancer: HandleSubConnStateChange: 0xc420247a80, TRANSIENT_FAILURE
2018-11-28 07:28:14.590 UTC [grpc] HandleSubConnStateChange -> DEBU 03f pickfirstBalancer: HandleSubConnStateChange: 0xc420247a80, CONNECTING
2018-11-28 07:28:14.593 UTC [grpc] createTransport -> DEBU 040 grpc: addrConn.createTransport failed to connect to {orderer.company.org:7050 0 <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp: lookup orderer.company.org on 127.0.0.11:53: no such host". Reconnecting...
2018-11-28 07:28:14.593 UTC [grpc] HandleSubConnStateChange -> DEBU 041 pickfirstBalancer: HandleSubConnStateChange: 0xc420247a80, TRANSIENT_FAILURE
2018-11-28 07:28:16.115 UTC [grpc] HandleSubConnStateChange -> DEBU 042 pickfirstBalancer: HandleSubConnStateChange: 0xc420247a80, CONNECTING
2018-11-28 07:28:16.121 UTC [grpc] createTransport -> DEBU 043 grpc: addrConn.createTransport failed to connect to {orderer.company.org:7050 0 <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp: lookup orderer.company.org on 127.0.0.11:53: no such host". Reconnecting...
2018-11-28 07:28:16.121 UTC [grpc] HandleSubConnStateChange -> DEBU 044 pickfirstBalancer: HandleSubConnStateChange: 0xc420247a80, TRANSIENT_FAILURE
Error: failed to create deliver client: orderer client failed to connect to orderer.company.org:7050: failed to create new connection: context deadline exceeded
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
ERROR !!!! Test failed
This error occurs because the previous volume interfering with the current one. Try removing all volumes before restarting the network.
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
docker volume prune
First 2 commands removes all running containers. (Check this if you want to remove all), last commands removes all previous volumes.

Resources