![ServerSync](https://media.forgecdn.net/avatars/thumbnails/254/696/256/256/637199290945083080.png)
Deleting random files, instead of pushing/replacing them.
Boymann opened this issue ยท 29 comments
Serversync Version: 2.6.22
Minecraft Version: 1.12
Issue: When syncing, I sync my mods and config folders. From the config folder it pushes most things, but for some reason some of my clientmods configs (betterfoliage and dynamic surrundings) are deleted.
ServerSync acts like a mirror:
Server has: ๐ ๐ ๐
Client has : ๐ ๐ฅ โ
Transfer:
๐ | ๐ | ๐ | ||
โ | โ | โ | ||
๐ | ๐ | ๐ | ๐ฅ | โ |
File deletion:
๐ | ๐ | ๐ | ๐ฅ | โ |
โ | โ | โ | โ | โ |
Client specific mods are a special case as they only exist on the client, ServerSync knows that the mod exists but it can not know about any auxiliary files that are created by said mod like config files.
In order for these to not be deleted the client will need to add a rule to their ignore list telling ServerSync not to delete the auxiliary files:
ignore_list: <
config/swords-mod.cfg
config/fishcake-mod.cfg
>
Alternatively, you could put the configuration you want clients to have for these mods in the servers config directory. This is not the best solution though as these mods are usually designed to be user-configurable and the server wiping out the users preference is most likely going to annoy them.
Could you send me the config files that are failing to sync and your server configuration file please.
Would be interesting to see if SS is dieing on large numbers of files or just specific files.
Renamed the files to .log, because github didn't allow to upload .cfg These are the files that don't get synced but get deleted independent from being the same on client and serverside or having changed serverside.
Both client and server have identical config folders, both also containing client configs, because it's easier to push configs like that. Both have the dsurround and betterfoliage config files, but when syncing, the server deletes them from the client and does not push the ones from the server. I'm very grateful for that explanation though :) Since serversync deletes those client configs, they are on the ignore list, but I can not push general client config updates like this.
I would also like to add, that I put the serversync folder on the ignore list, and it still keeps deleting the serversync folder, thus reseting the IP and configurations for it client side.
Scratch anything I said about the ignore list before. It does not work for me at all. It still tries to sync anything on the ignore list, and deletes the files.
serversync-2.6.23-test-build.jar.zip
Give the above test build a shot.
This adds the config files for ServerSync to the ignore list behind the scenes and adds some extra server logging around which files it found.
The server config you have has both dsurround and betterfoliage as ignored files, which is telling the server not to transfer them, though dsurround did have a typo in it of dsurroubd.
Gave this a test and it works as expected in my Win10 environment:
- with the ignore patterns the server does not transfer the configs.
- without the patterns it transfers them and the client does not delete them.
Can you provide the following please:
- log files from serversync (server & client if possible) (logs/serversync*)
- the OS you are using
- the method used to start serversync (from forge or from command line etc)
I'm using Windows 10
And the server has serversync running as a forge mod. And the clients start up serversync. The server logs might be useless, cuz I restart the server every day and it might reset those logs. They seem much smaller than the ones on the client.
I'll try the test build now.
Hmm, tried a sync to your server and it is indeed getting confused at some point with what the server contains, possibly related to how many files it is keeping track of.
This may end up falling back to the rewrite I am currently working on which slims down the "do we have the same files" communication quite a bit.
Probably also the same problem as #134
@Boymann
Have you tried running ServerSync stand alone? It's pretty unlikely but forge could be meddling with the sync process.
@rheimus Alright, I tried it running standalone, but the problem is still apparent. :/
There is an early access peek at the new file sync available in my fork if you are interested, note that it does not currently support clientmods: https://github.com/rheimus/ServerSync/releases
awww no client mod, but I will check it out and test in when I will have time! Thank you for your hard work!
alpha.1 is pretty slow compared to the previous, and I can't get to fully sync all 3 folders I want in one run. So far in 3 runs, I could not complete a fully sync. Also, I think it also crashed the server.
Interesting.
ServerSync does not interact with forge other than listening for a 'load' event at startup, it should not be able to crash it, though I guess it could potentially eat all the memory allocation.
Do you have the logs from ServerSync? would be interested to see if the sync is actually completing. It should not be possible to run a sync and have files be missed that would be picked up on subsequent syncs.
Hmmm, I should really implement per client logs. Looks like that one has been overwritten with the general startup of SS. No clients have connected yet.
Do you have the client side logs as well?
Alpha 2 has client specific log files. I also increased the timeouts on the server to 2 minutes before it boots a client off for inactivity.
This probably won't solve the issues you are seeing but it does make logs easier to use.
Most fascinating, the log does appear to cut off part way through like the client is crashing silently after a few files.
Do you know if the client ever got to the "update complete" message in the UI?
Ahh nice, that one has some juicy errors in it. Including a 0 byte file ๐.
From a glance it looks like the server side has fallen over and the client can no longer read from the socket.
Do you have the server log for this one, they should now be called serversync-server-<address>
serversync-server-connection-from--100-70-140-182.log
Here they are. I'll slowly delete the rest of the logs. Just being cautious, you know.
Indeed, I was going to write some cleanup code for it that does a startup check or some such and bins super old logs.
Hey! I'm back with a new update! You probably hate me now! Alpha 3 works now, BUT it goes back to square one. It deletes my dsurround.cfg and other random client config cfgs, also thebetweenlands, which is not only a client cfg. All being present in the server config folder tho.
serversync-server.log
serversync-server-connection-from--100-70-169-179.log
serversync-client.log
Bugs are the spice of life ๐.
I've been thinking of making the sync a bit more user interactive, you get to see what files are out of date and choose to update specific files or all of them from a list.
Might expose more of why some files are failing, I can put more intensive logging on individual files.