Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommendation for more logging or details for submit error scenarios #280

Closed
davidkel opened this issue Nov 3, 2021 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@davidkel
Copy link
Contributor

davidkel commented Nov 3, 2021

When attempting to submit a transaction where we know the environment is not in a good state and thus errors are expected, the following 3 types of errors were received

14 UNAVAILABLE: failed to select a set of endorsers that satisfy the endorsement policy
14 UNAVAILABLE: no combination of peers can be derived which satisfy the endorsement policy: no peer combination can satisfy the endorsement policy Details

and

10 ABORTED: failed to collect enough transaction endorsements, see attached details for more info Details: [{\"address\":\"peer0.org2.example.com:9051\",\"message\":\"error 500, error in simulation: failed to execute transaction 389b63174fda3704ffb89424f4a469c6ff594b7c5b17fcdc3dbd9d0d1f9bc955: error sending: chaincode stream terminated\",\"mspId\":\"Org2MSP\"},{\"address\":\"peer1.org3.example.com:11151\",\"message\":\"error 500, error in simulation: failed to execute transaction 389b63174fda3704ffb89424f4a469c6ff594b7c5b17fcdc3dbd9d0d1f9bc955: error sending: chaincode stream terminated\",\"mspId\":\"Org3MSP\"}]"}

The last one includes details looks to provide additional clues into why the error message occurs whereas the first 2 don't, so you would need to look in the gateway peer logs to try to see what the true cause of these error messages are.

the log does show connectivity problems which could be the cause of the message

So this issue is about having a discussion on if it's possible to include more detail back to the client about the true cause or whether there is a need for logging in the gateway to help determine if the connectivity errors seen further up in the log are the contributors to the error message.

@andrew-coleman
Copy link
Member

The first one:

14 UNAVAILABLE: failed to select a set of endorsers that satisfy the endorsement policy

gets generated if discovery believes one or more peers are available, but the gateway fails to connect to it/them. So this one I could definitely append the list of endpoints that failed to connect.

The second one:

14 UNAVAILABLE: no combination of peers can be derived which satisfy the endorsement policy: ...

gets generated by the discovery service. It will only include a peer in an endorsement plan if it believes that peer is alive. And it gets that information from periodic gossip messages. Whether you get this error, or the previous one, is probably just down to timing relative to the gossip messages. The gateway doesn't have much it can add to the error message for this case.

@denyeart denyeart added the bug Something isn't working label Nov 5, 2021
@andrew-coleman andrew-coleman self-assigned this Nov 9, 2021
@andrew-coleman
Copy link
Member

resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants