minifabric icon indicating copy to clipboard operation
minifabric copied to clipboard

Approve chaincode issue in Minifabric with kubernetes in local cluster with FABRIC_LOGGING_SPEC="INFO"

Open raza-sikander opened this issue 4 years ago • 4 comments
trafficstars

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

image

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 :1): Cannot iterate over null (null) Error: timed out waiting for txid on all peers Error: failed to send transaction: got unexpected status: SERVICE_UNAVAILABLE -- EOF

STATS *******************************************************

minifab: ok=384 failed=1

real 15m30.218s user 3m43.899s sys 1m2.277s`

raza-sikander avatar Sep 20 '21 05:09 raza-sikander

Getting this error image

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"
                }

image

raza-sikander avatar Sep 20 '21 07:09 raza-sikander

Very interesting indeed. Do not know why the logic level affected chaincode approval.

litong01 avatar Sep 20 '21 17:09 litong01

@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
:

itaru2622 avatar Sep 22 '21 01:09 itaru2622

Its working fine for me in debug level where as info level tried minifab ccup -v 2.0 it still fails with same error.

raza-sikander avatar Sep 23 '21 04:09 raza-sikander