I have two Windows Server 2019 boxes with Syncthing installed as a service using NSSM and the instructions given here. We’ll call them Server01 and Server02. For reasons that defy too much explanation, Server01 is sharing a folder that is actually a UNC path to another server, which we’ll call Server03, one that doesn’t have an OS that I can install Syncthing on. In essence, Server01 is being used as a staging point for Server03 to sync with Server02. Because it’s not interacting with the file system, I can’t watch for file changes, so I have Syncthing scanning the folder on Server03 on a 60s interval. Now the problem. Every other file change or so that I make on Server03 causes everything on Server02 to become a folder with the same file name, rather than the file itself. So, I’ll get a bunch of folders named “New Text Document.txt” etc etc.
Any thoughts on what might be causing this? Thanks.
That’s fascinating. I’ve never heard of such a thing nor can I imagine the cause, other than the filesystem suddenly reporting that files are in fact directories.
I’m glad you think so! I was worried I had configured something wrong. Is there anything useful I can provide to help troubleshoot this? I tried to look in the logs but I’m afraid I’m either looking in the wrong logs, or I didn’t set the logs up correctly through NSSM.
I would look outside of Syncthing, as you’re seemingly the only person to ever experience this and you have an interesting server with an OS that doesn’t run Syncthing. There aren’t that many OSes Syncthing doesn’t run on, what is it – maybe ONTAP or OS/400 (“IBM i”) or something? Novell NetWare? OS/2 Warp?
It is, in fact, an AS400 IBM. Hm, that does make things extremely tricky. The share is being presented as an SMBv1 share, and people have been mapped directly to this drive for years without issue. I don’t even know where to start if it’s an issue outside of Syncthing.
Well, see if you can reproduce it without having that SMB mount involved. If you can, we can look at what happens in Syncthing to cause it. If you can’t, then I guess maybe call IBM.
Welp, I’ve tested just sharing a normal folder off of Server01 to Server02 and of course that’s working. That’s not too surprising. That doesn’t leave me with much, though, at this point. I don’t really have recourse to call IBM on this issue, since they’ll just say the issue is with Syncthing. There is clearly an issue with the way that Syncthing is seeing these files, since I can’t recreate this issue with the Windows filesystem mounted via SMB to this share. What’s also strange is that, when trying to delete files on Server03, sometimes the sync will happen, files will be gone from Server03 and Server02, but then after a couple of scans all of the deleted files will be back on both Server03 and Server02. I don’t have any file versioning enabled. Is there some better way to see what, exactly, Syncthing is seeing and doing?
We don’t do anything special. We list the things in a directory. The things for which the OS says “this is a directory”, those we consider directories. Things for which the OS says “this is a normal file”, those we consider files. That’s pretty much it. You can enable various debugging options in Syncthing to see what it sees.