Syncthing - windows service - fails when using -home parameter

Here’s what I am trying to achieve: Windows Server environment, one master server distributing files to 19 servers. This has to happen as a service since our aim is that noone should have to log on to those 19 servers.

There is no AD here and the servers are located, well, all around the place in different CO-LO’s and Azure/Amazon setups.

I am able to make this work using Syncthing and nssm, however, since Syncthing per default saves the database and config in %appdata% I have tried both starting the client, and installing via nssm using the -home parameter, specifying -home to be c:\syncthing\config

This works like a charm until I try to do something on the “slave” servers - like adding the sync-folder.

This provides me with the error: " Connection Error Syncthing seems to be experiencing a problem processing your request. Please refresh the page or restart Syncthing if the problem persists"

If I just start Syncthing without the -home parameter this whole process works like a charm.

After having read all the threads about this I do understand that there are concerns about running as a service, that is fine, I understand these concerns, and I do understand that I am now alone in wanting to achieve this and there are several out there who has.

So what am I doing wrong here?

First guess would be that the user you’re running Syncthing as doesn’t have access to your -home path. But some sort of logs would be nice, and probably tell you what’s going wrong…

Thanks Jakob, I have been considering the problem with permissions, however, since the initial startup goes OK, the startup where the config-files and database is being created, I am inclined to believe that permissions is ok - I mean, the config-files and DB is being created just fine.

The error only happens when the the master-server adds this new sync-client, on the “slave” I select to add this new hosts, then the error appears.

The logfile and audit files are completely empty, or at least, they don’t include any additional information at all:

[4MYNM] 12:34:46 INFO: Connection from :22067 (relay-accept) with ignored device ID DELETED-PTFF2EH-FPQU7JP-7KNHRXA-7KJD3C3-NHJHSEB-BHMJ57E-DELETED [4MYNM] 12:45:38 INFO: Connection from :22067 (relay-accept) with ignored device ID DELETED-PTFF2EH-FPQU7JP-7KNHRXA-7KJD3C3-NHJHSEB-BHMJ57E-DELETED [4MYNM] 12:48:30 OK: Exiting

The last point with Exiting is me doing CTRL+C in the command-window to cancel out.

I have also started Syncthing -verbose without this leading to any additional information apart form regular debug.

For the fun of it I now started Syncthing without -home and it failed now as well, so there is something here I just cannot figure out.

I don’t see a failure here. The connection is refused, as it seems you have elected to ignore connections from that device? (Find it in the config.xml and remove the entry there if this is not what you wanted.)

Which side is is that dies with the connection error?

The log lists “ignored” until I in fact click to accept the sharing agreement and thus no longer is ignoring it.

As soon as I try to accept it, the error appears and the slave/receiving part ends - it never makes it’s way into config.xml at all

Check the javascript console on the errors as you click accept, or the response to /config HTTP call as you click accept.

Thanks - in my attempt to get some proper feedback from the browser I installed Chrome and of course everything worked. So sorry to bother you all on the day before Xmas, now I am just waiting for the client to start downloading 256 MB and everything will be fine…

1 Like

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