question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expected one request for MethodDescriptor{DESCRIPTION_OF_THE_ENDPOINT} but received none

See original GitHub issue

Hi,

We currently have a very strange issue in a microservice with grpc-kotlin.

Issue description:

  • after several days of running without issues some grpc endpoints of the service start to have a low but significant error rate (~6%).
  • The error we get:
Expected one request for MethodDescriptor{DESCRIPTION_OF_THE_ENDPOINT} but received none

(coming from stub/src/main/java/io/grpc/kotlin/Helpers.kt:74 in the grpc-kotlin)

  • restart of all service pods “fixes” the issue… until it occurs again after a couple of days
  • memory/cpu usage don’t look suspicious
  • We are using unary calls, i.e. we use the io.grpc.kotlin.ServerCalls#unaryServerMethodDefinition to implement our endpoints

Currently we don’t have a clear idea what might be causing these issues. Did you see a similar issue before somewhere? Or do you have an idea what might be causing this?

Thanks, Marvin

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
asgarddesignscommented, Jul 5, 2022

We ended up finding the issue for us, our service accidentally got moved onto a bottlerocket host instance on AWS. Not sure on the details of why it caused problems but it certainly fixed it.

0reactions
marvinboefdccommented, Jun 24, 2022

We finally did some load tests and could narrow it down a bit further:

  • the specific error message is related to a timeout on the grpc client (!) stub.withDeadlineAfter(... that we use to make the requests. If we increase that timeout, this specific error message (on server side!) disappears.
  • However, request cancellation by the client alone is not enough for the error to occur, we also need to have a high resource usage on server side, e.g. high cpu load. We are currently trying to figure out what exactly is limiting here.
  • (edit:) It seems like the error occurs when the client already cancelled the requests, before the server even tries to call the singleOrStatusFlow from Helpers.kt. However, we sometimes get this error after only very short times (very short trace durations), so not too sure about it…

Do you have an idea what exactly might be going on and what we could test to verify?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Expected one matching request for criteria ... found none
expectOne where I pass in an object with the matching criteria. afterEach(() => { httpTestingController.verify(); }); it('should perform a GET' ...
Read more >
Angular unit testing: Error: Expected one matching request for ...
I wanted a test to check the http.get method was called. Note that there is query parameter, expand=true, the importance of which will ......
Read more >
io.grpc (grpc-api 1.43.0 API) - javadoc.io
Receives state changes for one LoadBalancer.Subchannel . ... The request-related information passed to CallCredentials. ... The "identity", or "none" codec.
Read more >
Best 17 Error: Expected One Matching Request For Criteria
Summary : Articles about Testing HttpClient GET requests in Angular – Damir's Corner But the test fails with the following error: Error: Expected...
Read more >
Beginning gRPC with ASP.NET Core 6
NET CLI to get the same information by opening a ... requires all but one of the same property values. ... WeatherForecast GET...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found