Chaincode is getting invoked but the data is not getting stored in blockchain

7/1/2020

While invoking the chaincode, the data is being read properly. We checked this using the Println statement. But the invoked data is not getting stored in the blockchain network. It throws the following error. "Error: error sending transaction for invoke: could not send: EOF - proposal response: version:1 response:<status:200 payload:"101" ".

How can this be rectified?

I tried testing the same chaincode in my local first network, I am able to save the data in blockchain and retrieve the same. I am facing this issue while testing the code in kubernetes cluster

-- Shruthie
glide-golang
hyperledger-chaincode
hyperledger-fabric
kubernetes

1 Answer

7/1/2020

If you are seeing a could not send: EOF, it is very likely that you have defined a k8s service but the request cannot be properly proxied to the backing endpoints. Essentially k8s accepting your connection, then hanging up when there is no one to forward it to.

I'd note, that just because you see that your chaincode has been successfully invoked on some peer does not indicate that the network is appropriately configured. Generally, the client proposes the invocation to N peers, sufficient to satisfy the configured endorsement policy. Then, after assembling the proposal responses into a transaction, the client submits the transaction to ordering. If a failure occurs at any of these steps, then the transaction will not make it into the blockchain, and will not affect the committed state.

-- Jason Yellick
Source: StackOverflow