minifabric
minifabric copied to clipboard
Approve chaincode issue in Minifabric with kubernetes in local cluster with FABRIC_LOGGING_SPEC="INFO"
I have created a local k8s cluster with nodePort based load balancer.
the command im using to deploy the fabric network is
./minifab up -o hyd.com -i 2.2.3 -c sample -e true
the after installing the chaincode it gets struck at approve chaincode

My output Log is as follow :
`Using spec file: /home/cdac/mywork/spec.yaml Minifab Execution Context: FABRIC_RELEASE=2.2.3 CHANNEL_NAME=sample PEER_DATABASE_TYPE=golevel CHAINCODE_LANGUAGE=go CHAINCODE_NAME=simple CHAINCODE_VERSION=1.0 CHAINCODE_INIT_REQUIRED=true CHAINCODE_PARAMETERS="init","a","200","b","300" CHAINCODE_PRIVATE=false CHAINCODE_POLICY= TRANSIENT_DATA= BLOCK_NUMBER=newest EXPOSE_ENDPOINTS=true CURRENT_ORG=hyd.com HOST_ADDRESSES=10.244.0.42 WORKING_DIRECTORY: /home/cdac/mywork .......
Preparing for the following operations: *********************
verify options, download images, generate certificates, start network, network status, channel create, channel join, anchor update, profile generation, cc install, cc approve, cc commit, cc initialize, discover .................
Running operation: ******************************************
verify options .
Running operation: ******************************************
download images ....
Running operation: ******************************************
generate certificates ..........................................................................................................................................................................
Running operation: ******************************************
start network ................Pausing for 120 seconds (ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort) [Wait for all nodes to be ready] Waiting for all nodes to be ready to serve requests...: .....
Running operation: ******************************************
network status ...
Current Minifabric image ID and created at date time ********
420a2763d918 2021-08-25 03:18:56 +0000 UTC .....
Docker node status ******************************************
test : Up 1 second
Fabric network peer and orderer node health status **********
peer1.hyd.com
peer2.hyd.com
peer1.cdac.com
peer2.cdac.com
orderer1.example.com orderer2.example.com orderer3.example.com Network Status: 0%
Running operation: ******************************************
channel create ......
Running operation: ******************************************
channel join ...........................
Running operation: ******************************************
anchor update ............
Running operation: ******************************************
profile generation .................................
Running operation: ******************************************
cc install .......
..........
..... .....
Running operation: ******************************************
cc approve .....
Run the channel signing off script on cli container *********
non-zero return code
jq: error (at
STATS *******************************************************
minifab: ok=384 failed=1
real 15m30.218s user 3m43.899s sys 1m2.277s`
Getting this error

When my spec.yaml file logginng level is set to INFO
"ca": {
"FABRIC_LOGGING_SPEC": "INFO"
},
"peer": {
"FABRIC_LOGGING_SPEC": "INFO"
},
"orderer": {
"FABRIC_LOGGING_SPEC": "INFO"
}
its working as expected if im setting the log level to DEBUG without any error
"settings": {
"ca": {
"FABRIC_LOGGING_SPEC": "DEBUG"
},
"peer": {
"FABRIC_LOGGING_SPEC": "DEBUG"
},
"orderer": {
"FABRIC_LOGGING_SPEC": "DEBUG"
}

Very interesting indeed. Do not know why the logic level affected chaincode approval.
@raza-sikander @litong01 chaincode phases (chaincode install to chaincode commit) sometimes fails by unknown reason even logging level is debug.
in that cases, you can recover by re-doing chancode ops again with 'minifab ccup" subcommand, like:
minifab ccup -v 2.0
:
# in case of failure again...
minifab ccup -v 3.0
:
Its working fine for me in debug level where as info level tried minifab ccup -v 2.0 it still fails with same error.