Failed to get endorsing peers/failed constructing descriptor for chaincode
I'm writing an RESTful API application to interact with a chaincode deployed on a network, using fabric-sdk-go and the gateway package.
My chaincode is successfully building and deploying to the network, and I'm able to query the network for contracts created and put on the network via the CLI. When running my API, I'm able to successfully connect to via the gateway, and retrieve my contract object, but I'm then unable to actually call the same chaincode 'Query' function in my deployed chaincode, with the error my application returns being: and the response to my request being Discovery status Code: (11) UNKNOWN. Description: error received from Discovery Server: failed constructing descriptor for chaincodes:<name:"newcc" > I do not know what these mean. Is this somehow related to my endorsement policy set for the chaincode? How can I go about figuring out this issue?
|
|
Ed Kazmierczak
Hello
I have a very similar problem. In my case I am writing RESTful API's to connect to Fabric using Javascript and the Javascript SDK and Gateway package. My chaincode is also written in Javascript, is built and deploys to the network. The gateway builds successfully and I can connect to the running fabric and the chaincode and retrieve my contract object. I can send data to the running chaincode via the CLI and get the correct responses from the chaincode. However, as with Alexander's message above I am unable to call any of the functions that I can access via the CLI but get the following message instead: 2020-10-29T12:01:19.166Z - error: [DiscoveryService]: send[my-chaincode] - Channel:mychannel received discovery error:failed constructing descriptor for chaincodes:<name:"my-chaincode" > Has there been any updates to the problem of connecting via SDK's and Gateways? |
|
David Enyeart
I believe you are hitting an issue that was fixed in v2.2.1 and mentioned in the release notes: The service discovery endorsers query may fail with errors Hello I have a very similar problem. In my case I am writing RESTful API's to connect to Fabric using Javascript and the Javascript SDK and Gateway package. My chaincode is also written in Javascript, is built and deploys to the network. The gateway builds successfully and I can connect to the running fabric and the chaincode and retrieve my contract object. I can send data to the running chaincode via the CLI and get the correct responses from the chaincode. However, as with Alexander's message above I am unable to call any of the functions that I can access via the CLI but get the following message instead: 2020-10-29T12:01:19.166Z - error: [DiscoveryService]: send[my-chaincode] - Channel:mychannel received discovery error:failed constructing descriptor for chaincodes:<name:"my-chaincode" > Has there been any updates to the problem of connecting via SDK's and Gateways? |
|