-
Notifications
You must be signed in to change notification settings - Fork 115
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
updating over tailscale (sometimes!) fails with #199
Comments
I consistently get this error when running
To be more specific, it got stuck for some time at I'm using latest gok and tailscale 1.40.1 on both machines. My appliance is an amd64 mini pc, if that matters. |
Given that you can reproduce it reliably, could you send a PR to ignore this error in the updater? Thanks! |
I'll try! |
I dug into the Lines 353 to 362 in a764954
/reboot handler assumes the response always finishes successfully within 1 second before rebooting, which may not always be the case (maybe tailscale just adds enough latency for this bug to surface more easily). If we instead allow the http server to gracefully shut down before rebooting, we might solve this bug without any workaround.
On that note, how do I tell |
Hmm. Can you try bumping this to 10s to see if that works around the issue?
You can just |
This is not a real fix. I still haven't figured out why a `connection reset by peer` happens in the first place. `target.Reboot()` will still block for a bit before giving up. At least it doesn't falsely report a fail now. Also moved canc() up so the terminal isn't littered with `[update boot file system] 0.00% of 16 MiB, uploading at 0 B/s` during the wait. I have no idea why the reporting hasn't been cancelled already: boot file system update apparently finished waaaay before that point. Related: gokrazy/gokrazy#199
Bumping the wait time to 10s doesn't seem to do anything. I wanted to try gracefully shutting down the http server too, but honestly couldn't figure out how to do that in the gokrazy codebase. I'll sleep on it for now :( Meanwhile I've pushed gokrazy/tools#55 to simply ignore the error. |
This is not a real fix. I still haven't figured out why a `connection reset by peer` happens in the first place. `target.Reboot()` will still block for a bit before giving up. At least it doesn't falsely report a fail now. Also moved canc() up so the terminal isn't littered with `[update boot file system] 0.00% of 16 MiB, uploading at 0 B/s` during the wait. Related: gokrazy/gokrazy#199
Yeah noticed this too. |
Platform
I’m using:
Observed behavior
Updating gokrazy on my Raspberry Pi Zero 2W over tailscale became flaky about 10 days ago. When it doesn’t work, it fails with this error message:
2023/04/25 07:16:51 reboot: Post "http://gokrazy:***@consrv/reboot": read tcp 100.101.67.78:46166->100.108.215.49:80: read: connection reset by peer
Not sure yet what the trigger is, but maybe we need to programmatically ignore this error in the updater for now.
The text was updated successfully, but these errors were encountered: