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

Doesn't use current values when DNS for a domain is changed #2

Open
Victor-OFC opened this issue Mar 2, 2023 · 2 comments
Open

Doesn't use current values when DNS for a domain is changed #2

Victor-OFC opened this issue Mar 2, 2023 · 2 comments
Assignees

Comments

@Victor-OFC
Copy link

Victor-OFC commented Mar 2, 2023

Uptime appears to keep a cached copy of DNS resolution for domains that it is watching - if an A record for a monitored domain is updated, Uptime seems to continue pinging the old one until the service is restarted

Steps to reproduce:

  1. Add a http://yourdomain.com to Uptime. This site should be up and working
  2. Do something that takes the site down. Uptime should send a down alert
  3. Update the A-record for http://yourdomain.com to point to a different (working) server, give time for DNS propagation, and verify in a browser+curl that the site is back up and running on the new server
  4. Uptime does not ever probe DNS servers to get the updated A-record and continues to report the site as down (forever, or at least for a day or two)

..however restarting Uptime picks up the new DNS record immediately

@Victor-OFC Victor-OFC changed the title Doesn't use current values when DNS for a domain is updated Doesn't use current values when DNS for a domain is changed Mar 2, 2023
@lapubell
Copy link
Contributor

this appears to be a thing from the OS:
https://stackoverflow.com/questions/70468536/is-golang-caching-dns

@ViktorNova
Copy link

Looking at the stackoverflow thread and digging into the docs a little, it looks like there's 2 different ways Go can do DNS resolutions - whichever method is currently being used is breaking a pretty big major aspect of core functionality of this tool, so I think it's worth digging in to

I'm going to try building 2 different versions, each with one of these 2 options set, and see if one of them resolves this.

from the go docs

export GODEBUG=netdns=go    # force pure Go resolver 

export GODEBUG=netdns=cgo   # force native resolver (cgo, win32)

@ViktorNova ViktorNova reopened this Mar 16, 2023
@ViktorNova ViktorNova self-assigned this Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants