Workers aren't being saved once dedicated server restarts.
NuL1F3 opened this issue · 29 comments
Minecolonies version
0.8.4191
Expected behavior
- From a dedicated server, after hiring NPC's, workers should still be 'employed' after server restarts.
Actual behaviour
- After the server restarts, all NPC's are in the state they were in before they were hired.
Steps to reproduce the problem
UPDATE: Run latest Minecolonies mod in a dedicated 1.12.2 Forge server.
I have no idea really, I updated the server from 1.12 to 1.12.1 and things were still running as it should, then after a minecolonies update (I didn't take note of which one) the issue presented. The first indication was all the 'workers', still in their respective uniforms, just stood there as if in limbo. Moving the 'world' to the client side and rehiring NPC's proved successful, and upon running with the server maintained their positions, however, hiring new NPC's in the server presents the same issue and once the server restarts, are no longer hired.
I believe this issue may have been resolved. Had newly hired worker, soon after the server crashed (unrelated issues) and upon restart worker maintained position. I have not tested if the same occurs if I just close the server though (clicking X).
@Raycoms did we miss something with the security patch?!?!?!?
I just wonder if it isn't a combination of things? Am I the only one to have this issue? As much as I don't want to, I might have to bite the bullet and create a new world and start over. Please let me know if there is any additional information you require or steps you want me to trial.
UPDATE: I decided to run the world as it was before updating minecraft to 1.12.1 in the updated 1.12.2 server and have the same result. At least we can rule out any of the 'world' data. I wonder if another mod might be slightly incompatible even though they all seem to work in harmony in SP? A 'forge' server jar perhaps? I'm using version 14.23.0.2494
After more testing, if the server is shut down properly state IS being saved. Strange as I have since using forge servers simply closed the window and last state was always saved. This is a problem if the server crashes but I don't believe it is an issue for Minecolonies and suspect something has changed with the forge server itself? Sincere apologies if I have wasted everyone's time. Thank you for all your help with this matter.
Still don't know why workers entered limbo in the first place and needed re-hiring, though that is a separate issue and my colony isn't too big so re-hiring was not a big task.
Workers still not being saved after server restart I'm afraid. I'm pretty sure it was before the barracks update.
I have rebuilt the server and client with only minecolonies and the issue still exists. First I tested with my current world then created a new one. What I noticed is nothing is being saved, I changed the hiring mode in the town hall from automatic to manual and after server restart, mode is back to automatic. In fact it seems that after the server restarts the citizens also respawn, like it goes back to the state the world was in before the last command block was placed. I hope that helps? Remembering in SP everything saves perfectly, it is only with a dedicated server minecolonies changes aren't being saved.
UPDATE: Confirmed, minecolonies changes saved after a command block is placed, after server restart minecolonies resumes from the state before the last command block was placed.
I hope this is what you were asking for.
Not sure if it's the same problem with me, but my brother and I are playing on a LAN world and before the first barracks update, everything worked fine everytime we logged back in.
With the first barracks update, when I tried it in single player, all my workers were unemployed, but this issue was supposedly fixed.
However, with the newest version: minecolonies-universal-1.10.2-0.8.4208.jar, when my brother and I started the LAN world, everyone was unemployed. They kept their workplaces' clothes so it was no problem rehiring them, but some of them lost their xp.
This is how it all started to go bad for me Rosomah, only I use a dedicated server. I thought it was before the barracks update but in all honesty I didn't pay enough attention.
The problem we are facing here, is that what you guys are describing is hard to trace. You are basically telling us, that your colony saved just fine, but the worker configuration did not, which is impossible.
We are currently trying to figure this out. But this will take time. @NuL1F3 you send me a client log (an incomplete one none the less), not a server log. I need the log from the server.
Well before the first barracks update, I never had this issue occur, but after I updated the mod to the first barracks update, all of them were unemployed (single player world).
What is the server log file name and where do I find it? The file I uploaded is from the server log directory and the only one with that much information. The file is also unedited so it is as complete as I can share it.
I suggest you create a new world with the minecolonies version just before the first barracks version and then the barracks one (that's where I encountered the issue) or go straight to the latest version (where me and my brother encountered the issue on a LAN world).