-
Notifications
You must be signed in to change notification settings - Fork 840
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
[Bug]: DNS time-to-live not respected #2859
Comments
@barryprice This seems like it might be an issue with Electron/Chromium, since it's the one managing the DNS lookups. Is this reproducible in the browser? |
That was my assumption, but I am not at all familiar with Electron - so I'm unsure whether it's something that can be potentially tweaked via options in the mattermost-desktop build, or whether this needs to be targeted upstream to Electron itself (or some component(s) thereof). Several users tested with various browsers while we were seeing this issue with the app (Firefox, standalone Chrome/Chromium), and all reported that the DNS TTL was respected in those cases with no issues. |
I would wager this would be something we'd want to file upstream to Electron. I can try and reproduce the issue using Electron Fiddle, but it will be tough and take some time. Let me get back to you. |
@barryprice I actually was able to reproduce this on Chrome myself on macOS with a CNAME entry with a TTL of 60s. It took a restart of the app to get it to update, not even a Hard Reload would jig it. This seems like an issue with Chromium itself. |
Before you file a bug report
Mattermost Desktop Version
5.5.0 commit: 4f266a3
Operating System
Ubuntu Linux 22.04 LTS x64 (but seen across various series)
Mattermost Server Version
7.8.0
Steps to reproduce
We migrated a production Mattermost server instance between data centres earlier today.
During the downtime period we intentionally took both source and target instances offline (in such a way that users would receive a 503 error) to avoid skew between the two installations during the sync.
Prior to and during this period, DNS TTL was reduce to 60s.
Once migration was complete, we restored service on the target instance but intentionally kept the source instance offline.
Connecting to the migrated service via web browser (as well as e.g. matterircd) worked fine at this point, but trying to use an already-running mattermost-desktop app just showed 503 errors, confirmed by several users.
We tried logging out and logging in again, but this didn't make any difference, further investigation revealed it was still trying to connect to the intentionally-down source service.
It appears that the app does a DNS lookup on startup/login and then caches that result for far longer than expected, possibly indefinitely.
Fully stopping and relaunching the app resolved the problem.
Expected behavior
The app should have noticed that the target IP changed, and attempted to reconnect to the new target.
If not immediately, then certainly at the logout/login step.
Observed behavior
The stale IP from the source service was cached for many times longer than the set TTL, while the local machine's resolver was well aware of the new one.
Log Output
Additional Information
No response
The text was updated successfully, but these errors were encountered: