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

Service UDP Check: TTL must be > 0 for TTL checks #14864

Closed
sycured opened this issue Oct 4, 2022 · 3 comments · Fixed by #14885
Closed

Service UDP Check: TTL must be > 0 for TTL checks #14864

sycured opened this issue Oct 4, 2022 · 3 comments · Fixed by #14885
Labels
theme/health-checks Health Check functionality type/bug Feature does not function as expected

Comments

@sycured
Copy link

sycured commented Oct 4, 2022

Overview of the Issue

I'm trying to add the service file "service_unbound.hcl" on my lab using your snippet (https://www.consul.io/docs/discovery/checks#udp-check)

service {
  name = "unbound"
  id   = "unbound"
  port = 53

  enable_tag_override = false

  check = {
    id = "dns"
    name = "DNS UDP on port 53"
    udp = "localhost:53"
    interval = "10s"
    timeout = "2s"
  }
}

Error

Error reloading: Unexpected response code: 500 (service "unbound": check "DNS UDP on port 53": TTL must be > 0 for TTL checks)

Reproduction Steps

Steps to reproduce this issue, eg:

  1. Create a cluster with n client nodes n and n server nodes
  2. Create the service file in /etc/consul.d/
  3. Run consul reload
  4. View error

Operating system and Environment details

Consul 1.13.2 (revision 0e046bb)
Oracle Linux 9 on x86_64 and aarch64

@jkirschner-hashicorp
Copy link
Contributor

Hi @sycured,

I see that this is your first post here - welcome to the Consul community!

Thank you for sharing this report. Your check definition looks normal to me. (It looks like a straight copy of an example we provide in the docs.)

The error message makes it seem like Consul thinks a "TTL" type check is configured (not just a "UDP" type check). But no ttl field is provided in the check definition, so I'm not sure why that will be. Flagging this as a possible bug to investigate.

@jkirschner-hashicorp jkirschner-hashicorp added type/bug Feature does not function as expected theme/health-checks Health Check functionality labels Oct 4, 2022
@jkirschner-hashicorp
Copy link
Contributor

Hi @sycured,

Refer to PR #14885 for more details. That should be merged soon and included in 1.14.0 and the next 1.13.x patch release.

My understanding is that the bug affects check definitions registered as a part of agent configuration files (flows 4 and 5 described in the dev docs for check registration flows). I think other registration flows (e.g., CLI and HTTP API) will work as expected if a workaround is needed in the meantime.

Thanks again!

@sycured
Copy link
Author

sycured commented Oct 5, 2022

Hi @jkirschner-hashicorp,
Thank you for the update and possible workarounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/health-checks Health Check functionality type/bug Feature does not function as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants