-
Notifications
You must be signed in to change notification settings - Fork 46
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
Can't restart syncthing from the tray - Only works when "Apply and launch now" from Startup settings #236
Comments
It works for me. Did you configure the re-connect interval accordingly? Note that the default re-connect interval is 30 seconds so you might be to impatient (or want to tweak the interval). It may run into "Connection refused" if Syncthing doesn't come up quick enough. When using the internal launcher¹ or Systemd-integration the error can be suppressed in this case by setting a grace period in the notification settings. Otherwise you cannot avoid the error except by disabling those errors completely. ¹ Maybe restarting Syncthing via the API - as the "Restart Syncthing" action does - does not count as restart when using the internal launcher because Syncthing's monitoring process is actually nevertheless constantly running. Then the "Connection refused" error also cannot be suppressed. Maybe I should tweak default settings to disable showing notifications for this kind of error by default (as it cannot be suppressed reliably in all cases). |
Interestingly enough (I never tried it, but here we are...) I also get the error, when restarting syncthing through the syncthingtray application - but it quickly disappears again and syncthingtray app is happily connected again to the backend. But I guess that's because of the default, @Martchus mentioned. I am new to being involved to FOSS, but since there was no feedback ever again, since early March when the ticket was created, I guess it's not that big of a deal? (in my day-time job this would be a triage candidate 😁) |
Hi @Martchus @financelurker To answer to your questions:
|
Okay... that all sounds odd... Since, regarding to the code of this syncthingtray project, it restarts syncthing by calling it's REST API. I would guess that for the monitor process it should make no difference who is calling that endpoint (since the native syncthing web UI is calling the same REST endpoint, according to my browser developer tools/"Network" tab). "Syncthing crashed with exit code 3" - there is an almost decade old issue (that is closed) that explains that error code 3 should be handled by the syncthing monitor process as indicator to restart the main process of syncthing again. Have you tried updating all versions?
(The thing is: I wouldn't be able to dig deeper, since you're facing these issues on a windows machine and I cannot reproduce it on my linux machine, with systemd as monitor process... - and I am not sure what the actual code of that monitor process for windows looks like) |
I don't really remember anymore now but judging by #236 (comment) I have already tried to reproduce the problem but couldn't reproduce it. I guess I can try to reproduce it again under Windows next time I boot Windows. |
I tested it again and I could reproduce it. The disconnect is not happening immediately. It only happens after the long-polling connection times out (by default after a minute). Maybe I wasn't patient enough to wait for the long-polling connection to time out in my previous tests. In my tests it helps to click on the "Connect" button on the tray to connect again - just the automatic re-connect interval is not effective. The problem is not reproducible when the checkbox for considering the launcher status for re-connects is not checked. So this feature is probably interfering. I also noticed that the restart via the web UI doesn't work when using the built-in Syncthing library. Probably also something to improve. |
GitHub closed the ticket automatically. The referenced commit will also probably fix this issue for you (unless there are even more problems in your case). You can reopen the ticket if something is missing. |
hi @Martchus thank you for the update |
I created a Windows build you can download directly from my build server: https://martchus.dyn.f3l.de/repo/arch/ownstuff-experimental/os/x86_64/mingw-w64-syncthingtray-qt6-1.5.5-1-any/x86_64-w64-mingw32/bin/syncthingtray-qt6-static.exe I haven't tested it on Windows myself yet. |
Looks like it still doesn't work. It probably only worked in my previous tests because I used a test instance that was very quick to start. |
Maybe this issue is the same or very similar to #257 (comment). Unfortunately I cannot reliably reproduce the problem which make it hard to test any fixes. I pushed another commit that might help. |
Relevant components
syncthingctl
)libsyncthing
)Environment and versions
syncthingtray
,qtutilities
andc++utilities
: 1.5.0Bug description
A clear and concise description of what the bug is.
When restarting Syncthing from the tray Syncthing won't restart causing SyncThingTray to not reconnect
Steps to reproduce
Expected behavior
A clear and concise description of what you expected to happen.
Syncthing restarting and reconnecting
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: