SF Machines randomly stop working
tgmm82 opened this issue · 37 comments
❗ Checklist
- I am using the official english version of Slimefun and did not modify the jar.
- I am using an up to date "DEV" (not "RC") version of Slimefun.
- I am aware that issues related to Slimefun addons need to be reported on their bug trackers and not here.
- I searched for similar open issues and could not find an existing bug report on this.
📍 Description
My SF machines randomly stop working for no apparent reason, it seems to be only Electric Smelters, however I am pretty sure at least one Electric Grinder also had this happen. I cannot reproduce the issue and I am not sure why it is happening. Server restart does not fix the broken machines, the only thing I can do is break them and replace them. When I break/replace the machines work fine. It is not a power issue as I have 4 nuclear reactors going with significant ample power available. The image is just one example, this should be crafting Corinthian Bronze, and it was and worked fine. Noticed another machine was low on Corinthian and check on this one and it was not working. This has happened with every single one of my smelters multiple times, I cannot figure out what I am doing wrong if I am, I think it is a bug.
📑 Reproduction Steps
- Place Electric Smelter and connect it with Cargo nodes and Power
- Run Smelter correctly
- Check back later and machine is not working
💡 Expected Behavior
I expect the machine to just always work when there are materials it needs for it to process.
📷 Screenshots / Videos
No response
📜 Server Log
No response
📂 /error-reports/
folder
No response
💻 Server Software
Paper
🎮 Minecraft Version
1.19.x
⭐ Slimefun version
Slimefun4-32
🧭 Other plugins
No response
I am using an up to date "DEV" (not "RC") version of Slimefun.
"Slimefun-32" is not latest dev. Also we really need as much info as possible, with this report it's very hard to action anything.
What's the block data? Do you get warnings/errors on startup relating to these blocks? What happened before this? Do you have any protection plugins that could do something here?
Please run the latest DEV and if it happens agakn, reopen this with more information.
Thanks
I am restarting now with the latest dev build, Slimefun4 - #1023. It may take some time before it repeats itself, I will report back if it does. There are no warnings errors at all related to these blocks, I checked through my log and saw nothing. How do I determine the block data?
It is still happening, my smelteries just stop working. I am running the latest dev version, I installed it yesterday. I broke the broken smelteries yesterday and let them run. Now today I checked on some and some are still workign fine but others are not. I can break and replace them and they run fine. There does not seem to be a reason for why they are breaking. I do not know how to check the block data, but, there are no errors showing up in the log. I do have protection plugins running, I am not sure how I would be able to tell if they are doing anything to the blocks though. It is only happening with Smelteries (aside from maybe one grinder but I have not had any other grinders do it). Also I notice it is only happening with Smeltery 2 and 3, not tier 1.
I upgraded my smelteries a week or so ago and that is when I noticed the issue happening. I was running tier one smelteries for weeks prior. Do the higher tiers have some sort of additional requirement I may be overlooking? Power is not an issue, nor is storage. Even if storage was some sort of hold up I am not seeing anything in the output slot of the smeltery. Normally when there is nowhere for the output to go the output slot still fills up before the machine stops working. Either way, there is plenty of storage and power, and when I break replace the work as they should.
Power I am certain is green and has been green, I intentionally ran a fourth reactor to over do it to make sure.
BUT I am a fool and had the wrong server log open when I checked for issues with the smeltery. I do have several errors referencing the smeltery but I cannot figure out what is causing them.
here is my recent log: https://pastebin.com/UqQipBbd
Here is /sf version info:
This Server uses the following setup of Slimefun:
Paper git-Paper-51 (MC: 1.19)
Slimefun DEV - 1023 (git 6da39af)
Metrics-Module #28
Java 18
Installed Addons: (28)
Networks vDEV - 38 (git 7e7505cb)
ExtraTools vDEV - 36 (git 922c0324)
AureliumSkills vBeta 1.3.6
FoxyMachines vDEV - 58 (git c2c2b8a7)
DynaTech vDEV - 166 (git 92c8d415)
ExtraGear vDEV - 13 (git c62047e2)
Supreme vDEV - 8 (git 986d95c5)
InfinityExpansion vDEV - 140 (git 0098d2fb)
CMILib v1.2.1.2
ElectricSpawners vDEV - 23 (git 6ec96773)
EMC2 vDEV - 11 (git 89b4400a)
VillagerUtil vDEV - 1 (git 0a949b19)
MobCapturer vDEV - 17 (git c21b00a5)
SlimyTreeTaps vDEV - 20 (git 963f0383)
SlimeTinker vDEV - 77 (git 99a520b9)
ColoredEnderChests vDEV - 23 (git 4d041832)
Galactifun vDEV - 63 (git 364ecbf5)
FluffyMachines vDEV - 121 (git efca037f)
CMI v9.2.1.1
EcoPower vDEV - 5 (git 5c1ecd68)
SlimefunLuckyBlocks vDEV - 36 (git 60f0c8dc)
ExoticGarden vDEV - 78 (git 7f9a5f63)
DankTech2 vDEV - 8 (git f2a8ab1f)
LiteXpansion vDEV - 180 (git d574b154)
SimpleUtils vDEV - 15 (git 4250fd5e)
SoulJars vDEV - 23 (git b8358a1f)
SimpleStorage vDEV - 10 (git ea5e5637)
PotionExpansion vDEV - 5 (git e2cfcd8a)
Here are my plugins: Plugins (112): AcceptTheRules, AFKPlus, ArmedArmorStands, AsyncWorldEdit, AureliumSkills, AutoSellerChest, BankPlus, BannerMaker, BetterRTP, BigDoors, BlocksHub, BossShopPro, CasinoPlugin, ClearLag, CMI, CMILib, ColoredEnderChests, CompatNoCheatPlus*, CoreProtect, CustomPolls*, CustomRecipeAPI, DankTech2, DeepStoragePlus, DeluxeMenus, DiscordSRV, DynaTech, dynmap, EconomyShopGUI, EcoPower, ElectricSpawners, EliteMobs, EMC2, EternalLight, ExecutableItems, ExoticGarden, ExtraGear, ExtraTools, FastAsyncWorldEdit (WorldEdit), FastChunkPregenerator, floodgate, FluffyMachines, FoxyMachines, Galactifun, HolographicDisplays, InfinityExpansion, InteractiveBooks, IronElevators, Jobs, KeepChunks, LevelledMobs, LibsDisguises, LimitPillagers, LiteXpansion, LootCrate, Lottery, LuckPerms, Magic, Minepacks, MineTinker, MobArena, MobCapturer, MobGrinder, MobsToEggs, MoreArmour, MultiChat*, Multiverse-Core, Multiverse-Inventories, Multiverse-NetherPortals, Multiverse-Portals, Multiverse-SignPortals, MyCommand, NBTAPI, Networks, NoCheatPlus, OnePlayerSleep*, OpenInv, PaintballBattle, Parkour, PlaceholderAPI, PlayerWarps, PotionExpansion, ProtocolLib, PvPManager, Quests, QuickShop, SaveRodOfficial*, SCore, SimplePortals, SimpleStorage, SimpleUtils, Slimefun, SlimefunLuckyBlocks, SlimeTinker, SlimyTreeTaps, SoulJars, spark, Supreme, Towny, TownyChat, TreeAssist, UpgradeableSpawners, Vault, VeinMiner, ViaBackwards, ViaVersion, VillagerUtil, VoidGen, WildChests, WildLoaders, WildTools, WorldGuard, XPShop*
you have an insane amount of problems in your logs. I'm going to let a dev try to figure this out.
please provide the full /sf versions, and your /pl. also have you verified that at the time the machines stopped, your power regulator was in the green? it seems yours is the only one having this issue.
just quick sidenote, please remove GeneticChickengineering, it's abandoned, it is possible that can caused the problem.
same with SMG, or you can download updated SMG here
There errors I had in the log were from SlimeTinker smeltery and not the electric smeltery I have had issues with. I removed SlimeTinker to check and now there are no smeltery references in my logs. I have also discovered this issue with an electric press. Also my network grabber and pusher do not recognize it as a machine, it shows a player head. Similarly the smelteries just dont show up for the network items when they are broken.
Here is my most recent log:
https://pastebin.com/CAkaAHDq
There errors I had in the log were from SlimeTinker smeltery and not the electric smeltery I have had issues with. I removed SlimeTinker to check and now there are no smeltery references in my logs. I have also discovered this issue with an electric press. Also my network grabber and pusher do not recognize it as a machine, it shows a player head. Similarly the smelteries just dont show up for the network items when they are broken.
Here is my most recent log: https://pastebin.com/CAkaAHDq
the log you posted is a link to the slimefun github roadmap, not your serverlog
i'd check your storages to see if the counts are going up. quite frequently networks pulls items before they even appear in your machines.
I am still having problems, indeed more than I realized. I must have a plugin conflict. Not only do I still have smelteries breaking but I also have more issues. Many machines are actually reverting to their vanilla block. I have had ingot factories, dust washers, and gold pans all turn to their vanilla counterpart.
It is strange as I have had this server going since April with no issues. But a couple weeks ago I upgraded the server to 1.19. That is the only real change I have made and I think that must be where things went wrong. But I have no clue what could be causing this.
Do any of you have any idea how to figure out what may be doing this? As stated, I have a lot of plugins. I can try to start the server one plugin at a time, but, the problem aside from massive down time is the fact that the breaking does not happen on server startup, it happens at random points in time throughout gameplay.
I have broken and replaced items to have them break again only a few minutes later to hours later. When I restart nothing changes, nothing broken works and nothing that worked prior to restart becomes broken.
In this recent log I do see errors referencing several slimefun machines, all with a similar refernce of [Craft Scheduler Thread - 886 - Slimefun/ERROR]: [Slimefun] An Error occurred while copying a temporary File for Slimefun DEV - 1026
This log was too large so it is in two files:
https://pastebin.com/knrg6jMu
https://pastebin.com/XgRGKuTF
you're running in offline mode. we can't support cracked servers
you also have 2 jars for simple storage in your plugins folder.
the error seems to be tied to the file being locked by your operating system
Have you seen an error like:
An Error occurred while copying a temporary File for Slimefun DEV x
AccessDeniedException: data-storage/Slimefun/stored-blocks/world/BLOCK.sfb.tmp -> data-storage/Slimefun/stored-blocks/world/BLOCK.sfb
This is usually caused by 2 things:
- File lock - Another process is accessing the file and therefore has a "lock" on it, this means we can't modify it
- File permissions - You have incorrect file permissions
How to fix?
Go into the folder specified (in this case data-storage/Slimefun/world) and rename BLOCK.sfb.tmp to BLOCK.sfb. Override the existing file and boom. The updated file is there
If you get an error, this is likely due to file permissions so you would need to fix that first
?windows-file-access | Triggered by BOOMER_1#2608
Yes that error does appear in the log, I checked the folder specified in the log, I only have .sfb files and none are .sfb.tmp
Would this imply I have something locking the file? Would this be something with my computer or another plugin perhaps?
It is not a cracked server, I have a bungee network and this particular server is the only one running slimefun, it needs to be in offline mode for Bungee network to work right. I promise, it is not cracked!
Simple storage I just updated and forgot to remove the old jar, I did this today but I will remove the redundant file anyway.
Would this imply I have something locking the file? Would this be something with my computer or another plugin perhaps?
Yes, most likely Windows just being locking stuff up for anti virus or such and creating dead locks making Slimefun can't access those files.
Yesterday I restarted my PC, when I did this there were no slimefun error in my log after getting my server back online. I do not restart the PC often, I do believe it was the culprit (windows). All day yesterday everything ran great, I had no issues with any machines all day.
I have my server do a scheduled restart every night. This morning I come on to check on everything and I have multiple machines broken again and in the logs errors are back (same references as last set of errors). My thought here is that when the server restarted whatever was getting in the way before re-took permissions or some file, or similar within windows, and thus brought the error back.
How can I figure out what is happening here? How can I figure out what my PC is doing to stop Slimefun from working?
If it means anything I use MC Server software to manage the servers, schedule restarts, etc. I have been using this though since April with none of these issues.
Walshy, what if the server were given higher priority in the windows task manager? would that allow the file access to take control back from whatever is locking it?
Will do! First load on restart and all is well, the machines that reverted prior to error are still the vanilla counterpart but I am not surprised at that, I figure that damage has been done. But no more errors in log. Hopefully the elevated permissions did the trick.
Walshy and i did some research and created a tag for this.
Have you seen an error like:
An Error occurred while copying a temporary File for Slimefun DEV x
AccessDeniedException: data-storage/Slimefun/stored-blocks/world/BLOCK.sfb.tmp -> data-storage/Slimefun/stored-blocks/world/BLOCK.sfb
This is usually caused by 2 things:
- File lock - Another process is accessing the file and therefore has a "lock" on it, this means we can't modify it
- File permissions - You have incorrect file permissions
What you want to do is give the server folder higher permissions on Windows. Make the system the owner of it.
Thank you all for such quick replies! I never thought of changing the priority in Windows. I just elevated the priority, going to do a full restart now. I think you are correct on what is going on, I am hopeful this is a fix. The errors seem to take time to occur, it may be until tomorrow before I know one way or the other. Thank you again all.
Feel free to ping me on discord if you have that i could help you resolve it. Its 100% based around the file lock / permissions of windows
the raising the priority of the server was a complete guess. If panda has suggestions, he's the expert. I'd go with his ideas first.
No clue if priority helps, I doubt it. Things like Defender run under SYSTEM which is just king of all.
Running servers on Windows is... fun. I'd really recommend buying a VPS or using an existing hosting provider.
You could try to check the event log but I have no clue if Windows logs that... @J3fftw1 may know. Would be nice to get the process which locked the file (or determine better what the problem is) but the WinAPI is not great here.
I am not sure how to check windows event logs but I am sure I can figure it out. So far though I have had no issues since I increased the priority. I have done a restart to try to replicate the error prior and it did not recur. I am not complaining :) If it recurs I will cross the bridge then. My PC is really my only option, it is just a small server with my kids and students I teach. So far it has done great, with exception for this issue.
I am not sure how to check windows event logs but I am sure I can figure it out.
Windows key + r, Type EVENTVWR then hit okay.
Update, this is more or less for anyone else that has this issue. Everything was fine yesterday, managed through several manual restarts without issue. This morning I check on it and once again the error occurred. I am pretty confident the issue is with MC Server Soft with the scheduled restart every night. After closing MC Server Soft and reopening it and launching my servers, the error goes away.
I will no longer use a scheduled restart with MC Server as it is not that important for me to make it work right. If I have the issue occur again after disabling the scheduled I will report back, but, for now, I will consider this issue resolved. The only thing with this that has me pause is that the issue has not always been there, seemingly only since I updated my server to 1.19.
are you sure? It is the only thing that lines up with my error taking place. The only time the error which causes the permission issue has happened only when using the scheduled restart. It seems like an odd coincidence otherwise. Is it not possible something with windows is providing a perm conflict during that scheduled restart? I genuinely dont know, way above my understanding on how things work.
No your file is getting locked cuz of windows. Windows isnt super good at restarting files. If a different program(java in this case) is still using the file its getting locked.
I am cormoo on Discord, trying to message you but it wont let me as we are not "friends". My hopeful fix regarding MC Server Soft did not take. I am indeed still getting issues. Any ideas what I can do to resolve this more?