Syncthing Windows Service not restarting after automatic upgrade

Hi, I’m having a problem with Syncthing on a Windows Server. I have it installed as a service via NSSM, which works fine except for when Syncthing performs an automatic upgrade. After the upgrade, the service never restarts. I installed the service following the guide in the Help Docs, and have the service set to restart on failure in the recovery tab in Windows.

The last line(s) of the log file when this happens is:

[DLXBV] 09:02:12 INFO: Automatic upgrade (current “v0.14.7” < latest “v0.14.8”) [DLXBV] 09:02:14 WARNING: Automatically upgraded to version “v0.14.8”. Restarting in 1 minute. [DLXBV] 09:03:14 INFO: Exiting[monitor] 09:03:14 INFO: Restarting monitor… [monitor]

Yeah, iirc the nssm instructions leave a bit to be desired.

Yea it seems to work fine otherwise. And in the setup instructions it has a section that states:

“To ensure that Syncthing exits, restarts and upgrades are handled correctly by the Windows service manager, some final settings are needed. Execute these in the same Commant Prompt”

I’ve done this so not sure why it’s not restarting properly.

I am also experiencing this issue. I am managing a cluster of 15 Windows Servers and things are working great except for the update/restart issue. I have disabled automatic updates for the time being.

Any insight into this issue would be greatly appreciated.

The service manager needs to start syncthing with -no-restart and it must restart Syncthing if it exits with code 3 or 4.

Ah I believe this was my problem. In the instructions it says to enter -no-restart in the Arguments field of NSSM, but the image just below that shows only “-no-console -no-browser -home=“C:\Syncthing””, so I must have messed up here originally.

We will see what happens with the next upgrade. Thanks for pointing that out for me.

Someone probably noticed there was an error after the initial instructions were written and updated the text, but couldn’t be bothered to update the image.

If it fixes the issue for you, would you mind updating the image, to help other users? Thanks!

Will do. Thanks.

Just to give an update: this seems to have fixed the problem. Syncthing has updated automatically several times and the service has restarted itself automatically. Thanks again for the help.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.