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

"context deadline exceeded" error message is too generic #3792

Closed
trombik opened this issue May 25, 2020 · 5 comments
Closed

"context deadline exceeded" error message is too generic #3792

trombik opened this issue May 25, 2020 · 5 comments
Assignees
Labels
Milestone

Comments

@trombik
Copy link

trombik commented May 25, 2020

many part of the backend code use context with WithTimeout. they do not always throw exception with details. they just throw "context deadline exceeded" error. this makes debugging extremely difficult.

Expected Behavior

when timeout occurs, throws an error with more contexts, such as, who threw the error? what was the code doing? so that users can identify what the real cause is.

Current Behavior

the backend (possibly others) throw "context deadline exceeded".

Possible Solution

ensure to return error with the context.

Steps to Reproduce (for bugs)

there are many ways to reproduce. the easiest way is:

  1. try to enable TLS in the backend
  2. make mistakes
  3. start the backend

Context

while I was trying to enable TLS, the backend always throws the error. I know it IS my fault, but it does not tell what the real issue is. to enable TLS, you need to change at least 20 configuration flags in backend.yml, which is not documented in the official documentation. if the backend gave me more context in errors, it would have been (slightly) easier.

Your Environment

  • Sensu version used (sensuctl, sensu-backend, and/or sensu-agent): 5.20.0
  • Installation method (packages, binaries, docker etc.): my own package
  • Operating System and version (e.g. Ubuntu 14.04): FreeBSD 12.1
@echlebek
Copy link
Contributor

This can be traced to a bug in etcd 3.3: etcd-io/etcd#9400

We need to upgrade to at least etcd 3.4 to fix this, but etcd 3.4 was published as a broken Go module, so we can't upgrade to it. We have to wait for etcd 3.5, which should be published some time this year.

See also #3729, #3649, and #3663, which are related to this issue.

@echlebek echlebek added the bug label May 25, 2020
@calebhailey calebhailey added the component:backend Sensu Backend improvements label Jun 4, 2020
@calebhailey
Copy link

Looks like etcd 3.5 is still in progress: https://github.com/etcd-io/etcd/milestone/37

@calebhailey calebhailey added this to the 6.4.0 milestone Feb 2, 2021
@portertech
Copy link
Contributor

portertech commented Feb 8, 2021

Will be closed by #3729

@portertech
Copy link
Contributor

We will confirm the issue has been fixed after merging #4229

@amdprophet
Copy link
Member

I wasn't able to reproduce this on the main branch which now has Etcd 3.4. If this continues to happen after the next release (6.4.0), please reopen this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants