Re: Chaincode container is running but query operation gives chaincode instantiation failed #fabric-chaincode


David Enyeart
 

I've improved the error message a bit so that the next people to hit the issue at least know which communication has failed upfront:
https://github.com/hyperledger/fabric/pull/1308


Dave Enyeart

"Suresh Appana" ---05/20/2020 11:11:06 AM---Thanks Dave. The error message was not clear why it was failing. For others, if you end up with the

From: "Suresh Appana" <suresh.appana1@...>
To: David Enyeart <enyeart@...>
Cc: fabric <fabric@...>
Date: 05/20/2020 11:11 AM
Subject: [EXTERNAL] Re: [Hyperledger Fabric] Chaincode container is running but query operation gives chaincode instantiation failed #fabric-chaincode
Sent by: fabric@...





Thanks Dave. The error message was not clear why it was failing.

For others, if you end up with the same issue, to fix the error, make sure the TLS arguments passed correctly. An example working instantiation command with TLS is:

peer chaincode instantiate -o orderer:7050 --tls --cafile /fabric/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CHAINCODE_NAME -v $CHAINCODE_VERSION -c '{"Args":["init", "a", "100", "b", "200"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')"

Thanks,
Suresh
      On May 19, 2020, at 6:35 PM, David Enyeart <enyeart@...> wrote:

      As indicated at https://stackoverflow.com/questions/55394476/error-could-not-send-eof-on-instantiating-chaincode , EOF can be caused by TLS issues between client and orderer.
      This issue is now resolved by fixing the instantiate command TLS settings.


      Dave Enyeart

      <graycol.gif>David Enyeart---05/19/2020 03:21:01 PM---Looks like the client failed to send the results to the ordering service node: https://github.com/hy
      For
      From:
      David Enyeart/Durham/IBM
      To:
      suresh.appana1@...
      Cc:
      fabric <fabric@...>
      Date:
      05/19/2020 03:21 PM
      Subject:
      Re: [Hyperledger Fabric] Chaincode container is running but query operation gives chaincode instantiation failed #fabric-chaincode




      Looks like the client failed to send the results to the ordering service node:
      https://github.com/hyperledger/fabric/blob/release-1.4/peer/common/broadcastclient.go#L63
      Not sure why grpc returned EOF upon send though...


      Dave Enyeart


      <graycol.gif>suresh.appana1---05/19/2020 02:57:43 PM---I was getting timeout error earlier, but as I increased timeout values now I don’t see any timeout e

      From:
      suresh.appana1@...
      To:
      David Enyeart <enyeart@...>
      Date:
      05/19/2020 02:57 PM
      Subject:
      [EXTERNAL] Private: Re: [Hyperledger Fabric] Chaincode container is running but query operation gives chaincode instantiation failed #fabric-chaincode




      I was getting timeout error earlier, but as I increased timeout values now I don’t see any timeout error . Current values of timeouts are: CORE_CHAINCODE_EXECUTETIMEOUT: 60000s and CORE_CHAINCODE_DEPLOYTIMEOUT: 60000s

      On the client side I am getting this error for instantiation step: `Error: could not send: EOF`

      Snippet is:


      ```
      peer chaincode instantiate -o orderer:7050 — tls — cafile /fabric/crypto-config/ordererOrganizations/
      example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CHAINCODE_NAME -v $CHAINCODE_VERSION -c '{"Args":["init", "a", "100", "b", "200"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')"
      2020-05-19 15:44:25.628 -03 [viperutil] getKeysRecursively -> DEBU 001 Found map[string]interface{} value for peer.BCCSP
      2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 002 Found map[string]interface{} value for peer.BCCSP.SW
      2020-05-19 15:44:25.629 -03 [viperutil] unmarshalJSON -> DEBU 003 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
      2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 004 Found real value for peer.BCCSP.SW.Hash setting to string SHA2
      2020-05-19 15:44:25.629 -03 [viperutil] unmarshalJSON -> DEBU 005 Unmarshal JSON: value is not a string: 256
      2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 006 Found real value for peer.BCCSP.SW.Security setting to int 256
      2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 007 Found map[string]interface{} value for peer.BCCSP.SW.FileKeyStore
      2020-05-19 15:44:25.630 -03 [viperutil] unmarshalJSON -> DEBU 008 Unmarshal JSON: value cannot be unmarshalled: unexpected end of JSON input
      2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 009 Found real value for peer.BCCSP.SW.FileKeyStore.KeyStore setting to string
      2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 00a Found map[string]interface{} value for peer.BCCSP.PKCS11
      2020-05-19 15:44:25.630 -03 [viperutil] unmarshalJSON -> DEBU 00b Unmarshal JSON: value is not a string: <nil>
      2020-05-19 15:44:25.631 -03 [viperutil] getKeysRecursively -> DEBU 00c Found real value for peer.BCCSP.PKCS11.Label setting to <nil> <nil>
      2020-05-19 15:44:25.631 -03 [viperutil] unmarshalJSON -> DEBU 00d Unmarshal JSON: value is not a string: <nil>
      2020-05-19 15:44:25.632 -03 [viperutil] getKeysRecursively -> DEBU 00e Found real value for peer.BCCSP.PKCS11.Pin setting to <nil> <nil>
      2020-05-19 15:44:25.633 -03 [viperutil] unmarshalJSON -> DEBU 00f Unmarshal JSON: value is not a string: <nil>
      2020-05-19 15:44:25.634 -03 [viperutil] getKeysRecursively -> DEBU 010 Found real value for peer.BCCSP.PKCS11.Hash setting to <nil> <nil>
      2020-05-19 15:44:25.635 -03 [viperutil] unmarshalJSON -> DEBU 011 Unmarshal JSON: value is not a string: <nil>
      2020-05-19 15:44:25.636 -03 [viperutil] getKeysRecursively -> DEBU 012 Found real value for peer.BCCSP.PKCS11.Security setting to <nil> <nil>
      2020-05-19 15:44:25.636 -03 [viperutil] getKeysRecursively -> DEBU 013 Found map[string]interface{} value for peer.BCCSP.PKCS11.FileKeyStore
      2020-05-19 15:44:25.637 -03 [viperutil] unmarshalJSON -> DEBU 014 Unmarshal JSON: value is not a string: <nil>
      2020-05-19 15:44:25.638 -03 [viperutil] getKeysRecursively -> DEBU 015 Found real value for peer.BCCSP.PKCS11.FileKeyStore.KeyStore setting to <nil> <nil>
      2020-05-19 15:44:25.640 -03 [viperutil] unmarshalJSON -> DEBU 016 Unmarshal JSON: value is not a string: <nil>
      2020-05-19 15:44:25.641 -03 [viperutil] getKeysRecursively -> DEBU 017 Found real value for peer.BCCSP.PKCS11.Library setting to <nil> <nil>
      2020-05-19 15:44:25.642 -03 [viperutil] unmarshalJSON -> DEBU 018 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
      2020-05-19 15:44:25.642 -03 [viperutil] getKeysRecursively -> DEBU 019 Found real value for peer.BCCSP.Default setting to string SW
      2020-05-19 15:44:25.642 -03 [viperutil] EnhancedExactUnmarshalKey -> DEBU 01a map[peer.BCCSP:map[SW:map[Hash:SHA2 Security:256 FileKeyStore:map[KeyStore:]] PKCS11:map[Security:<nil> FileKeyStore:map[KeyStore:<nil>] Library:<nil> Label:<nil> Pin:<nil> Hash:<nil>] Default:SW]]
      2020-05-19 15:44:25.643 -03 [bccsp_sw] openKeyStore -> DEBU 01b KeyStore opened at [/
      fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@.../msp/keystore]...done
      2020-05-19 15:44:25.643 -03 [bccsp] initBCCSP -> DEBU 01c Initialize BCCSP [SW]
      2020-05-19 15:44:25.668 -03 [chaincodeCmd] checkChaincodeCmdParams -> INFO 01d Using default escc
      2020-05-19 15:44:25.668 -03 [chaincodeCmd] checkChaincodeCmdParams -> INFO 01e Using default vscc
      Error: could not send: EOF

      ```


      Thanks,
      Suresh








Join fabric@lists.hyperledger.org to automatically receive all group messages.