Uploaded image for project: 'Fabric'
  1. Fabric
  2. FAB-17538

Container registration failed on chaincode commit along with couchdb batch update conflict

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Invalid: Environment Issue
    • Affects Version/s: v2.0.0
    • Fix Version/s: None
    • Component/s: fabric-peer
    • Labels:
      None
    • Steps to Reproduce:
      Run the chaincode commit command

      Description

      When I run below command to commit the chaincode using `chaincode lifecycle` which is approved and ready to commit:

      ./peer lifecycle chaincode commit -o orderer.example.org:7050 --channelID mychannel --name storage_chaincode --version v1 --sequence 1 --init-required --tls --cafile ./crypto-config/ordererOrganizations/example.org/orderers/orderer.example.org/msp/tlscacerts/tlsca.example.org-cert.pem
      2020-02-26 13:19:47.045 IST [chaincodeCmd] ClientWait -> INFO 001 txid [d730ccd535f8bce2edb7baf25207c8c2d97985e3219393111b1de9cd45ae532d] committed with status (VALID) at
      

       

      It shows no error but in peer logs, it shows:

       

      2020-02-26 13:19:46.699 IST [gossip.privdata] prepareBlockPvtdata -> INFO 072 Successfully fetched all eligible collection private write sets for block [4] channel=mychannel
      2020-02-26 13:19:46.700 IST [lifecycle] update -> INFO 073 Updating cached definition for chaincode 'storage_chaincode' on channel 'mychannel'
      2020-02-26 13:19:46.705 IST [lifecycle] update -> INFO 074 Chaincode with package ID 'storage_chaincodev1:696e1856cb2f680764e0bb495793a485b9832b0d2e73fed19d75e28db02454e3' now available on channel mychannel for chaincode definition storage_chaincode:v1
      2020-02-26 13:19:46.705 IST [cceventmgmt] HandleStateUpdates -> INFO 075 Channel [mychannel]: Handling deploy or update of chaincode [storage_chaincode]
      2020-02-26 13:19:46.866 IST [statecouchdb] commitUpdates -> WARN 076 CouchDB batch document update encountered an problem. Reason:Document update conflict., Retrying update for document ID:namespaces/fields/storage_chaincode/EndorsementInfo
      2020-02-26 13:19:46.901 IST [statecouchdb] commitUpdates -> WARN 077 CouchDB batch document update encountered an problem. Reason:Document update conflict., Retrying update for document ID:namespaces/fields/storage_chaincode/Sequence
      2020-02-26 13:19:46.930 IST [statecouchdb] commitUpdates -> WARN 078 CouchDB batch document update encountered an problem. Reason:Document update conflict., Retrying update for document ID:namespaces/fields/storage_chaincode/ValidationInfo
      2020-02-26 13:19:46.959 IST [statecouchdb] commitUpdates -> WARN 079 CouchDB batch document update encountered an problem. Reason:Document update conflict., Retrying update for document ID:namespaces/metadata/storage_chaincode
      2020-02-26 13:19:46.985 IST [statecouchdb] commitUpdates -> WARN 07a CouchDB batch document update encountered an problem. Reason:Document update conflict., Retrying update for document ID:namespaces/fields/storage_chaincode/Collections
      2020-02-26 13:19:47.044 IST [kvledger] CommitLegacy -> INFO 07b [mychannel] Committed block [4] with 1 transaction(s) in 345ms (state_validation=11ms block_and_pvtdata_commit=59ms state_commit=261ms) commitHash=[4f23756ab038bef3eb5b81ce61b38472101ebb32afc239b5043bb23ee663688b]
      2020-02-26 13:19:47.047 IST [comm.grpc.server] 1 -> INFO 07c streaming call completed grpc.service=protos.Deliver grpc.method=DeliverFiltered grpc.request_deadline=2020-02-26T13:20:14.652+05:30 grpc.peer_address=127.0.0.1:54390 error="context finished before block retrieved: context canceled" grpc.code=Unknown grpc.call_duration=2.394955927s
      2020-02-26 13:19:48.686 IST [lifecycle] Work -> WARN 07d could not launch chaincode 'storage_chaincodev1:696e1856cb2f680764e0bb495793a485b9832b0d2e73fed19d75e28db02454e3': chaincode registration failed: container exited with 0
      

      As chaincode is not registered, I am not able to query/invoke it.

       

      Chaincode container logs are as:

       

      + CHAINCODE_DIR=/usr/local/src
      + cd /usr/local/src
      + npm start -- --peer.address peer0.org1.example.org:7052
      > storage@1.0.0 start /usr/local/src
      > node storage.js "--peer.address" "peer0.org1.example.org:7052"
      2020-02-26T07:49:48.479Z info [c-api:lib/chaincode.js] Registering with peer peer0.org1.example.org:7052 as chaincode "storage_chaincodev1:696e1856cb2f680764e0bb495793a485b9832b0d2e73fed19d75e28db02454e3"
       
      2020-02-26T07:49:48.501Z error [c-api:lib/handler.js] Chat stream with peer - on error: %j "Error: 14 UNAVAILABLE: failed to connect to all addresses\n at Object.exports.createStatusError (/usr/local/src/node_modules/grpc/src/common.js:91:15)\n at ClientDuplexStream._emitStatusIfDone (/usr/local/src/node_modules/grpc/src/client.js:233:26)\n at ClientDuplexStream._receiveStatus (/usr/local/src/node_modules/grpc/src/client.js:211:8)\n at Object.onReceiveStatus (/usr/local/src/node_modules/grpc/src/client_interceptors.js:1311:15)\n at InterceptingListener._callNext (/usr/local/src/node_modules/grpc/src/client_interceptors.js:568:42)\n at InterceptingListener.onReceiveStatus (/usr/local/src/node_modules/grpc/src/client_interceptors.js:618:8)\n at /usr/local/src/node_modules/grpc/src/client_interceptors.js:1127:18"
      

       

      Similar previous issue: https://jira.hyperledger.org/browse/FAB-10558

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            Aniket.1 HLF .A
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration