Chaincode has been installed, approved, committed, but still not able to invoke - hyperledger-fabric

I am using Hyperledger Fabric v2.2.3, in Oracle Linux 8.4
I am running without docker.
I have successfully installed, approved, committed the chaincode to my channel (orderer-channel).
I am using peer lifecycle chaincode xxx commands for the install, approve, and commit.
However, when I am using peer chaincode list command, but it list as empty.
Here are the commands and its debugging outputs.
[user#hyperledgerfabric ~]# /appl/hyperledger-fabric/bin/peer lifecycle chaincode install --peerAddresses localhost:7051 -o localhost:7050 \
/appl/chaincode/TestHLF/TestHLF.tar.gz
2021-09-06 16:07:07.506 +08 [cli.lifecycle.chaincode] submitInstallProposal -> INFO 001 Installed remotely: response:<status:200 payload:"\nHTestHLF:7544dc9a9c60359520cc16c4f2bbf0091c79a9aa7476e21c1a4cc76bd2f7e27b\022\007TestHLF" >
2021-09-06 16:07:07.506 +08 [cli.lifecycle.chaincode] submitInstallProposal -> INFO 002 Chaincode code package identifier: TestHLF:7544dc9a9c60359520cc16c4f2bbf0091c79a9aa7476e21c1a4cc76bd2f7e27b
[user#hyperledgerfabric ~]# /appl/hyperledger-fabric/bin/peer lifecycle chaincode approveformyorg -C orderer-channel \
-n TestHLF \
-v 1.0.0 \
--sequence 1 \
--package-id "TestHLF:7544dc9a9c60359520cc16c4f2bbf0091c79a9aa7476e21c1a4cc76bd2f7e27b" \
--peerAddresses localhost:7051 -o localhost:7050
2021-09-06 16:07:07.614 +08 [grpc] UpdateSubConnState -> DEBU 023 pickfirstBalancer: HandleSubConnStateChange: 0xc000453a40, {CONNECTING <nil>}
2021-09-06 16:07:07.614 +08 [grpc] Infof -> DEBU 024 Channel Connectivity change to CONNECTING
2021-09-06 16:07:07.614 +08 [grpc] Infof -> DEBU 025 Subchannel Connectivity change to READY
2021-09-06 16:07:07.614 +08 [grpc] UpdateSubConnState -> DEBU 026 pickfirstBalancer: HandleSubConnStateChange: 0xc000453a40, {READY <nil>}
2021-09-06 16:07:07.614 +08 [grpc] Infof -> DEBU 027 Channel Connectivity change to READY
2021-09-06 16:07:07.615 +08 [grpc] Infof -> DEBU 028 parsed scheme: ""
2021-09-06 16:07:07.615 +08 [grpc] Infof -> DEBU 029 scheme "" not registered, fallback to default scheme
2021-09-06 16:07:07.615 +08 [grpc] Infof -> DEBU 02a ccResolverWrapper: sending update to cc: {[{localhost:7051 <nil> 0 <nil>}] <nil> <nil>}
2021-09-06 16:07:07.615 +08 [grpc] Infof -> DEBU 02b ClientConn switching balancer to "pick_first"
2021-09-06 16:07:07.615 +08 [grpc] Infof -> DEBU 02c Channel switches to new LB policy "pick_first"
2021-09-06 16:07:07.615 +08 [grpc] Infof -> DEBU 02d Subchannel Connectivity change to CONNECTING
2021-09-06 16:07:07.615 +08 [grpc] Infof -> DEBU 02e Subchannel picks a new address "localhost:7051" to connect
2021-09-06 16:07:07.616 +08 [grpc] UpdateSubConnState -> DEBU 02f pickfirstBalancer: HandleSubConnStateChange: 0xc0004acb80, {CONNECTING <nil>}
2021-09-06 16:07:07.616 +08 [grpc] Infof -> DEBU 030 Channel Connectivity change to CONNECTING
2021-09-06 16:07:07.616 +08 [grpc] Infof -> DEBU 031 Subchannel Connectivity change to READY
2021-09-06 16:07:07.616 +08 [grpc] UpdateSubConnState -> DEBU 032 pickfirstBalancer: HandleSubConnStateChange: 0xc0004acb80, {READY <nil>}
2021-09-06 16:07:07.616 +08 [grpc] Infof -> DEBU 033 Channel Connectivity change to READY
2021-09-06 16:07:07.617 +08 [grpc] WithKeepaliveParams -> DEBU 034 Adjusting keepalive ping interval to minimum period of 10s
2021-09-06 16:07:07.617 +08 [grpc] Infof -> DEBU 035 parsed scheme: ""
2021-09-06 16:07:07.617 +08 [grpc] Infof -> DEBU 036 scheme "" not registered, fallback to default scheme
2021-09-06 16:07:07.617 +08 [grpc] Infof -> DEBU 037 ccResolverWrapper: sending update to cc: {[{localhost:7050 <nil> 0 <nil>}] <nil> <nil>}
2021-09-06 16:07:07.617 +08 [grpc] Infof -> DEBU 038 ClientConn switching balancer to "pick_first"
2021-09-06 16:07:07.617 +08 [grpc] Infof -> DEBU 039 Channel switches to new LB policy "pick_first"
2021-09-06 16:07:07.617 +08 [grpc] Infof -> DEBU 03a Subchannel Connectivity change to CONNECTING
2021-09-06 16:07:07.617 +08 [grpc] Infof -> DEBU 03b Subchannel picks a new address "localhost:7050" to connect
2021-09-06 16:07:07.618 +08 [grpc] UpdateSubConnState -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc000021820, {CONNECTING <nil>}
2021-09-06 16:07:07.618 +08 [grpc] Infof -> DEBU 03d Channel Connectivity change to CONNECTING
2021-09-06 16:07:07.618 +08 [grpc] Infof -> DEBU 03e Subchannel Connectivity change to READY
2021-09-06 16:07:07.618 +08 [grpc] UpdateSubConnState -> DEBU 03f pickfirstBalancer: HandleSubConnStateChange: 0xc000021820, {READY <nil>}
2021-09-06 16:07:07.618 +08 [grpc] Infof -> DEBU 040 Channel Connectivity change to READY
2021-09-06 16:07:07.619 +08 [msp.identity] Sign -> DEBU 041 Sign: plaintext: 0ADD080A7308031A0C08AB98D7890610...31613463633736626432663765323762
2021-09-06 16:07:07.619 +08 [msp.identity] Sign -> DEBU 042 Sign: digest: 2866DE7D44974B662CDEECFCA0C958E5884AE0FAA0C1F7E30A72A990FC65D241
2021-09-06 16:07:07.627 +08 [msp.identity] Sign -> DEBU 043 Sign: plaintext: 0ADD080A7308031A0C08AB98D7890610...3A0291CE38FD5CAF0782D4A75B2CB833
2021-09-06 16:07:07.627 +08 [msp.identity] Sign -> DEBU 044 Sign: digest: 2F0106AC9B01865833250CE5D44AC0C8EC4B75A17409E808CB1D7A391F8DEF5C
2021-09-06 16:07:07.627 +08 [msp.identity] Sign -> DEBU 045 Sign: plaintext: 0A85080A1B08051A0608AB98D7890622...00120D1A0B08FFFFFFFFFFFFFFFFFF01
2021-09-06 16:07:07.627 +08 [msp.identity] Sign -> DEBU 046 Sign: digest: 47CF4E1203F1D14CC1AEEB7AC0776DA2F360EE23FEA927E9F5A1E66878BEB027
2021-09-06 16:07:09.652 +08 [chaincodeCmd] ClientWait -> INFO 047 txid [2349c7438eae022d2453d0c57b9ad44250a9aca7ce5f5647b68877b51c20dd73] committed with status (VALID) at localhost:7051
[user#hyperledgerfabric ~]# /appl/hyperledger-fabric/bin/peer lifecycle chaincode commit -C orderer-channel \
-n TestHLF \
-v 1.0.0 \
--sequence 1 \
--peerAddresses localhost:7051 -o localhost:7050
2021-09-06 16:07:09.691 +08 [grpc] UpdateSubConnState -> DEBU 023 pickfirstBalancer: HandleSubConnStateChange: 0xc00036e440, {CONNECTING <nil>}
2021-09-06 16:07:09.692 +08 [grpc] Infof -> DEBU 024 Channel Connectivity change to CONNECTING
2021-09-06 16:07:09.694 +08 [grpc] Infof -> DEBU 025 Subchannel Connectivity change to READY
2021-09-06 16:07:09.694 +08 [grpc] UpdateSubConnState -> DEBU 026 pickfirstBalancer: HandleSubConnStateChange: 0xc00036e440, {READY <nil>}
2021-09-06 16:07:09.694 +08 [grpc] Infof -> DEBU 027 Channel Connectivity change to READY
2021-09-06 16:07:09.695 +08 [grpc] Infof -> DEBU 028 parsed scheme: ""
2021-09-06 16:07:09.695 +08 [grpc] Infof -> DEBU 029 scheme "" not registered, fallback to default scheme
2021-09-06 16:07:09.695 +08 [grpc] Infof -> DEBU 02a ccResolverWrapper: sending update to cc: {[{localhost:7051 <nil> 0 <nil>}] <nil> <nil>}
2021-09-06 16:07:09.695 +08 [grpc] Infof -> DEBU 02b ClientConn switching balancer to "pick_first"
2021-09-06 16:07:09.695 +08 [grpc] Infof -> DEBU 02c Channel switches to new LB policy "pick_first"
2021-09-06 16:07:09.695 +08 [grpc] Infof -> DEBU 02d Subchannel Connectivity change to CONNECTING
2021-09-06 16:07:09.695 +08 [grpc] Infof -> DEBU 02e Subchannel picks a new address "localhost:7051" to connect
2021-09-06 16:07:09.696 +08 [grpc] UpdateSubConnState -> DEBU 02f pickfirstBalancer: HandleSubConnStateChange: 0xc0004eb3e0, {CONNECTING <nil>}
2021-09-06 16:07:09.696 +08 [grpc] Infof -> DEBU 030 Channel Connectivity change to CONNECTING
2021-09-06 16:07:09.696 +08 [grpc] Infof -> DEBU 031 Subchannel Connectivity change to READY
2021-09-06 16:07:09.696 +08 [grpc] UpdateSubConnState -> DEBU 032 pickfirstBalancer: HandleSubConnStateChange: 0xc0004eb3e0, {READY <nil>}
2021-09-06 16:07:09.697 +08 [grpc] Infof -> DEBU 033 Channel Connectivity change to READY
2021-09-06 16:07:09.697 +08 [grpc] WithKeepaliveParams -> DEBU 034 Adjusting keepalive ping interval to minimum period of 10s
2021-09-06 16:07:09.697 +08 [grpc] Infof -> DEBU 035 parsed scheme: ""
2021-09-06 16:07:09.697 +08 [grpc] Infof -> DEBU 036 scheme "" not registered, fallback to default scheme
2021-09-06 16:07:09.697 +08 [grpc] Infof -> DEBU 037 ccResolverWrapper: sending update to cc: {[{localhost:7050 <nil> 0 <nil>}] <nil> <nil>}
2021-09-06 16:07:09.697 +08 [grpc] Infof -> DEBU 038 ClientConn switching balancer to "pick_first"
2021-09-06 16:07:09.697 +08 [grpc] Infof -> DEBU 039 Channel switches to new LB policy "pick_first"
2021-09-06 16:07:09.698 +08 [grpc] Infof -> DEBU 03a Subchannel Connectivity change to CONNECTING
2021-09-06 16:07:09.698 +08 [grpc] Infof -> DEBU 03b Subchannel picks a new address "localhost:7050" to connect
2021-09-06 16:07:09.698 +08 [grpc] UpdateSubConnState -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc0005c5ec0, {CONNECTING <nil>}
2021-09-06 16:07:09.698 +08 [grpc] Infof -> DEBU 03d Channel Connectivity change to CONNECTING
2021-09-06 16:07:09.698 +08 [grpc] Infof -> DEBU 03e Subchannel Connectivity change to READY
2021-09-06 16:07:09.698 +08 [grpc] UpdateSubConnState -> DEBU 03f pickfirstBalancer: HandleSubConnStateChange: 0xc0005c5ec0, {READY <nil>}
2021-09-06 16:07:09.698 +08 [grpc] Infof -> DEBU 040 Channel Connectivity change to READY
2021-09-06 16:07:09.698 +08 [msp.identity] Sign -> DEBU 041 Sign: plaintext: 0ADD080A7308031A0C08AD98D7890610...120754657374484C461A05312E302E30
2021-09-06 16:07:09.698 +08 [msp.identity] Sign -> DEBU 042 Sign: digest: 5E875D07A47E27DA338662AACC2860D9419371EDA2D57677D85149C8B18908E1
2021-09-06 16:07:09.704 +08 [msp.identity] Sign -> DEBU 043 Sign: plaintext: 0ADD080A7308031A0C08AD98D7890610...BD169FAD1ECF8613FFD9C8CE30A6C9AC
2021-09-06 16:07:09.704 +08 [msp.identity] Sign -> DEBU 044 Sign: digest: 4E45786A0763C875B6B18A7E30D2332BC45543DCA7885B39DAFC2C86F296856F
2021-09-06 16:07:09.705 +08 [msp.identity] Sign -> DEBU 045 Sign: plaintext: 0A85080A1B08051A0608AD98D7890622...00120D1A0B08FFFFFFFFFFFFFFFFFF01
2021-09-06 16:07:09.705 +08 [msp.identity] Sign -> DEBU 046 Sign: digest: 76501C0D734448AB048D31B2DC6A8428EE8BEA6F18FD1450ED0B9058890678C9
2021-09-06 16:07:11.728 +08 [chaincodeCmd] ClientWait -> INFO 047 txid [7d7e22e6e7d71ebb3b73fd797114da6c0ffbf3de1ab3e0e12d4c8ac8e409fdec] committed with status (VALID) at localhost:7051
Here are the command I used to check the existence, and found that using peer chaincode list has nothing installed.
[user#hyperledgerfabric ~]# /appl/hyperledger-fabric/bin/peer lifecycle chaincode queryinstalled --peerAddresses localhost:7051 -o localhost:7051
Installed chaincodes on peer:
Package ID: TestHLF:7544dc9a9c60359520cc16c4f2bbf0091c79a9aa7476e21c1a4cc76bd2f7e27b, Label: TestHLF
[user#hyperledgerfabric ~]# /appl/hyperledger-fabric/bin/peer lifecycle chaincode queryapproved -C orderer-channel \
-n TestHLF \
--peerAddresses localhost:7051 -o localhost:7051
Approved chaincode definition for chaincode 'TestHLF' on channel 'orderer-channel':
sequence: 1, version: 1.0.0, init-required: false, package-id: TestHLF:7544dc9a9c60359520cc16c4f2bbf0091c79a9aa7476e21c1a4cc76bd2f7e27b, endorsement plugin: escc, validation plugin: vscc
[user#hyperledgerfabric ~]# /appl/hyperledger-fabric/bin/peer lifecycle chaincode querycommitted -C orderer-channel \
-n TestHLF \
--peerAddresses localhost:7051 -o localhost:7051
Committed chaincode definition for chaincode 'TestHLF' on channel 'orderer-channel':
Version: 1.0.0, Sequence: 1, Endorsement Plugin: escc, Validation Plugin: vscc, Approvals: [MyOrg1: true]
[user#hyperledgerfabric ~]# /appl/hyperledger-fabric/bin/peer chaincode list --installed \
-C orderer-channel \
--peerAddresses localhost:7051 -o localhost:7050
Get installed chaincodes on peer:
Here are the output when I execute peer chaincode invoke,
This one on the console during my invoke via cli:
[user#hyperledgerfabric ~]# /appl/hyperledger-fabric/bin/peer chaincode invoke -C orderer-channel -n TestHLF --peerAddresses localhost:7051 -o localhost:7050 -c '{"Args":["retrieve", "key1"]}'
2021-09-06 17:14:36.991 +08 [chaincodeCmd] chaincodeInvokeOrQuery -> DEBU 043 ESCC invoke result: response:<status:500 message:"error in simulation: failed to execute transaction 16e55029175cd3e14d8155afb932e3fbf2dabdce73db120486968fa9126af2ef: could not launch chaincode TestHLF:7544dc9a9c60359520cc16c4f2bbf0091c79a9aa7476e21c1a4cc76bd2f7e27b: chaincode registration failed: container exited with 0" >
Error: endorsement failure during invoke. response: status:500 message:"error in simulation: failed to execute transaction 16e55029175cd3e14d8155afb932e3fbf2dabdce73db120486968fa9126af2ef: could not launch chaincode TestHLF:7544dc9a9c60359520cc16c4f2bbf0091c79a9aa7476e21c1a4cc76bd2f7e27b: chaincode registration failed: container exited with 0"
Here is the peer debug log during my invoke peer chaincode invoke via the cli:
Sep 06 17:14:36 hyperledgerfabric peer[1570]: 2021-09-06 17:14:36.986 +08 [chaincode] Start -> DEBU 1667 start container: TestHLF:7544dc9a9c60359520cc16c4f2bbf0091c79a9aa7476e21c1a4cc76bd2f7e27b
Sep 06 17:14:36 hyperledgerfabric peer[1570]: 2021-09-06 17:14:36.990 +08 [chaincode] Launch -> DEBU 1668 stopping due to error while launching: container exited with 0
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:118
Sep 06 17:14:36 hyperledgerfabric peer[1570]: runtime.goexit
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /usr/local/go/src/runtime/asm_amd64.s:1374
Sep 06 17:14:36 hyperledgerfabric peer[1570]: chaincode registration failed
Sep 06 17:14:36 hyperledgerfabric peer[1570]: 2021-09-06 17:14:36.990 +08 [chaincode] Launch -> DEBU 1669 launch complete
Sep 06 17:14:36 hyperledgerfabric peer[1570]: 2021-09-06 17:14:36.990 +08 [chaincode] Deregister -> DEBU 166a deregister handler: TestHLF:7544dc9a9c60359520cc16c4f2bbf0091c79a9aa7476e21c1a4cc76bd2f7e27b
Sep 06 17:14:36 hyperledgerfabric peer[1570]: 2021-09-06 17:14:36.991 +08 [endorser] callChaincode -> INFO 166b finished chaincode: TestHLF duration: 4ms channel=orderer-channel txID=16e55029
Sep 06 17:14:36 hyperledgerfabric peer[1570]: 2021-09-06 17:14:36.991 +08 [endorser] SimulateProposal -> ERRO 166c failed to invoke chaincode TestHLF, error: container exited with 0
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:118
Sep 06 17:14:36 hyperledgerfabric peer[1570]: runtime.goexit
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /usr/local/go/src/runtime/asm_amd64.s:1374
Sep 06 17:14:36 hyperledgerfabric peer[1570]: chaincode registration failed
Sep 06 17:14:36 hyperledgerfabric peer[1570]: could not launch chaincode TestHLF:7544dc9a9c60359520cc16c4f2bbf0091c79a9aa7476e21c1a4cc76bd2f7e27b
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Launch
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:85
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Invoke
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:197
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:155
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/endorser/support.go:126
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:119
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:187
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposalSuccessfullyOrError
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:398
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:340
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/handlers/auth/filter.(*expirationCheckFilter).ProcessProposal
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/handlers/auth/filter/expiration.go:61
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:32
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric-protos-go/peer._Endorser_ProcessProposal_Handler.func1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/github.com/hyperledger/fabric-protos-go/peer/peer.pb.go:107
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/internal/peer/node.unaryGrpcLimiter.func1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/internal/peer/node/grpc_limiters.go:51
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/common/grpclogging.UnaryServerInterceptor.func1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/common/grpclogging/server.go:92
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/common/grpcmetrics.UnaryServerInterceptor.func1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/common/grpcmetrics/interceptor.go:31
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric-protos-go/peer._Endorser_ProcessProposal_Handler
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/github.com/hyperledger/fabric-protos-go/peer/peer.pb.go:109
Sep 06 17:14:36 hyperledgerfabric peer[1570]: google.golang.org/grpc.(*Server).processUnaryRPC
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1082
Sep 06 17:14:36 hyperledgerfabric peer[1570]: google.golang.org/grpc.(*Server).handleStream
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1405
Sep 06 17:14:36 hyperledgerfabric peer[1570]: google.golang.org/grpc.(*Server).serveStreams.func1.1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:746
Sep 06 17:14:36 hyperledgerfabric peer[1570]: runtime.goexit
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /usr/local/go/src/runtime/asm_amd64.s:1374
Sep 06 17:14:36 hyperledgerfabric peer[1570]: failed to execute transaction 16e55029175cd3e14d8155afb932e3fbf2dabdce73db120486968fa9126af2ef
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/chaincode.processChaincodeExecutionResult
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:161
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:156
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/endorser/support.go:126
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:119
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:187
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposalSuccessfullyOrError
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:398
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:340
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/handlers/auth/filter.(*expirationCheckFilter).ProcessProposal
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/handlers/auth/filter/expiration.go:61
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:32
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric-protos-go/peer._Endorser_ProcessProposal_Handler.func1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/github.com/hyperledger/fabric-protos-go/peer/peer.pb.go:107
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/internal/peer/node.unaryGrpcLimiter.func1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/internal/peer/node/grpc_limiters.go:51
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/common/grpclogging.UnaryServerInterceptor.func1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/common/grpclogging/server.go:92
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric/common/grpcmetrics.UnaryServerInterceptor.func1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/common/grpcmetrics/interceptor.go:31
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34
Sep 06 17:14:36 hyperledgerfabric peer[1570]: github.com/hyperledger/fabric-protos-go/peer._Endorser_ProcessProposal_Handler
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/github.com/hyperledger/fabric-protos-go/peer/peer.pb.go:109
Sep 06 17:14:36 hyperledgerfabric peer[1570]: google.golang.org/grpc.(*Server).processUnaryRPC
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1082
Sep 06 17:14:36 hyperledgerfabric peer[1570]: google.golang.org/grpc.(*Server).handleStream
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1405
Sep 06 17:14:36 hyperledgerfabric peer[1570]: google.golang.org/grpc.(*Server).serveStreams.func1.1
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /__w/1/go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:746
Sep 06 17:14:36 hyperledgerfabric peer[1570]: runtime.goexit
Sep 06 17:14:36 hyperledgerfabric peer[1570]: /usr/local/go/src/runtime/asm_amd64.s:1374 channel=orderer-channel txID=16e55029
Sep 06 17:14:36 hyperledgerfabric peer[1570]: 2021-09-06 17:14:36.991 +08 [lockbasedtxmgr] Done -> DEBU 166d Done with transaction simulation / query execution [16e55029175cd3e14d8155afb932e3fbf2dabdce73db120486968fa9126af2ef]
Sep 06 17:14:36 hyperledgerfabric peer[1570]: 2021-09-06 17:14:36.991 +08 [endorser] ProcessProposal -> WARN 166e Failed to invoke chaincode channel=orderer-channel chaincode=TestHLF error="error in simulation: failed to execute transaction 16e55029175cd3e14d8155afb932e3fbf2dabdce73db120486968fa9126af2ef: could not launch chaincode TestHLF:7544dc9a9c60359520cc16c4f2bbf0091c79a9aa7476e21c1a4cc76bd2f7e27b: chaincode registration failed: container exited with 0"

Though you can run Fabric components directly outside of Docker, by default the Peer will attempt to use the Docker Daemon to create an image to run the chaincode in. That's the standard way the peer works.
For more information on how to run the Fabric components directly - I'd strongly recommended looking at the test-network-nano-bash
Recently added to the samples, this shows exactly how to start all the components directly. Though this still requires Docker for chaincode.
In terms of the chaincode and running that without docker, that is also possible using the external builders and chaincode-as-a-server features of Fabric (I'd like to get it added to that test-network-nano-bash when I get some time). Rather than installing the actual chaincode 'code', you install a package that contains a pointer to where the chaincode is running. So long as the chaincode is running at that host/port that it can be run ok. For more information on the feature there's an example repo - though that is about running in K8S.
EDIT:
If you want to monitor all running containers and also monitor any container that comes into being even if it dies this script can be very helpful

peer chaincode list response is empty because your chaincode as an external service is not registered by the LSCC, but you can trust peer lifecycle chaincode queryinstalled, the chaincode seems to be installed.
Your post title says you are not able to invoke. What are your problems when invoking?

Related

Chaincode as external service with TLS: installed but query doesn't find it?

In the Fabric docs example for a bin/release script, there's the comment
if tls_required is true, copy TLS files (using above example, the fully qualified path for these fils would be "$RELEASE"/chaincode/server/tls)
But which files should be put there? How do they have to be named? Are they referenced somewhere? Altogether I even don't understand why they're needed anyway. We already have all certficates in the connection.json on the peer side and also TLS certficates referenced by the ChaincodeServer on the chaincode side.
I'm asking because I can't invoke my chaincode and since I don't have additional certificates within the $RELEASE folder, that might cause the problem.
This is happening on chaincode query at the CLI:
$ export CORE_PEER_MSPCONFIGPATH=/config/admin/msp
$ peer chaincode query -C channel1 -n cc-abac -c '{"Args":["query","a"]}' --clientauth --tls --cafile /config/peer/tls-msp/tlscacerts/ca-cert.pem --keyfile /config/peer/tls-msp/keystore/key.pem --certfile /config/peer/tls-msp/signcerts/cert.pem
2020-07-06 07:20:55.290 UTC [msp] loadCertificateAt -> WARN 001 Failed loading ClientOU certificate at [/config/admin/msp]: [could not read file /config/admin/msp: read /config/admin/msp: is a directory]
2020-07-06 07:20:55.290 UTC [msp] loadCertificateAt -> WARN 002 Failed loading PeerOU certificate at [/config/admin/msp]: [could not read file /config/admin/msp: read /config/admin/msp: is a directory]
2020-07-06 07:20:55.290 UTC [msp] loadCertificateAt -> WARN 003 Failed loading AdminOU certificate at [/config/admin/msp]: [could not read file /config/admin/msp: read /config/admin/msp: is a directory]
2020-07-06 07:20:55.291 UTC [msp] loadCertificateAt -> WARN 004 Failed loading OrdererOU certificate at [/config/admin/msp]: [could not read file /config/admin/msp: read /config/admin/msp: is a directory]
2020-07-06 07:20:55.302 UTC [grpc] Infof -> DEBU 005 parsed scheme: ""
2020-07-06 07:20:55.302 UTC [grpc] Infof -> DEBU 006 scheme "" not registered, fallback to default scheme
2020-07-06 07:20:55.302 UTC [grpc] Infof -> DEBU 007 ccResolverWrapper: sending update to cc: {[{org1-peer1:30151 <nil> 0 <nil>}] <nil> <nil>}
2020-07-06 07:20:55.302 UTC [grpc] Infof -> DEBU 008 ClientConn switching balancer to "pick_first"
2020-07-06 07:20:55.302 UTC [grpc] Infof -> DEBU 009 Channel switches to new LB policy "pick_first"
2020-07-06 07:20:55.302 UTC [grpc] Infof -> DEBU 00a Subchannel Connectivity change to CONNECTING
2020-07-06 07:20:55.302 UTC [grpc] Infof -> DEBU 00b Subchannel picks a new address "org1-peer1:30151" to connect
2020-07-06 07:20:55.302 UTC [grpc] UpdateSubConnState -> DEBU 00c pickfirstBalancer: HandleSubConnStateChange: 0xc0001aff40, {CONNECTING <nil>}
2020-07-06 07:20:55.302 UTC [grpc] Infof -> DEBU 00d Channel Connectivity change to CONNECTING
2020-07-06 07:20:55.310 UTC [grpc] Infof -> DEBU 00e Subchannel Connectivity change to READY
2020-07-06 07:20:55.310 UTC [grpc] UpdateSubConnState -> DEBU 00f pickfirstBalancer: HandleSubConnStateChange: 0xc0001aff40, {READY <nil>}
2020-07-06 07:20:55.310 UTC [grpc] Infof -> DEBU 010 Channel Connectivity change to READY
2020-07-06 07:20:55.315 UTC [grpc] Infof -> DEBU 011 parsed scheme: ""
2020-07-06 07:20:55.315 UTC [grpc] Infof -> DEBU 012 scheme "" not registered, fallback to default scheme
2020-07-06 07:20:55.315 UTC [grpc] Infof -> DEBU 013 ccResolverWrapper: sending update to cc: {[{org1-peer1:30151 <nil> 0 <nil>}] <nil> <nil>}
2020-07-06 07:20:55.315 UTC [grpc] Infof -> DEBU 014 ClientConn switching balancer to "pick_first"
2020-07-06 07:20:55.315 UTC [grpc] Infof -> DEBU 015 Channel switches to new LB policy "pick_first"
2020-07-06 07:20:55.315 UTC [grpc] Infof -> DEBU 016 Subchannel Connectivity change to CONNECTING
2020-07-06 07:20:55.315 UTC [grpc] Infof -> DEBU 017 Subchannel picks a new address "org1-peer1:30151" to connect
2020-07-06 07:20:55.315 UTC [grpc] UpdateSubConnState -> DEBU 018 pickfirstBalancer: HandleSubConnStateChange: 0xc0003447f0, {CONNECTING <nil>}
2020-07-06 07:20:55.315 UTC [grpc] Infof -> DEBU 019 Channel Connectivity change to CONNECTING
2020-07-06 07:20:55.320 UTC [grpc] Infof -> DEBU 01a Subchannel Connectivity change to READY
2020-07-06 07:20:55.320 UTC [grpc] UpdateSubConnState -> DEBU 01b pickfirstBalancer: HandleSubConnStateChange: 0xc0003447f0, {READY <nil>}
2020-07-06 07:20:55.320 UTC [grpc] Infof -> DEBU 01c Channel Connectivity change to READY
Error: endorsement failure during query. response: status:500 message:"make sure the chaincode cc-abac has been successfully defined on channel channel1 and try again: chaincode definition for 'cc-abac' exists, but chaincode is not installed"
Ok, let's check if it's installed:
$ peer lifecycle chaincode queryinstalled
2020-07-06 07:27:54.192 UTC [msp] loadCertificateAt -> WARN 001 Failed loading ClientOU certificate at [/config/admin/msp]: [could not read file /config/admin/msp: read /config/admin/msp: is a directory]
2020-07-06 07:27:54.192 UTC [msp] loadCertificateAt -> WARN 002 Failed loading PeerOU certificate at [/config/admin/msp]: [could not read file /config/admin/msp: read /config/admin/msp: is a directory]
2020-07-06 07:27:54.192 UTC [msp] loadCertificateAt -> WARN 003 Failed loading AdminOU certificate at [/config/admin/msp]: [could not read file /config/admin/msp: read /config/admin/msp: is a directory]
2020-07-06 07:27:54.193 UTC [msp] loadCertificateAt -> WARN 004 Failed loading OrdererOU certificate at [/config/admin/msp]: [could not read file /config/admin/msp: read /config/admin/msp: is a directory]
2020-07-06 07:27:54.201 UTC [grpc] Infof -> DEBU 005 parsed scheme: ""
2020-07-06 07:27:54.201 UTC [grpc] Infof -> DEBU 006 scheme "" not registered, fallback to default scheme
2020-07-06 07:27:54.201 UTC [grpc] Infof -> DEBU 007 ccResolverWrapper: sending update to cc: {[{org1-peer1:30151 <nil> 0 <nil>}] <nil> <nil>}
2020-07-06 07:27:54.201 UTC [grpc] Infof -> DEBU 008 ClientConn switching balancer to "pick_first"
2020-07-06 07:27:54.201 UTC [grpc] Infof -> DEBU 009 Channel switches to new LB policy "pick_first"
2020-07-06 07:27:54.201 UTC [grpc] Infof -> DEBU 00a Subchannel Connectivity change to CONNECTING
2020-07-06 07:27:54.202 UTC [grpc] Infof -> DEBU 00b Subchannel picks a new address "org1-peer1:30151" to connect
2020-07-06 07:27:54.202 UTC [grpc] UpdateSubConnState -> DEBU 00c pickfirstBalancer: HandleSubConnStateChange: 0xc000447800, {CONNECTING <nil>}
2020-07-06 07:27:54.202 UTC [grpc] Infof -> DEBU 00d Channel Connectivity change to CONNECTING
2020-07-06 07:27:54.209 UTC [grpc] Infof -> DEBU 00e Subchannel Connectivity change to READY
2020-07-06 07:27:54.209 UTC [grpc] UpdateSubConnState -> DEBU 00f pickfirstBalancer: HandleSubConnStateChange: 0xc000447800, {READY <nil>}
2020-07-06 07:27:54.209 UTC [grpc] Infof -> DEBU 010 Channel Connectivity change to READY
2020-07-06 07:27:54.213 UTC [grpc] Infof -> DEBU 011 parsed scheme: ""
2020-07-06 07:27:54.213 UTC [grpc] Infof -> DEBU 012 scheme "" not registered, fallback to default scheme
2020-07-06 07:27:54.213 UTC [grpc] Infof -> DEBU 013 ccResolverWrapper: sending update to cc: {[{org1-peer1:30151 <nil> 0 <nil>}] <nil> <nil>}
2020-07-06 07:27:54.213 UTC [grpc] Infof -> DEBU 014 ClientConn switching balancer to "pick_first"
2020-07-06 07:27:54.213 UTC [grpc] Infof -> DEBU 015 Channel switches to new LB policy "pick_first"
2020-07-06 07:27:54.213 UTC [grpc] Infof -> DEBU 016 Subchannel Connectivity change to CONNECTING
2020-07-06 07:27:54.213 UTC [grpc] Infof -> DEBU 017 Subchannel picks a new address "org1-peer1:30151" to connect
2020-07-06 07:27:54.213 UTC [grpc] UpdateSubConnState -> DEBU 018 pickfirstBalancer: HandleSubConnStateChange: 0xc0000da8f0, {CONNECTING <nil>}
2020-07-06 07:27:54.213 UTC [grpc] Infof -> DEBU 019 Channel Connectivity change to CONNECTING
2020-07-06 07:27:54.219 UTC [grpc] Infof -> DEBU 01a Subchannel Connectivity change to READY
2020-07-06 07:27:54.219 UTC [grpc] UpdateSubConnState -> DEBU 01b pickfirstBalancer: HandleSubConnStateChange: 0xc0000da8f0, {READY <nil>}
2020-07-06 07:27:54.219 UTC [grpc] Infof -> DEBU 01c Channel Connectivity change to READY
Installed chaincodes on peer:
Package ID: cc-abac:7f7a2b755874ef0c72e6d1eb467f6e65afb488994c80a75f3c5712fcdc9ee095, Label: cc-abac
So it's installed but the query command doesn't find it?
And yes - it's installed on the correct channel:
$ peer lifecycle chaincode querycommitted --channelID channel1 --name cc-abac --cafile /config/peer/tls-msp/tlscacerts/ca-cert.pem
Committed chaincode definition for chaincode 'cc-abac' on channel 'channel1':
Version: 1.0, Sequence: 1, Endorsement Plugin: escc, Validation Plugin: vscc, Approvals: [Org1MSP: true, Org2MSP: true, Org3MSP: true]
This is the peer log at the time of the query:
[36m2020-07-06 07:31:23.605 UTC [lockbasedtxmgr] NewTxSimulator -> DEBU 12a6[0m constructing new tx simulator
[36m2020-07-06 07:31:23.605 UTC [lockbasedtxmgr] newLockBasedTxSimulator -> DEBU 12a7[0m constructing new tx simulator txid = [ed5b5de845b99b8b126e1b10d05df3849b9b108c83435f4225fc47c9a3b841c7]
[36m2020-07-06 07:31:23.605 UTC [stateleveldb] GetState -> DEBU 12a8[0m GetState(). ns=_lifecycle, key=namespaces/fields/cc-abac/Sequence
[36m2020-07-06 07:31:23.605 UTC [lockbasedtxmgr] Done -> DEBU 12a9[0m Done with transaction simulation / query execution [ed5b5de845b99b8b126e1b10d05df3849b9b108c83435f4225fc47c9a3b841c7]
[34m2020-07-06 07:31:23.605 UTC [comm.grpc.server] 1 -> INFO 12aa[0m unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=10.131.0.100:51580 grpc.peer_subject="CN=org1-peer1,OU=peer,O=Hyperledger,ST=North Carolina,C=US" grpc.code=OK grpc.call_duration=2.128156ms
[36m2020-07-06 07:31:23.608 UTC [grpc] infof -> DEBU 12ab[0m transport: loopyWriter.run returning. connection error: desc = "transport is closing"
[36m2020-07-06 07:31:23.608 UTC [grpc] warningf -> DEBU 12ac[0m transport: http2Server.HandleStreams failed to read frame: read tcp 10.130.1.219:7051->10.131.0.100:51580: read: connection reset by peer
[36m2020-07-06 07:31:23.608 UTC [grpc] infof -> DEBU 12ad[0m transport: loopyWriter.run returning. connection error: desc = "transport is closing"
10.131.0.100 is the calling CLI and 10.130.1.219 is the peer. So is there a connection problem between CLI and Peer?
Coming back to the first paragraph of this question - this is the connection.json available to the peer:
{
"address": "org1-cc1:31101",
"dial_timeout": "10s",
"tls_required": "true",
"client_auth_required": "true",
"client_key": "-----BEGIN PRIVATE KEY-----\nxxx\nxxx\nxxx\n-----END PRIVATE KEY-----",
"client_cert": "-----BEGIN CERTIFICATE-----\nxxx/xxx\nxxx\nxxx\nxxx\nxxx\nxxx\nxxx/xxxn\nxxx\nxxx\nxxx\nxxx\nxxx\nxxx\nxxx=\n-----END CERTIFICATE-----",
"root_cert": "-----BEGIN CERTIFICATE-----\nxxx\nxxx\nxxx\nxxx\nxxx\nxxx\nxxx\nxxx\nxxx\nxxx\nxxx\nxxx\n-----END CERTIFICATE-----"
}
Of course, xxx are just placeholders ;)
The Chaincode main() looks as follows:
func main() {
keyFile := os.Getenv("CHAINCODE_TLS_KEY_FILE")
key, err := ioutil.ReadFile(keyFile)
check(err)
certFile := os.Getenv("CHAINCODE_TLS_CERT_FILE")
cert, err := ioutil.ReadFile(certFile)
check(err)
caFile := os.Getenv("CHAINCODE_TLS_CACERT_FILE")
ca, err := ioutil.ReadFile(caFile)
check(err)
server := &shim.ChaincodeServer{
CCID: os.Getenv("CHAINCODE_CCID"),
Address: "0.0.0.0:9999",
CC: new(SimpleChaincode),
TLSProps: shim.TLSProperties{
Disabled: false,
Key: key,
Cert: cert,
ClientCACerts: ca,
},
}
err = server.Start()
if err != nil {
fmt.Printf("Error starting Simple chaincode: %s", err)
}
}

Error : issue while using createChannel command

I've been following the tutorial for the Hyperledger Fabric development
but i have this error message while trying the command ./network.sh createChannel:
Error: failed to create deliver client for orderer: orderer client failed to connect to localhost:7050: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp [::1]:7050: connectex: Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée."
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
The French part means that no connection can be established cause the targeted computer has refused it.
After searching a bit there might be an issue with the ports or ip addresses but not sure.
My logs for the different components :
Orderer service :
2020-05-27 09:13:16.388 UTC [localconfig] completeInitialization -> WARN 001 General.GenesisFile should be replaced by General.BootstrapFile
2020-05-27 09:13:16.389 UTC [localconfig] completeInitialization -> INFO 002 Kafka.Version unset, setting to 0.10.2.0
2020-05-27 09:13:16.389 UTC [orderer.common.server] prettyPrintStruct -> INFO 003 Orderer config values:
General.ListenAddress = "0.0.0.0"
General.ListenPort = 7050
General.TLS.Enabled = true
General.TLS.PrivateKey = "/var/hyperledger/orderer/tls/server.key"
General.TLS.Certificate = "/var/hyperledger/orderer/tls/server.crt"
General.TLS.RootCAs = [/var/hyperledger/orderer/tls/ca.crt]
General.TLS.ClientAuthRequired = false
General.TLS.ClientRootCAs = []
General.Cluster.ListenAddress = ""
General.Cluster.ListenPort = 0
General.Cluster.ServerCertificate = ""
General.Cluster.ServerPrivateKey = ""
General.Cluster.ClientCertificate = "/var/hyperledger/orderer/tls/server.crt"
General.Cluster.ClientPrivateKey = "/var/hyperledger/orderer/tls/server.key"
General.Cluster.RootCAs = [/var/hyperledger/orderer/tls/ca.crt]
General.Cluster.DialTimeout = 5s
General.Cluster.RPCTimeout = 7s
General.Cluster.ReplicationBufferSize = 20971520
General.Cluster.ReplicationPullTimeout = 5s
General.Cluster.ReplicationRetryTimeout = 5s
General.Cluster.ReplicationBackgroundRefreshInterval = 5m0s
General.Cluster.ReplicationMaxRetries = 12
General.Cluster.SendBufferSize = 10
General.Cluster.CertExpirationWarningThreshold = 168h0m0s
General.Cluster.TLSHandshakeTimeShift = 0s
General.Keepalive.ServerMinInterval = 1m0s
General.Keepalive.ServerInterval = 2h0m0s
General.Keepalive.ServerTimeout = 20s
General.ConnectionTimeout = 0s
General.GenesisMethod = "file"
General.GenesisFile = "/var/hyperledger/orderer/orderer.genesis.block"
General.BootstrapMethod = "file"
General.BootstrapFile = "/var/hyperledger/orderer/orderer.genesis.block"
General.Profile.Enabled = false
General.Profile.Address = "0.0.0.0:6060"
General.LocalMSPDir = "/var/hyperledger/orderer/msp"
General.LocalMSPID = "OrdererMSP"
General.BCCSP.ProviderName = "SW"
General.BCCSP.SwOpts.SecLevel = 256
General.BCCSP.SwOpts.HashFamily = "SHA2"
General.BCCSP.SwOpts.Ephemeral = true
General.BCCSP.SwOpts.FileKeystore.KeyStorePath = ""
General.BCCSP.SwOpts.DummyKeystore =
General.BCCSP.SwOpts.InmemKeystore =
General.Authentication.TimeWindow = 15m0s
General.Authentication.NoExpirationChecks = false
FileLedger.Location = "/var/hyperledger/production/orderer"
FileLedger.Prefix = "hyperledger-fabric-ordererledger"
Kafka.Retry.ShortInterval = 5s
Kafka.Retry.ShortTotal = 10m0s
Kafka.Retry.LongInterval = 5m0s
Kafka.Retry.LongTotal = 12h0m0s
Kafka.Retry.NetworkTimeouts.DialTimeout = 10s
Kafka.Retry.NetworkTimeouts.ReadTimeout = 10s
Kafka.Retry.NetworkTimeouts.WriteTimeout = 10s
Kafka.Retry.Metadata.RetryMax = 3
Kafka.Retry.Metadata.RetryBackoff = 250ms
Kafka.Retry.Producer.RetryMax = 3
Kafka.Retry.Producer.RetryBackoff = 100ms
Kafka.Retry.Consumer.RetryBackoff = 2s
Kafka.Verbose = true
Kafka.Version = 0.10.2.0
Kafka.TLS.Enabled = false
Kafka.TLS.PrivateKey = ""
Kafka.TLS.Certificate = ""
Kafka.TLS.RootCAs = []
Kafka.TLS.ClientAuthRequired = false
Kafka.TLS.ClientRootCAs = []
Kafka.SASLPlain.Enabled = false
Kafka.SASLPlain.User = ""
Kafka.SASLPlain.Password = ""
Kafka.Topic.ReplicationFactor = 1
Debug.BroadcastTraceDir = ""
Debug.DeliverTraceDir = ""
Consensus = map[SnapDir:/var/hyperledger/production/orderer/etcdraft/snapshot WALDir:/var/hyperledger/production/orderer/etcdraft/wal]
Operations.ListenAddress = "127.0.0.1:8443"
Operations.TLS.Enabled = false
Operations.TLS.PrivateKey = ""
Operations.TLS.Certificate = ""
Operations.TLS.RootCAs = []
Operations.TLS.ClientAuthRequired = false
Operations.TLS.ClientRootCAs = []
Metrics.Provider = "disabled"
Metrics.Statsd.Network = "udp"
Metrics.Statsd.Address = "127.0.0.1:8125"
Metrics.Statsd.WriteInterval = 30s
Metrics.Statsd.Prefix = ""
2020-05-27 09:13:16.400 UTC [msp] loadCertificateAt -> WARN 004 Failed loading ClientOU certificate at [/var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem]: [could not read file /var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem: open /var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem: no such file or directory]
2020-05-27 09:13:16.400 UTC [msp] loadCertificateAt -> WARN 005 Failed loading PeerOU certificate at [/var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem]: [could not read file /var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem: open /var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem: no such file or directory]
2020-05-27 09:13:16.400 UTC [msp] loadCertificateAt -> WARN 006 Failed loading AdminOU certificate at [/var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem]: [could not read file /var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem: open /var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem: no such file or directory]
2020-05-27 09:13:16.400 UTC [msp] loadCertificateAt -> WARN 007 Failed loading OrdererOU certificate at [/var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem]: [could not read file /var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem: open /var/hyperledger/orderer/msp/cacerts\ca.example.com-cert.pem: no such file or directory]
2020-05-27 09:13:16.434 UTC [orderer.common.server] initializeServerConfig -> INFO 008 Starting orderer with TLS enabled
2020-05-27 09:13:16.441 UTC [fsblkstorage] NewProvider -> INFO 009 Creating new file ledger directory at /var/hyperledger/production/orderer/chains
2020-05-27 09:13:16.464 UTC [orderer.common.server] extractSysChanLastConfig -> INFO 00a Bootstrapping because no existing channels
2020-05-27 09:13:16.483 UTC [orderer.common.server] Main -> INFO 00b Setting up cluster for orderer type etcdraft
2020-05-27 09:13:16.490 UTC [orderer.common.server] reuseListener -> INFO 00c Cluster listener is not configured, defaulting to use the general listener on port 7050
2020-05-27 09:13:16.490 UTC [fsblkstorage] newBlockfileMgr -> INFO 00d Getting block information from block storage
2020-05-27 09:13:16.529 UTC [orderer.consensus.etcdraft] HandleChain -> INFO 00e EvictionSuspicion not set, defaulting to 10m0s
2020-05-27 09:13:16.530 UTC [orderer.consensus.etcdraft] createOrReadWAL -> INFO 00f No WAL data found, creating new WAL at path '/var/hyperledger/production/orderer/etcdraft/wal/system-channel' channel=system-channel node=1
2020-05-27 09:13:16.536 UTC [orderer.commmon.multichannel] Initialize -> INFO 010 Starting system channel 'system-channel' with genesis block hash 22c93e29c38e9681f960d390fda12c72869fc9ebfebf0a6d1c15f60198b13119 and orderer type etcdraft
2020-05-27 09:13:16.537 UTC [orderer.consensus.etcdraft] Start -> INFO 011 Starting Raft node channel=system-channel node=1
2020-05-27 09:13:16.537 UTC [orderer.common.cluster] Configure -> INFO 012 Entering, channel: system-channel, nodes: []
2020-05-27 09:13:16.537 UTC [orderer.common.cluster] Configure -> INFO 013 Exiting
2020-05-27 09:13:16.537 UTC [orderer.consensus.etcdraft] start -> INFO 014 Starting raft node as part of a new channel channel=system-channel node=1
2020-05-27 09:13:16.537 UTC [orderer.consensus.etcdraft] becomeFollower -> INFO 015 1 became follower at term 0 channel=system-channel node=1
2020-05-27 09:13:16.538 UTC [orderer.consensus.etcdraft] newRaft -> INFO 016 newRaft 1 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0] channel=system-channel node=1
2020-05-27 09:13:16.538 UTC [orderer.consensus.etcdraft] becomeFollower -> INFO 017 1 became follower at term 1 channel=system-channel node=1
2020-05-27 09:13:16.538 UTC [orderer.common.server] Main -> INFO 018 Starting orderer:
Version: 2.1.0
Commit SHA: 1bdf975
Go version: go1.14.1
OS/Arch: linux/amd64
2020-05-27 09:13:16.538 UTC [orderer.common.server] Main -> INFO 019 Beginning to serve requests
2020-05-27 09:13:16.538 UTC [orderer.consensus.etcdraft] run -> INFO 01a This node is picked to start campaign channel=system-channel node=1
2020-05-27 09:13:16.539 UTC [orderer.consensus.etcdraft] apply -> INFO 01b Applied config change to add node 1, current nodes in channel: [1] channel=system-channel node=1
2020-05-27 09:13:17.539 UTC [orderer.consensus.etcdraft] Step -> INFO 01c 1 is starting a new election at term 1 channel=system-channel node=1
2020-05-27 09:13:17.540 UTC [orderer.consensus.etcdraft] becomePreCandidate -> INFO 01d 1 became pre-candidate at term 1 channel=system-channel node=1
2020-05-27 09:13:17.540 UTC [orderer.consensus.etcdraft] poll -> INFO 01e 1 received MsgPreVoteResp from 1 at term 1 channel=system-channel node=1
2020-05-27 09:13:17.540 UTC [orderer.consensus.etcdraft] becomeCandidate -> INFO 01f 1 became candidate at term 2 channel=system-channel node=1
2020-05-27 09:13:17.541 UTC [orderer.consensus.etcdraft] poll -> INFO 020 1 received MsgVoteResp from 1 at term 2 channel=system-channel node=1
2020-05-27 09:13:17.541 UTC [orderer.consensus.etcdraft] becomeLeader -> INFO 021 1 became leader at term 2 channel=system-channel node=1
2020-05-27 09:13:17.541 UTC [orderer.consensus.etcdraft] run -> INFO 022 raft.node: 1 elected leader 1 at term 2 channel=system-channel node=1
2020-05-27 09:13:17.542 UTC [orderer.consensus.etcdraft] run -> INFO 023 Leader 1 is present, quit campaign channel=system-channel node=1
2020-05-27 09:13:17.543 UTC [orderer.consensus.etcdraft] run -> INFO 024 Raft leader changed: 0 -> 1 channel=system-channel node=1
2020-05-27 09:13:17.543 UTC [orderer.consensus.etcdraft] run -> INFO 025 Start accepting requests as Raft leader at block [0] channel=system-channel node=1
Peer 1 :
2020-05-27 09:13:16.435 UTC [msp] loadCertificateAt -> WARN 001 Failed loading ClientOU certificate at [/etc/hyperledger/fabric/msp/cacerts\ca.org1.example.com-cert.pem]: [could not read file /etc/hyperledger/fabric/msp/cacerts\ca.org1.example.com-cert.pem: open /etc/hyperledger/fabric/msp/cacerts\ca.org1.example.com-cert.pem: no such file or directory]
2020-05-27 09:13:16.435 UTC [msp] loadCertificateAt -> WARN 002 Failed loading PeerOU certificate at [/etc/hyperledger/fabric/msp/cacerts\ca.org1.example.com-cert.pem]: [could not read file /etc/hyperledger/fabric/msp/cacerts\ca.org1.example.com-cert.pem: open /etc/hyperledger/fabric/msp/cacerts\ca.org1.example.com-cert.pem: no such file or directory]
2020-05-27 09:13:16.435 UTC [msp] loadCertificateAt -> WARN 003 Failed loading AdminOU certificate at [/etc/hyperledger/fabric/msp/cacerts\ca.org1.example.com-cert.pem]: [could not read file /etc/hyperledger/fabric/msp/cacerts\ca.org1.example.com-cert.pem: open /etc/hyperledger/fabric/msp/cacerts\ca.org1.example.com-cert.pem: no such file or directory]
2020-05-27 09:13:16.436 UTC [msp] loadCertificateAt -> WARN 004 Failed loading OrdererOU certificate at [/etc/hyperledger/fabric/msp/cacerts\ca.org1.example.com-cert.pem]: [could not read file /etc/hyperledger/fabric/msp/cacerts\ca.org1.example.com-cert.pem: open /etc/hyperledger/fabric/msp/cacerts\ca.org1.example.com-cert.pem: no such file or directory]
2020-05-27 09:13:16.441 UTC [nodeCmd] serve -> INFO 005 Starting peer:
Version: 2.1.0
Commit SHA: 1bdf975
Go version: go1.14.1
OS/Arch: linux/amd64
Chaincode:
Base Docker Label: org.hyperledger.fabric
Docker Namespace: hyperledger
2020-05-27 09:13:16.442 UTC [peer] getLocalAddress -> INFO 006 Auto-detected peer address: 172.18.0.3:7051
2020-05-27 09:13:16.442 UTC [peer] getLocalAddress -> INFO 007 Returning peer0.org1.example.com:7051
2020-05-27 09:13:16.469 UTC [nodeCmd] initGrpcSemaphores -> INFO 008 concurrency limit for endorser service is 2500
2020-05-27 09:13:16.470 UTC [nodeCmd] initGrpcSemaphores -> INFO 009 concurrency limit for deliver service is 2500
2020-05-27 09:13:16.470 UTC [nodeCmd] serve -> INFO 00a Starting peer with TLS enabled
2020-05-27 09:13:16.500 UTC [ledgermgmt] NewLedgerMgr -> INFO 00b Initializing LedgerMgr
2020-05-27 09:13:16.513 UTC [leveldbhelper] openDBAndCheckFormat -> INFO 00c DB is empty Setting db format as 2.0
2020-05-27 09:13:16.514 UTC [fsblkstorage] NewProvider -> INFO 00d Creating new file ledger directory at /var/hyperledger/production/ledgersData/chains/chains
2020-05-27 09:13:16.521 UTC [leveldbhelper] openDBAndCheckFormat -> INFO 00e DB is empty Setting db format as 2.0
2020-05-27 09:13:16.535 UTC [leveldbhelper] openDBAndCheckFormat -> INFO 00f DB is empty Setting db format as 2.0
2020-05-27 09:13:16.536 UTC [ledgermgmt] NewLedgerMgr -> INFO 010 Initialized LedgerMgr
2020-05-27 09:13:16.547 UTC [gossip.service] New -> INFO 011 Initialize gossip with endpoint peer0.org1.example.com:7051
2020-05-27 09:13:16.549 UTC [gossip.gossip] New -> INFO 012 Creating gossip service with self membership of Endpoint: peer0.org1.example.com:7051, InternalEndpoint: peer0.org1.example.com:7051, PKI-ID: 58df3c0a908cbbd073a6b4138ef676c652aaab118fb99179d7304206f63a0207, Metadata:
2020-05-27 09:13:16.550 UTC [lifecycle] InitializeLocalChaincodes -> INFO 013 Initialized lifecycle cache with 0 already installed chaincodes
2020-05-27 09:13:16.550 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 014 Entering computeChaincodeEndpoint with peerHostname: peer0.org1.example.com
2020-05-27 09:13:16.550 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 015 Exit with ccEndpoint: peer0.org1.example.com:7052
2020-05-27 09:13:16.550 UTC [gossip.gossip] start -> INFO 016 Gossip instance peer0.org1.example.com:7051 started
2020-05-27 09:13:16.560 UTC [sccapi] DeploySysCC -> INFO 017 deploying system chaincode 'lscc'
2020-05-27 09:13:16.560 UTC [sccapi] DeploySysCC -> INFO 018 deploying system chaincode 'cscc'
2020-05-27 09:13:16.560 UTC [sccapi] DeploySysCC -> INFO 019 deploying system chaincode 'qscc'
2020-05-27 09:13:16.560 UTC [sccapi] DeploySysCC -> INFO 01a deploying system chaincode '_lifecycle'
2020-05-27 09:13:16.560 UTC [nodeCmd] serve -> INFO 01b Deployed system chaincodes
2020-05-27 09:13:16.560 UTC [discovery] NewService -> INFO 01c Created with config TLS: true, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000
2020-05-27 09:13:16.560 UTC [nodeCmd] registerDiscoveryService -> INFO 01d Discovery service activated
2020-05-27 09:13:16.560 UTC [nodeCmd] serve -> INFO 01e Starting peer with ID=[peer0.org1.example.com], network ID=[dev], address=[peer0.org1.example.com:7051]
2020-05-27 09:13:16.560 UTC [nodeCmd] serve -> INFO 01f Started peer with ID=[peer0.org1.example.com], network ID=[dev], address=[peer0.org1.example.com:7051]
2020-05-27 09:13:16.560 UTC [kvledger] LoadPreResetHeight -> INFO 020 Loading prereset height from path [/var/hyperledger/production/ledgersData/chains]
2020-05-27 09:13:16.561 UTC [fsblkstorage] preResetHtFiles -> INFO 021 No active channels passed
2020-05-27 09:13:16.561 UTC [nodeCmd] func6 -> INFO 022 Starting profiling server with listenAddress = 0.0.0.0:6060
Peer 2 :
2020-05-27 09:13:16.409 UTC [msp] loadCertificateAt -> WARN 001 Failed loading ClientOU certificate at [/etc/hyperledger/fabric/msp/cacerts\ca.org2.example.com-cert.pem]: [could not read file /etc/hyperledger/fabric/msp/cacerts\ca.org2.example.com-cert.pem: open /etc/hyperledger/fabric/msp/cacerts\ca.org2.example.com-cert.pem: no such file or directory]
2020-05-27 09:13:16.410 UTC [msp] loadCertificateAt -> WARN 002 Failed loading PeerOU certificate at [/etc/hyperledger/fabric/msp/cacerts\ca.org2.example.com-cert.pem]: [could not read file /etc/hyperledger/fabric/msp/cacerts\ca.org2.example.com-cert.pem: open /etc/hyperledger/fabric/msp/cacerts\ca.org2.example.com-cert.pem: no such file or directory]
2020-05-27 09:13:16.410 UTC [msp] loadCertificateAt -> WARN 003 Failed loading AdminOU certificate at [/etc/hyperledger/fabric/msp/cacerts\ca.org2.example.com-cert.pem]: [could not read file /etc/hyperledger/fabric/msp/cacerts\ca.org2.example.com-cert.pem: open /etc/hyperledger/fabric/msp/cacerts\ca.org2.example.com-cert.pem: no such file or directory]
2020-05-27 09:13:16.410 UTC [msp] loadCertificateAt -> WARN 004 Failed loading OrdererOU certificate at [/etc/hyperledger/fabric/msp/cacerts\ca.org2.example.com-cert.pem]: [could not read file /etc/hyperledger/fabric/msp/cacerts\ca.org2.example.com-cert.pem: open /etc/hyperledger/fabric/msp/cacerts\ca.org2.example.com-cert.pem: no such file or directory]
2020-05-27 09:13:16.420 UTC [nodeCmd] serve -> INFO 005 Starting peer:
Version: 2.1.0
Commit SHA: 1bdf975
Go version: go1.14.1
OS/Arch: linux/amd64
Chaincode:
Base Docker Label: org.hyperledger.fabric
Docker Namespace: hyperledger
2020-05-27 09:13:16.421 UTC [peer] getLocalAddress -> INFO 006 Auto-detected peer address: 172.18.0.2:9051
2020-05-27 09:13:16.421 UTC [peer] getLocalAddress -> INFO 007 Returning peer0.org2.example.com:9051
2020-05-27 09:13:16.433 UTC [nodeCmd] initGrpcSemaphores -> INFO 008 concurrency limit for endorser service is 2500
2020-05-27 09:13:16.434 UTC [nodeCmd] initGrpcSemaphores -> INFO 009 concurrency limit for deliver service is 2500
2020-05-27 09:13:16.434 UTC [nodeCmd] serve -> INFO 00a Starting peer with TLS enabled
2020-05-27 09:13:16.472 UTC [ledgermgmt] NewLedgerMgr -> INFO 00b Initializing LedgerMgr
2020-05-27 09:13:16.492 UTC [leveldbhelper] openDBAndCheckFormat -> INFO 00c DB is empty Setting db format as 2.0
2020-05-27 09:13:16.493 UTC [fsblkstorage] NewProvider -> INFO 00d Creating new file ledger directory at /var/hyperledger/production/ledgersData/chains/chains
2020-05-27 09:13:16.501 UTC [leveldbhelper] openDBAndCheckFormat -> INFO 00e DB is empty Setting db format as 2.0
2020-05-27 09:13:16.528 UTC [leveldbhelper] openDBAndCheckFormat -> INFO 00f DB is empty Setting db format as 2.0
2020-05-27 09:13:16.528 UTC [ledgermgmt] NewLedgerMgr -> INFO 010 Initialized LedgerMgr
2020-05-27 09:13:16.542 UTC [gossip.service] New -> INFO 011 Initialize gossip with endpoint peer0.org2.example.com:9051
2020-05-27 09:13:16.547 UTC [gossip.gossip] New -> INFO 012 Creating gossip service with self membership of Endpoint: peer0.org2.example.com:9051, InternalEndpoint: peer0.org2.example.com:9051, PKI-ID: c7429efa7a899a8b3644235bc56251ffbfb45fe3f55fc0a4d199fd03b1521df4, Metadata:
2020-05-27 09:13:16.547 UTC [lifecycle] InitializeLocalChaincodes -> INFO 013 Initialized lifecycle cache with 0 already installed chaincodes
2020-05-27 09:13:16.548 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 014 Entering computeChaincodeEndpoint with peerHostname: peer0.org2.example.com
2020-05-27 09:13:16.548 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 015 Exit with ccEndpoint: peer0.org2.example.com:9052
2020-05-27 09:13:16.549 UTC [gossip.gossip] start -> INFO 016 Gossip instance peer0.org2.example.com:9051 started
2020-05-27 09:13:16.555 UTC [sccapi] DeploySysCC -> INFO 017 deploying system chaincode 'lscc'
2020-05-27 09:13:16.558 UTC [sccapi] DeploySysCC -> INFO 018 deploying system chaincode 'cscc'
2020-05-27 09:13:16.558 UTC [sccapi] DeploySysCC -> INFO 019 deploying system chaincode 'qscc'
2020-05-27 09:13:16.559 UTC [sccapi] DeploySysCC -> INFO 01a deploying system chaincode '_lifecycle'
2020-05-27 09:13:16.559 UTC [nodeCmd] serve -> INFO 01b Deployed system chaincodes
2020-05-27 09:13:16.559 UTC [discovery] NewService -> INFO 01c Created with config TLS: true, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000
2020-05-27 09:13:16.559 UTC [nodeCmd] registerDiscoveryService -> INFO 01d Discovery service activated
2020-05-27 09:13:16.559 UTC [nodeCmd] serve -> INFO 01e Starting peer with ID=[peer0.org2.example.com], network ID=[dev], address=[peer0.org2.example.com:9051]
2020-05-27 09:13:16.559 UTC [nodeCmd] serve -> INFO 01f Started peer with ID=[peer0.org2.example.com], network ID=[dev], address=[peer0.org2.example.com:9051]
2020-05-27 09:13:16.559 UTC [kvledger] LoadPreResetHeight -> INFO 020 Loading prereset height from path [/var/hyperledger/production/ledgersData/chains]
2020-05-27 09:13:16.559 UTC [fsblkstorage] preResetHtFiles -> INFO 021 No active channels passed
2020-05-27 09:13:16.559 UTC [nodeCmd] func6 -> INFO 022 Starting profiling server with listenAddress = 0.0.0.0:6060
There are also several warnings but don't really know their meaning.
I've tried to relaunch docker as admin , also tried to relaunch the network.

./byfn.sh up -l node failed

Hi~ I am playing with the first-network sample. But when I try to run the command ./byfn.sh up -l node, I always get the error returned from logs as below.
Instantiating chaincode on peer0.org2...
+ peer chaincode instantiate -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n mycc -l node -v 1.0 -c '{"Args":["init","a","100","b","200"]}' -P 'AND ('\''Org1MSP.peer'\'','\''Org2MSP.peer'\'')'
+ res=1
+ set +x
2020-03-24 08:23:43.975 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2020-03-24 08:23:43.975 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg timeout expired while starting chaincode mycc:1.0 for transaction
!!!!!!!!!!!!!!! Chaincode instantiation on peer0.org2 on channel 'mychannel' failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
ERROR !!!! Test failed
The logs about peer0.org2.example.com docker container:
2020-03-24 08:23:19.735 UTC [nodeCmd] serve -> INFO 001 Starting peer:
Version: 1.4.4
Commit SHA: 7917a40
Go version: go1.12.12
OS/Arch: linux/amd64
Chaincode:
Base Image Version: 0.4.18
Base Docker Namespace: hyperledger
Base Docker Label: org.hyperledger.fabric
Docker Namespace: hyperledger
2020-03-24 08:23:19.740 UTC [ledgermgmt] initialize -> INFO 002 Initializing ledger mgmt
2020-03-24 08:23:19.740 UTC [kvledger] NewProvider -> INFO 003 Initializing ledger provider
2020-03-24 08:23:19.891 UTC [kvledger] NewProvider -> INFO 004 ledger provider Initialized
2020-03-24 08:23:20.130 UTC [ledgermgmt] initialize -> INFO 005 ledger mgmt initialized
2020-03-24 08:23:20.130 UTC [peer] func1 -> INFO 006 Auto-detected peer address: 172.19.0.6:9051
2020-03-24 08:23:20.130 UTC [peer] func1 -> INFO 007 Returning peer0.org2.example.com:9051
2020-03-24 08:23:20.131 UTC [peer] func1 -> INFO 008 Auto-detected peer address: 172.19.0.6:9051
2020-03-24 08:23:20.131 UTC [peer] func1 -> INFO 009 Returning peer0.org2.example.com:9051
2020-03-24 08:23:20.135 UTC [nodeCmd] serve -> INFO 00a Starting peer with TLS enabled
2020-03-24 08:23:20.141 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00b Entering computeChaincodeEndpoint with peerHostname: peer0.org2.example.com
2020-03-24 08:23:20.141 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00c Exit with ccEndpoint: peer0.org2.example.com:9052
2020-03-24 08:23:20.145 UTC [sccapi] registerSysCC -> INFO 00d system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
2020-03-24 08:23:20.146 UTC [sccapi] registerSysCC -> INFO 00e system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
2020-03-24 08:23:20.146 UTC [sccapi] registerSysCC -> INFO 00f system chaincode qscc(github.com/hyperledger/fabric/core/scc/qscc) registered
2020-03-24 08:23:20.146 UTC [sccapi] registerSysCC -> INFO 010 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle,true) disabled
2020-03-24 08:23:20.153 UTC [gossip.service] func1 -> INFO 011 Initialize gossip with endpoint peer0.org2.example.com:9051 and bootstrap set [peer1.org2.example.com:10051]
2020-03-24 08:23:20.163 UTC [gossip.gossip] NewGossipService -> INFO 012 Creating gossip service with self membership of Endpoint: peer0.org2.example.com:9051, InternalEndpoint: peer0.org2.example.com:9051, PKI-ID: c4e87a76098ec5decb4b47d1904021bdcea0fbd290f68af4ade352b0b22b0151, Metadata:
2020-03-24 08:23:20.163 UTC [gossip.gossip] start -> INFO 013 Gossip instance peer0.org2.example.com:9051 started
2020-03-24 08:23:20.164 UTC [sccapi] deploySysCC -> INFO 014 system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
2020-03-24 08:23:20.165 UTC [cscc] Init -> INFO 015 Init CSCC
2020-03-24 08:23:20.165 UTC [sccapi] deploySysCC -> INFO 016 system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed
2020-03-24 08:23:20.165 UTC [qscc] Init -> INFO 017 Init QSCC
2020-03-24 08:23:20.165 UTC [sccapi] deploySysCC -> INFO 018 system chaincode qscc/(github.com/hyperledger/fabric/core/scc/qscc) deployed
2020-03-24 08:23:20.165 UTC [sccapi] deploySysCC -> INFO 019 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled
2020-03-24 08:23:20.165 UTC [nodeCmd] serve -> INFO 01a Deployed system chaincodes
2020-03-24 08:23:20.168 UTC [discovery] NewService -> INFO 01b Created with config TLS: true, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000
2020-03-24 08:23:20.168 UTC [nodeCmd] registerDiscoveryService -> INFO 01c Discovery service activated
2020-03-24 08:23:20.168 UTC [nodeCmd] serve -> INFO 01d Starting peer with ID=[name:"peer0.org2.example.com" ], network ID=[dev], address=[peer0.org2.example.com:9051]
2020-03-24 08:23:20.169 UTC [nodeCmd] serve -> INFO 01e Started peer with ID=[name:"peer0.org2.example.com" ], network ID=[dev], address=[peer0.org2.example.com:9051]
2020-03-24 08:23:20.169 UTC [nodeCmd] func7 -> INFO 01f Starting profiling server with listenAddress = 0.0.0.0:6060
2020-03-24 08:23:20.169 UTC [kvledger] LoadPreResetHeight -> INFO 020 Loading prereset height from path [/var/hyperledger/production/ledgersData/chains]
2020-03-24 08:23:20.169 UTC [fsblkstorage] LoadPreResetHeight -> INFO 021 Loading Pre-reset heights
2020-03-24 08:23:20.170 UTC [fsblkstorage] preRestHtFiles -> INFO 022 Dir [/var/hyperledger/production/ledgersData/chains/chains] missing... exiting
2020-03-24 08:23:20.170 UTC [fsblkstorage] LoadPreResetHeight -> INFO 023 Pre-reset heights loaded
2020-03-24 08:23:21.673 UTC [comm.grpc.server] 1 -> INFO 024 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:23.673Z grpc.peer_address=172.19.0.2:47980 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=101.985µs
2020-03-24 08:23:21.682 UTC [comm.grpc.server] 1 -> INFO 025 streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2020-03-24T08:23:31.68Z grpc.peer_address=172.19.0.2:47980 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=2.417798ms
2020-03-24 08:23:21.714 UTC [comm.grpc.server] 1 -> INFO 026 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:23.714Z grpc.peer_address=172.19.0.2:47982 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=85.978µs
2020-03-24 08:23:22.955 UTC [comm.grpc.server] 1 -> INFO 027 streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.peer_address=172.19.0.2:47982 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" error=EOF grpc.code=Unknown grpc.call_duration=1.240576335s
2020-03-24 08:23:30.812 UTC [endorser] callChaincode -> INFO 028 [][28c2fa0d] Entry chaincode: name:"cscc"
2020-03-24 08:23:30.814 UTC [ledgermgmt] CreateLedger -> INFO 029 Creating ledger [mychannel] with genesis block
2020-03-24 08:23:30.829 UTC [fsblkstorage] newBlockfileMgr -> INFO 02a Getting block information from block storage
2020-03-24 08:23:30.849 UTC [kvledger] CommitWithPvtData -> INFO 02b [mychannel] Committed block [0] with 1 transaction(s) in 13ms (state_validation=1ms block_and_pvtdata_commit=7ms state_commit=1ms) commitHash=[]
2020-03-24 08:23:30.851 UTC [ledgermgmt] CreateLedger -> INFO 02c Created ledger [mychannel] with genesis block
2020-03-24 08:23:30.855 UTC [gossip.gossip] JoinChan -> INFO 02d Joining gossip network of channel mychannel with 2 organizations
2020-03-24 08:23:30.855 UTC [gossip.gossip] learnAnchorPeers -> INFO 02e No configured anchor peers of Org2MSP for channel mychannel to learn about
2020-03-24 08:23:30.856 UTC [gossip.gossip] learnAnchorPeers -> INFO 02f No configured anchor peers of Org1MSP for channel mychannel to learn about
2020-03-24 08:23:30.880 UTC [gossip.state] NewGossipStateProvider -> INFO 030 Updating metadata information for channel mychannel, current ledger sequence is at = 0, next expected block is = 1
2020-03-24 08:23:30.883 UTC [sccapi] deploySysCC -> INFO 031 system chaincode lscc/mychannel(github.com/hyperledger/fabric/core/scc/lscc) deployed
2020-03-24 08:23:30.883 UTC [cscc] Init -> INFO 032 Init CSCC
2020-03-24 08:23:30.884 UTC [sccapi] deploySysCC -> INFO 033 system chaincode cscc/mychannel(github.com/hyperledger/fabric/core/scc/cscc) deployed
2020-03-24 08:23:30.884 UTC [qscc] Init -> INFO 034 Init QSCC
2020-03-24 08:23:30.885 UTC [sccapi] deploySysCC -> INFO 035 system chaincode qscc/mychannel(github.com/hyperledger/fabric/core/scc/qscc) deployed
2020-03-24 08:23:30.885 UTC [sccapi] deploySysCC -> INFO 036 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled
2020-03-24 08:23:30.885 UTC [endorser] callChaincode -> INFO 037 [][28c2fa0d] Exit chaincode: name:"cscc" (73ms)
2020-03-24 08:23:30.886 UTC [comm.grpc.server] 1 -> INFO 038 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.19.0.7:53176 grpc.code=OK grpc.call_duration=84.780123ms
2020-03-24 08:23:35.856 UTC [gossip.channel] reportMembershipChanges -> INFO 039 Membership view has changed. peers went online: [[peer1.org2.example.com:10051]] , current view: [[peer1.org2.example.com:10051]]
2020-03-24 08:23:40.217 UTC [gossip.privdata] StoreBlock -> INFO 03a [mychannel] Received block [1] from buffer
2020-03-24 08:23:40.226 UTC [gossip.gossip] JoinChan -> INFO 03b Joining gossip network of channel mychannel with 2 organizations
2020-03-24 08:23:40.226 UTC [gossip.gossip] learnAnchorPeers -> INFO 03c Learning about the configured anchor peers of Org1MSP for channel mychannel : [{peer0.org1.example.com 7051}]
2020-03-24 08:23:40.226 UTC [gossip.gossip] learnAnchorPeers -> INFO 03d No configured anchor peers of Org2MSP for channel mychannel to learn about
2020-03-24 08:23:40.237 UTC [gossip.service] updateEndpoints -> WARN 03e Failed to update ordering service endpoints, due to Channel with mychannel id was not found
2020-03-24 08:23:40.245 UTC [committer.txvalidator] Validate -> INFO 03f [mychannel] Validated block [1] in 27ms
2020-03-24 08:23:40.285 UTC [kvledger] CommitWithPvtData -> INFO 040 [mychannel] Committed block [1] with 1 transaction(s) in 38ms (state_validation=1ms block_and_pvtdata_commit=29ms state_commit=5ms) commitHash=[47dc540c94ceb704a23875c11273e16bb0b8a87aed84de911f2133568115f254]
2020-03-24 08:23:40.563 UTC [gossip.privdata] StoreBlock -> INFO 041 [mychannel] Received block [2] from buffer
2020-03-24 08:23:40.571 UTC [gossip.gossip] JoinChan -> INFO 042 Joining gossip network of channel mychannel with 2 organizations
2020-03-24 08:23:40.571 UTC [gossip.gossip] learnAnchorPeers -> INFO 043 Learning about the configured anchor peers of Org1MSP for channel mychannel : [{peer0.org1.example.com 7051}]
2020-03-24 08:23:40.571 UTC [gossip.gossip] learnAnchorPeers -> INFO 044 Learning about the configured anchor peers of Org2MSP for channel mychannel : [{peer0.org2.example.com 9051}]
2020-03-24 08:23:40.571 UTC [gossip.gossip] learnAnchorPeers -> INFO 045 Anchor peer with same endpoint, skipping connecting to myself
2020-03-24 08:23:40.571 UTC [gossip.service] updateEndpoints -> WARN 046 Failed to update ordering service endpoints, due to Channel with mychannel id was not found
2020-03-24 08:23:40.574 UTC [committer.txvalidator] Validate -> INFO 047 [mychannel] Validated block [2] in 11ms
2020-03-24 08:23:40.600 UTC [kvledger] CommitWithPvtData -> INFO 048 [mychannel] Committed block [2] with 1 transaction(s) in 25ms (state_validation=0ms block_and_pvtdata_commit=18ms state_commit=2ms) commitHash=[5f88b61407b149a48413433f4670c46531e5c4a8febdc339a9536ff8716a559e]
2020-03-24 08:23:40.608 UTC [comm.grpc.server] 1 -> INFO 049 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.607Z grpc.peer_address=172.19.0.5:53128 grpc.peer_subject="CN=peer1.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=106.3µs
2020-03-24 08:23:40.622 UTC [comm.grpc.server] 1 -> INFO 04a unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.621Z grpc.peer_address=172.19.0.3:45792 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=94.852µs
2020-03-24 08:23:40.628 UTC [comm.grpc.server] 1 -> INFO 04b unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.628Z grpc.peer_address=172.19.0.2:48046 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=61.276µs
2020-03-24 08:23:40.631 UTC [comm.grpc.server] 1 -> INFO 04c streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2020-03-24T08:23:50.609Z grpc.peer_address=172.19.0.5:53128 grpc.peer_subject="CN=peer1.org1.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=21.432415ms
2020-03-24 08:23:40.632 UTC [comm.grpc.server] 1 -> INFO 04d streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2020-03-24T08:23:50.624Z grpc.peer_address=172.19.0.3:45792 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=8.246259ms
2020-03-24 08:23:40.635 UTC [comm.grpc.server] 1 -> INFO 04e streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2020-03-24T08:23:50.629Z grpc.peer_address=172.19.0.2:48046 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=5.756194ms
2020-03-24 08:23:40.641 UTC [comm.grpc.server] 1 -> INFO 04f unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.641Z grpc.peer_address=172.19.0.3:45798 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=69.002µs
2020-03-24 08:23:40.647 UTC [comm.grpc.server] 1 -> INFO 050 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.647Z grpc.peer_address=172.19.0.2:48050 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=65.359µs
2020-03-24 08:23:40.658 UTC [comm.grpc.server] 1 -> INFO 051 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.658Z grpc.peer_address=172.19.0.5:53144 grpc.peer_subject="CN=peer1.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=115.148µs
2020-03-24 08:23:43.862 UTC [endorser] callChaincode -> INFO 052 [][a8e37e08] Entry chaincode: name:"lscc"
2020-03-24 08:23:43.863 UTC [lscc] executeInstall -> INFO 053 Installed Chaincode [mycc] Version [1.0] to peer
2020-03-24 08:23:43.863 UTC [endorser] callChaincode -> INFO 054 [][a8e37e08] Exit chaincode: name:"lscc" (1ms)
2020-03-24 08:23:43.863 UTC [comm.grpc.server] 1 -> INFO 055 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.19.0.7:53232 grpc.code=OK grpc.call_duration=1.77226ms
2020-03-24 08:23:43.977 UTC [endorser] callChaincode -> INFO 056 [mychannel][1440b726] Entry chaincode: name:"lscc"
2020-03-24 08:23:45.856 UTC [gossip.channel] reportMembershipChanges -> INFO 057 Membership view has changed. peers went online: [[peer0.org1.example.com:7051 ] [peer1.org1.example.com:8051 ]] , current view: [[peer1.org2.example.com:10051] [peer0.org1.example.com:7051 ] [peer1.org1.example.com:8051 ]]
2020-03-24 08:36:47.118 UTC [endorser] callChaincode -> INFO 058 [mychannel][1440b726] Exit chaincode: name:"lscc" (783125ms)
2020-03-24 08:36:47.129 UTC [endorser] SimulateProposal -> ERRO 059 [mychannel][1440b726] failed to invoke chaincode name:"lscc" , error: timeout expired while starting chaincode mycc:1.0 for transaction
github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:75
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).LaunchInit
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:130
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).ExecuteLegacyInit
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:222
github.com/hyperledger/fabric/core/endorser.(*SupportImpl).ExecuteLegacyInit
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/support.go:131
github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:183
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/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:1337
2020-03-24 08:36:47.176 UTC [comm.grpc.server] 1 -> INFO 05a unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.19.0.7:53236 grpc.code=OK grpc.call_duration=13m3.203460855s
The error I've found from the logs above is:
2020-03-24 08:36:47.118 UTC [endorser] callChaincode -> INFO 058 [mychannel][1440b726] Exit chaincode: name:"lscc" (783125ms)
2020-03-24 08:36:47.129 UTC [endorser] SimulateProposal -> ERRO 059 [mychannel][1440b726] failed to invoke chaincode name:"lscc" , error: timeout expired while starting chaincode mycc:1.0 for transaction
github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch
I've searched online many times and get stuck in this error few days. I think is the problem of node or npm and I've also found some useful information from the community of Hyperledger. But I still don't know how to solve this problem. If you have ideas, please give me a hint. Thanks a lot.
https://jira.hyperledger.org/browse/FAB-12318?focusedCommentId=53022&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-53022
https://jira.hyperledger.org/browse/FABCN-256
Here are a few hints:
Chaincode container startup has a default timeout of 300s. If chaincode instantiation takes longer than that (e.g. because you're on a very slow network), you'll get a timeout. You can try to extend that timeout by setting CORE_CHAINCODE_STARTUPTIMEOUT as env variable on your peer.
To see what is happening during chaincode instantiation, perform a docker ps: you'll see some temporary containers running (based on image fabric-ccenv). Check their logs using docker logs.

Hyperledger Fabric channel creation failure

I'm running the following steps:
cryptogen generate --config./crypto-config.yaml
export FABRIC_CFG_PATH=$PWD
mkdir channel-artifacts
configtxgen -profile TwoOrgsOrdererGenesis -channelID byfn-sys-channel -outputBlock ./channel-artifacts/genesis.block
configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID "mychannel"
configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID "mychannel" -asOrg Org1MSP
configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID "mychannel" -asOrg Org2MSP
docker-compose -f docker-compose-cli.yaml up -d
docker exec -it cli bash
ORDERER_CA=/work/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
PEER0_ORG1_CA=/work/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
PEER0_ORG2_CA=/work/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_LOCALMSPID="OrdererMSP"
CORE_PEER_TLS_ROOTCERT_FILE=/work/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
CORE_PEER_MSPCONFIGPATH=/work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp
CHANNEL="mychannel"
CC_SRC_PATH="/chaincode/"
peer channel create -o orderer.example.com:7050 -c $CHANNEL -f /work/channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA
Creating the channel yields:
peer channel create -o orderer.example.com:7050 -c mychannel -f /work/channel-artifacts/channel.tx --tls true --cafile /work/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
2018-12-21 05:58:02.995 UTC [viperutil] getKeysRecursively -> DEBU 001 Found map[string]interface{} value for peer.BCCSP
2018-12-21 05:58:02.996 UTC [viperutil] getKeysRecursively -> DEBU 002 Found map[string]interface{} value for peer.BCCSP.SW
2018-12-21 05:58:02.996 UTC [viperutil] unmarshalJSON -> DEBU 003 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
2018-12-21 05:58:02.997 UTC [viperutil] getKeysRecursively -> DEBU 004 Found real value for peer.BCCSP.SW.Hash setting to string SHA2
2018-12-21 05:58:02.998 UTC [viperutil] unmarshalJSON -> DEBU 005 Unmarshal JSON: value is not a string: 256
2018-12-21 05:58:02.998 UTC [viperutil] getKeysRecursively -> DEBU 006 Found real value for peer.BCCSP.SW.Security setting to int 256
2018-12-21 05:58:02.998 UTC [viperutil] getKeysRecursively -> DEBU 007 Found map[string]interface{} value for peer.BCCSP.SW.FileKeyStore
2018-12-21 05:58:02.998 UTC [viperutil] unmarshalJSON -> DEBU 008 Unmarshal JSON: value cannot be unmarshalled: unexpected end of JSON input
2018-12-21 05:58:02.999 UTC [viperutil] getKeysRecursively -> DEBU 009 Found real value for peer.BCCSP.SW.FileKeyStore.KeyStore setting to string
2018-12-21 05:58:02.999 UTC [viperutil] getKeysRecursively -> DEBU 00a Found map[string]interface{} value for peer.BCCSP.PKCS11
2018-12-21 05:58:03.000 UTC [viperutil] unmarshalJSON -> DEBU 00b Unmarshal JSON: value is not a string: <nil>
2018-12-21 05:58:03.000 UTC [viperutil] getKeysRecursively -> DEBU 00c Found real value for peer.BCCSP.PKCS11.Security setting to <nil> <nil>
2018-12-21 05:58:03.001 UTC [viperutil] getKeysRecursively -> DEBU 00d Found map[string]interface{} value for peer.BCCSP.PKCS11.FileKeyStore
2018-12-21 05:58:03.002 UTC [viperutil] unmarshalJSON -> DEBU 00e Unmarshal JSON: value is not a string: <nil>
2018-12-21 05:58:03.003 UTC [viperutil] getKeysRecursively -> DEBU 00f Found real value for peer.BCCSP.PKCS11.FileKeyStore.KeyStore setting to <nil> <nil>
2018-12-21 05:58:03.003 UTC [viperutil] unmarshalJSON -> DEBU 010 Unmarshal JSON: value is not a string: <nil>
2018-12-21 05:58:03.004 UTC [viperutil] getKeysRecursively -> DEBU 011 Found real value for peer.BCCSP.PKCS11.Library setting to <nil> <nil>
2018-12-21 05:58:03.005 UTC [viperutil] unmarshalJSON -> DEBU 012 Unmarshal JSON: value is not a string: <nil>
2018-12-21 05:58:03.006 UTC [viperutil] getKeysRecursively -> DEBU 013 Found real value for peer.BCCSP.PKCS11.Label setting to <nil> <nil>
2018-12-21 05:58:03.007 UTC [viperutil] unmarshalJSON -> DEBU 014 Unmarshal JSON: value is not a string: <nil>
2018-12-21 05:58:03.007 UTC [viperutil] getKeysRecursively -> DEBU 015 Found real value for peer.BCCSP.PKCS11.Pin setting to <nil> <nil>
2018-12-21 05:58:03.008 UTC [viperutil] unmarshalJSON -> DEBU 016 Unmarshal JSON: value is not a string: <nil>
2018-12-21 05:58:03.009 UTC [viperutil] getKeysRecursively -> DEBU 017 Found real value for peer.BCCSP.PKCS11.Hash setting to <nil> <nil>
2018-12-21 05:58:03.010 UTC [viperutil] unmarshalJSON -> DEBU 018 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
2018-12-21 05:58:03.010 UTC [viperutil] getKeysRecursively -> DEBU 019 Found real value for peer.BCCSP.Default setting to string SW
2018-12-21 05:58:03.011 UTC [viperutil] EnhancedExactUnmarshalKey -> DEBU 01a map[peer.BCCSP:map[SW:map[Hash:SHA2 Security:256 FileKeyStore:map[KeyStore:]] PKCS11:map[Hash:<nil> Security:<nil> FileKeyStore:map[KeyStore:<nil>] Library:<nil> Label:<nil> Pin:<nil>] Default:SW]]
2018-12-21 05:58:03.020 UTC [bccsp_sw] openKeyStore -> DEBU 01b KeyStore opened at [/work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/keystore]...done
2018-12-21 05:58:03.023 UTC [bccsp] initBCCSP -> DEBU 01c Initialize BCCSP [SW]
2018-12-21 05:58:03.024 UTC [msp] getPemMaterialFromDir -> DEBU 01d Reading directory /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/signcerts
2018-12-21 05:58:03.041 UTC [msp] getPemMaterialFromDir -> DEBU 01e Inspecting file /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/signcerts/Admin#example.com-cert.pem
2018-12-21 05:58:03.049 UTC [msp] getPemMaterialFromDir -> DEBU 01f Reading directory /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/cacerts
2018-12-21 05:58:03.058 UTC [msp] getPemMaterialFromDir -> DEBU 020 Inspecting file /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/cacerts/ca.example.com-cert.pem
2018-12-21 05:58:03.062 UTC [msp] getPemMaterialFromDir -> DEBU 021 Reading directory /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/admincerts
2018-12-21 05:58:03.067 UTC [msp] getPemMaterialFromDir -> DEBU 022 Inspecting file /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/admincerts/Admin#example.com-cert.pem
2018-12-21 05:58:03.071 UTC [msp] getPemMaterialFromDir -> DEBU 023 Reading directory /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/intermediatecerts
2018-12-21 05:58:03.075 UTC [msp] getMspConfig -> DEBU 024 Intermediate certs folder not found at [/work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/intermediatecerts]. Skipping. [stat /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/intermediatecerts: no such file or directory]
2018-12-21 05:58:03.075 UTC [msp] getPemMaterialFromDir -> DEBU 025 Reading directory /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/tlscacerts
2018-12-21 05:58:03.082 UTC [msp] getPemMaterialFromDir -> DEBU 026 Inspecting file /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/tlscacerts/tlsca.example.com-cert.pem
2018-12-21 05:58:03.085 UTC [msp] getPemMaterialFromDir -> DEBU 027 Reading directory /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/tlsintermediatecerts
2018-12-21 05:58:03.086 UTC [msp] getMspConfig -> DEBU 028 TLS intermediate certs folder not found at [/work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/tlsintermediatecerts]. Skipping. [stat /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/tlsintermediatecerts: no such file or directory]
2018-12-21 05:58:03.086 UTC [msp] getPemMaterialFromDir -> DEBU 029 Reading directory /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/crls
2018-12-21 05:58:03.088 UTC [msp] getMspConfig -> DEBU 02a crls folder not found at [/work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/crls]. Skipping. [stat /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/crls: no such file or directory]
2018-12-21 05:58:03.089 UTC [msp] getMspConfig -> DEBU 02b MSP configuration file not found at [/work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/config.yaml]: [stat /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/config.yaml: no such file or directory]
2018-12-21 05:58:03.092 UTC [msp] newBccspMsp -> DEBU 02c Creating BCCSP-based MSP instance
2018-12-21 05:58:03.093 UTC [msp] New -> DEBU 02d Creating Cache-MSP instance
2018-12-21 05:58:03.093 UTC [msp] loadLocaMSP -> DEBU 02e Created new local MSP
2018-12-21 05:58:03.095 UTC [msp] Setup -> DEBU 02f Setting up MSP instance OrdererMSP
2018-12-21 05:58:03.096 UTC [msp/identity] newIdentity -> DEBU 030 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICMDCCAdagAwIBAgIRAJMJ50AFi4DVbfmy2tZwr8swCgYIKoZIzj0EAwIwaTEL
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG
cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt
cGxlLmNvbTAeFw0xODEyMjEwNTUxMDBaFw0yODEyMTgwNTUxMDBaMGkxCzAJBgNV
BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp
c2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEXMBUGA1UEAxMOY2EuZXhhbXBsZS5j
b20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQz7AEO7XsDC3ovSn4KoU9bMiu1
oZL6rYNG3IwlEiLIRTdF9YjkNadjxev769Nfe6zPBDQ7mxcjAeW96v3HD1Fqo18w
XTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMBAf8EBTAD
AQH/MCkGA1UdDgQiBCAX+J5Ayk0WYWPq+x/0rjbTs+m/RLvoqoGbt5slt3V8rDAK
BggqhkjOPQQDAgNIADBFAiEAqpwE5/Rkik0BKPgtbsiivijQ4pjwfjY5qOVZJeni
9G0CIAIdM34UbsWMnBXE31XGlMczGMqAmvu3keGDcEFOxgEb
-----END CERTIFICATE-----
2018-12-21 05:58:03.098 UTC [msp/identity] newIdentity -> DEBU 031 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICCjCCAbCgAwIBAgIQNvIOivt9quw48gGIQH5xUzAKBggqhkjOPQQDAjBpMQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w
bGUuY29tMB4XDTE4MTIyMTA1NTEwMFoXDTI4MTIxODA1NTEwMFowVjELMAkGA1UE
BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz
Y28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI
zj0DAQcDQgAEHRUSNwy5tPgTCW8n75BDjAPImpFjGHP2LWHOJMC4m8ffZ7xbjvpo
oEcUTfp4K4K/TeEcmGeYQeM0scPEnOVtW6NNMEswDgYDVR0PAQH/BAQDAgeAMAwG
A1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgF/ieQMpNFmFj6vsf9K4207Ppv0S76KqB
m7ebJbd1fKwwCgYIKoZIzj0EAwIDSAAwRQIhAMo50UA2es1ZPleNNXgXXA0Dun7c
CiUjOH7ZbvLt5SUrAiBlcwDp/lNcF2O8UfxposYdcignY2yfzbW/eXmnYMkj0Q==
-----END CERTIFICATE-----
2018-12-21 05:58:03.127 UTC [msp/identity] newIdentity -> DEBU 032 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICCjCCAbCgAwIBAgIQNvIOivt9quw48gGIQH5xUzAKBggqhkjOPQQDAjBpMQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w
bGUuY29tMB4XDTE4MTIyMTA1NTEwMFoXDTI4MTIxODA1NTEwMFowVjELMAkGA1UE
BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz
Y28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI
zj0DAQcDQgAEHRUSNwy5tPgTCW8n75BDjAPImpFjGHP2LWHOJMC4m8ffZ7xbjvpo
oEcUTfp4K4K/TeEcmGeYQeM0scPEnOVtW6NNMEswDgYDVR0PAQH/BAQDAgeAMAwG
A1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgF/ieQMpNFmFj6vsf9K4207Ppv0S76KqB
m7ebJbd1fKwwCgYIKoZIzj0EAwIDSAAwRQIhAMo50UA2es1ZPleNNXgXXA0Dun7c
CiUjOH7ZbvLt5SUrAiBlcwDp/lNcF2O8UfxposYdcignY2yfzbW/eXmnYMkj0Q==
-----END CERTIFICATE-----
2018-12-21 05:58:03.136 UTC [bccsp_sw] loadPrivateKey -> DEBU 033 Loading private key [f402b6fb650fc38fb9a4ae8b21abe98abbc3bf1786186fbc52a4fcf4e0cadeec] at [/work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/keystore/f402b6fb650fc38fb9a4ae8b21abe98abbc3bf1786186fbc52a4fcf4e0cadeec_sk]...
2018-12-21 05:58:03.143 UTC [msp/identity] newIdentity -> DEBU 034 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICCjCCAbCgAwIBAgIQNvIOivt9quw48gGIQH5xUzAKBggqhkjOPQQDAjBpMQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w
bGUuY29tMB4XDTE4MTIyMTA1NTEwMFoXDTI4MTIxODA1NTEwMFowVjELMAkGA1UE
BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz
Y28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI
zj0DAQcDQgAEHRUSNwy5tPgTCW8n75BDjAPImpFjGHP2LWHOJMC4m8ffZ7xbjvpo
oEcUTfp4K4K/TeEcmGeYQeM0scPEnOVtW6NNMEswDgYDVR0PAQH/BAQDAgeAMAwG
A1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgF/ieQMpNFmFj6vsf9K4207Ppv0S76KqB
m7ebJbd1fKwwCgYIKoZIzj0EAwIDSAAwRQIhAMo50UA2es1ZPleNNXgXXA0Dun7c
CiUjOH7ZbvLt5SUrAiBlcwDp/lNcF2O8UfxposYdcignY2yfzbW/eXmnYMkj0Q==
-----END CERTIFICATE-----
2018-12-21 05:58:03.143 UTC [msp] setupSigningIdentity -> DEBU 035 Signing identity expires at 2028-12-18 05:51:00 +0000 UTC
2018-12-21 05:58:03.143 UTC [msp] Validate -> DEBU 036 MSP OrdererMSP validating identity
2018-12-21 05:58:03.144 UTC [msp] GetDefaultSigningIdentity -> DEBU 037 Obtaining default signing identity
2018-12-21 05:58:03.152 UTC [grpc] DialContext -> DEBU 038 parsed scheme: ""
2018-12-21 05:58:03.155 UTC [grpc] DialContext -> DEBU 039 scheme "" not registered, fallback to default scheme
2018-12-21 05:58:03.156 UTC [grpc] watcher -> DEBU 03a ccResolverWrapper: sending new addresses to cc: [{orderer.example.com:7050 0 <nil>}]
2018-12-21 05:58:03.157 UTC [grpc] switchBalancer -> DEBU 03b ClientConn switching balancer to "pick_first"
2018-12-21 05:58:03.158 UTC [grpc] HandleSubConnStateChange -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc4202a1a30, CONNECTING
2018-12-21 05:58:03.179 UTC [grpc] HandleSubConnStateChange -> DEBU 03d pickfirstBalancer: HandleSubConnStateChange: 0xc4202a1a30, READY
2018-12-21 05:58:03.183 UTC [channelCmd] InitCmdFactory -> INFO 03e Endorser and orderer connections initialized
2018-12-21 05:58:03.192 UTC [msp] GetDefaultSigningIdentity -> DEBU 03f Obtaining default signing identity
2018-12-21 05:58:03.193 UTC [msp] GetDefaultSigningIdentity -> DEBU 040 Obtaining default signing identity
2018-12-21 05:58:03.193 UTC [msp/identity] Sign -> DEBU 041 Sign: plaintext: 0A90060A0A4F7264657265724D535012...53616D706C65436F6E736F727469756D
2018-12-21 05:58:03.194 UTC [msp/identity] Sign -> DEBU 042 Sign: digest: 92BB1016BFDAC4274F151AA23E3A16A90E71F4D7BBEC266CDC566B398D1DC25B
2018-12-21 05:58:03.195 UTC [msp] GetDefaultSigningIdentity -> DEBU 043 Obtaining default signing identity
2018-12-21 05:58:03.195 UTC [msp] GetDefaultSigningIdentity -> DEBU 044 Obtaining default signing identity
2018-12-21 05:58:03.196 UTC [msp/identity] Sign -> DEBU 045 Sign: plaintext: 0AC7060A1508021A0608EB81F2E00522...060A56072CF60B8F5697E4ED67FD0157
2018-12-21 05:58:03.198 UTC [msp/identity] Sign -> DEBU 046 Sign: digest: F0D279F148EC9853919A36DED749B885E48E562B9450E6ED02F2D5B8CF42B47A
2018-12-21 05:58:03.211 UTC [grpc] DialContext -> DEBU 047 parsed scheme: ""
2018-12-21 05:58:03.212 UTC [grpc] DialContext -> DEBU 048 scheme "" not registered, fallback to default scheme
2018-12-21 05:58:03.212 UTC [grpc] watcher -> DEBU 049 ccResolverWrapper: sending new addresses to cc: [{orderer.example.com:7050 0 <nil>}]
2018-12-21 05:58:03.212 UTC [grpc] switchBalancer -> DEBU 04a ClientConn switching balancer to "pick_first"
2018-12-21 05:58:03.212 UTC [grpc] HandleSubConnStateChange -> DEBU 04b pickfirstBalancer: HandleSubConnStateChange: 0xc420486a60, CONNECTING
2018-12-21 05:58:03.226 UTC [grpc] HandleSubConnStateChange -> DEBU 04c pickfirstBalancer: HandleSubConnStateChange: 0xc420486a60, READY
Error: got unexpected status: BAD_REQUEST -- error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining
I use the following crypto-config.yaml
OrdererOrgs:
- Name: Orderer
Domain: example.com
Specs:
- Hostname: orderer
PeerOrgs:
- Name: Org1
Domain: org1.example.com
EnableNodeOUs: false
Template:
Count: 1
Users:
Count: 1
- Name: Org2
Domain: org2.example.com
EnableNodeOUs: false
Template:
Count: 1
Users:
Count: 1
and this configtx.yaml:
---
Organizations:
- &OrdererOrg
Name: OrdererOrg
ID: OrdererMSP
MSPDir: crypto-config/ordererOrganizations/example.com/msp
Policies:
Readers:
Type: Signature
Rule: "OR('OrdererMSP.member')"
Writers:
Type: Signature
Rule: "OR('OrdererMSP.member')"
Admins:
Type: Signature
Rule: "OR('OrdererMSP.admin')"
- &Org1
Name: Org1MSP
ID: Org1MSP
MSPDir: crypto-config/peerOrganizations/org1.example.com/msp
Policies:
Readers:
Type: Signature
Rule: "OR('Org1MSP.admin', 'Org1MSP.peer', 'Org1MSP.client')"
Writers:
Type: Signature
Rule: "OR('Org1MSP.admin', 'Org1MSP.client')"
Admins:
Type: Signature
Rule: "OR('Org1MSP.admin')"
AnchorPeers:
- Host: peer0.org1.example.com
Port: 7051
- &Org2
Name: Org2MSP
ID: Org2MSP
MSPDir: crypto-config/peerOrganizations/org2.example.com/msp
Policies:
Readers:
Type: Signature
Rule: "OR('Org2MSP.admin', 'Org2MSP.peer', 'Org2MSP.client')"
Writers:
Type: Signature
Rule: "OR('Org2MSP.admin', 'Org2MSP.client')"
Admins:
Type: Signature
Rule: "OR('Org2MSP.admin')"
AnchorPeers:
- Host: peer0.org2.example.com
Port: 7051
Capabilities:
Channel: &ChannelCapabilities
V1_3: true
Orderer: &OrdererCapabilities
V1_1: true
Application: &ApplicationCapabilities
V1_3: true
V1_2: false
V1_1: false
Application: &ApplicationDefaults
Organizations:
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
Orderer: &OrdererDefaults
OrdererType: solo
Addresses:
- orderer.example.com:7050
BatchTimeout: 2s
BatchSize:
MaxMessageCount: 10
AbsoluteMaxBytes: 99 MB
PreferredMaxBytes: 512 KB
Kafka:
Brokers:
- 127.0.0.1:9092
Organizations:
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
BlockValidation:
Type: ImplicitMeta
Rule: "ANY Writers"
Channel: &ChannelDefaults
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
Capabilities:
<<: *ChannelCapabilities
Profiles:
TwoOrgsOrdererGenesis:
<<: *ChannelDefaults
Orderer:
<<: *OrdererDefaults
Organizations:
- *OrdererOrg
Capabilities:
<<: *OrdererCapabilities
Consortiums:
SampleConsortium:
Organizations:
- *Org1
- *Org2
TwoOrgsChannel:
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *Org1
- *Org2
Capabilities:
<<: *ApplicationCapabilities
My docker-compose-cli.yaml file:
version: '2'
volumes:
orderer.example.com:
peer0.org1.example.com:
peer1.org1.example.com:
peer0.org2.example.com:
peer1.org2.example.com:
networks:
byfn:
services:
orderer.example.com:
extends:
file: base/docker-compose-base.yaml
service: orderer.example.com
container_name: orderer.example.com
networks:
- byfn
peer0.org1.example.com:
container_name: peer0.org1.example.com
extends:
file: base/docker-compose-base.yaml
service: peer0.org1.example.com
networks:
- byfn
peer1.org1.example.com:
container_name: peer1.org1.example.com
extends:
file: base/docker-compose-base.yaml
service: peer1.org1.example.com
networks:
- byfn
peer0.org2.example.com:
container_name: peer0.org2.example.com
extends:
file: base/docker-compose-base.yaml
service: peer0.org2.example.com
networks:
- byfn
peer1.org2.example.com:
container_name: peer1.org2.example.com
extends:
file: base/docker-compose-base.yaml
service: peer1.org2.example.com
networks:
- byfn
cli:
container_name: cli
image: hyperledger/fabric-tools:$IMAGE_TAG
tty: true
stdin_open: true
environment:
- GOPATH=/opt/gopath
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_LOGGING_LEVEL=DEBUG
#- CORE_LOGGING_LEVEL=INFO
- CORE_PEER_ID=cli
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/work/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/work/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/work/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
- CORE_PEER_MSPCONFIGPATH=/work/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: /bin/bash
volumes:
- ./channel-artifacts:/work/channel-artifacts
- ./crypto-config:/work/crypto-config
- ./scripts:/work/
depends_on:
- orderer.example.com
- peer0.org1.example.com
- peer1.org1.example.com
- peer0.org2.example.com
- peer1.org2.example.com
networks:
- byfn
Someone faced a similiar problem?
Update
Starting first to orderer service and then peer0 gives the following log:
docker-compose -f docker-compose-cli.yaml up peer0.org1.example.com
Starting peer0.org1.example.com ... done
Attaching to peer0.org1.example.com
peer0.org1.example.com | 2018-12-21 07:22:09.355 UTC [nodeCmd] serve -> INFO 001 Starting peer:
peer0.org1.example.com | Version: 1.3.0
peer0.org1.example.com | Commit SHA: ab0a67a
peer0.org1.example.com | Go version: go1.10.4
peer0.org1.example.com | OS/Arch: linux/amd64
peer0.org1.example.com | Experimental features: false
peer0.org1.example.com | Chaincode:
peer0.org1.example.com | Base Image Version: 0.4.13
peer0.org1.example.com | Base Docker Namespace: hyperledger
peer0.org1.example.com | Base Docker Label: org.hyperledger.fabric
peer0.org1.example.com | Docker Namespace: hyperledger
peer0.org1.example.com | 2018-12-21 07:22:09.355 UTC [ledgermgmt] initialize -> INFO 002 Initializing ledger mgmt
peer0.org1.example.com | 2018-12-21 07:22:09.355 UTC [kvledger] NewProvider -> INFO 003 Initializing ledger provider
peer0.org1.example.com | 2018-12-21 07:22:09.466 UTC [kvledger] NewProvider -> INFO 004 ledger provider Initialized
peer0.org1.example.com | 2018-12-21 07:22:09.485 UTC [ledgermgmt] initialize -> INFO 005 ledger mgmt initialized
peer0.org1.example.com | 2018-12-21 07:22:09.485 UTC [peer] func1 -> INFO 006 Auto-detected peer address: 172.26.0.3:7051
peer0.org1.example.com | 2018-12-21 07:22:09.486 UTC [peer] func1 -> INFO 007 Returning peer0.org1.example.com:7051
peer0.org1.example.com | 2018-12-21 07:22:09.486 UTC [peer] func1 -> INFO 008 Auto-detected peer address: 172.26.0.3:7051
peer0.org1.example.com | 2018-12-21 07:22:09.486 UTC [peer] func1 -> INFO 009 Returning peer0.org1.example.com:7051
peer0.org1.example.com | 2018-12-21 07:22:09.487 UTC [nodeCmd] serve -> INFO 00a Starting peer with TLS enabled
peer0.org1.example.com | 2018-12-21 07:22:09.487 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00b Entering computeChaincodeEndpoint with peerHostname: peer0.org1.example.com
peer0.org1.example.com | 2018-12-21 07:22:09.488 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00c Exit with ccEndpoint: peer0.org1.example.com:7052
peer0.org1.example.com | 2018-12-21 07:22:09.488 UTC [nodeCmd] createChaincodeServer -> WARN 00d peer.chaincodeListenAddress is not set, using peer0.org1.example.com:7052
peer0.org1.example.com | 2018-12-21 07:22:09.490 UTC [sccapi] registerSysCC -> INFO 00e system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
peer0.org1.example.com | 2018-12-21 07:22:09.490 UTC [sccapi] registerSysCC -> INFO 00f system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
peer0.org1.example.com | 2018-12-21 07:22:09.490 UTC [sccapi] registerSysCC -> INFO 010 system chaincode qscc(github.com/hyperledger/fabric/core/scc/qscc) registered
peer0.org1.example.com | 2018-12-21 07:22:09.490 UTC [sccapi] registerSysCC -> INFO 011 system chaincode +lifecycle(github.com/hyperledger/fabric/core/chaincode/lifecycle) registered
peer0.org1.example.com | 2018-12-21 07:22:09.492 UTC [gossip/service] func1 -> INFO 012 Initialize gossip with endpoint peer0.org1.example.com:7051 and bootstrap set [peer1.org1.example.com:7051]
peer0.org1.example.com | 2018-12-21 07:22:09.494 UTC [gossip/gossip] NewGossipService -> INFO 013 Creating gossip service with self membership of {peer0.org1.example.com:7051 [] [132 133 191 71 241 248 154 220 155 96 230 124 237 186 150 131 247 243 69 99 70 223 16 116 157 162 26 216 63 117 58 153] peer0.org1.example.com:7051 <nil> <nil>}
peer0.org1.example.com | 2018-12-21 07:22:09.495 UTC [gossip/gossip] start -> INFO 014 Gossip instance peer0.org1.example.com:7051 started
peer0.org1.example.com | 2018-12-21 07:22:09.495 UTC [sccapi] deploySysCC -> INFO 015 system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
peer0.org1.example.com | fatal error: unexpected signal during runtime execution
peer0.org1.example.com | [signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7fd604040259]
peer0.org1.example.com |
peer0.org1.example.com | runtime stack:
peer0.org1.example.com | runtime.throw(0x111434c, 0x2a)
peer0.org1.example.com | /opt/go/src/runtime/panic.go:616 +0x81
peer0.org1.example.com | runtime.sigpanic()
peer0.org1.example.com | /opt/go/src/runtime/signal_unix.go:372 +0x28e
This is kind of a general error which occurs in fabric. I remember getting BAD Request
error on subsequent execution of peer channel create command when the first one took a bit longer and the request got timed out. However, in this case, the error says that the channel create request is not able to satisfy the implicit policy - i.e., doesn't have appropriate permissions to execute the command. Try setting the msp path in the peer to admin folder, using export CORE_PEER_MSPCONFIGPATH=<path to admin msp>, such that peer signs the channel create command with admincerts instead of peer certificates. Here is an useful link explaining the issue in detail - peer channel creation fails in Hyperledger Fabric
Checked each container log files, paths were incorrect - adjusting peer template to 2 fixed it

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