Multiverse / Multiverse-Adventure

Provides Adventure-Support for Multiverse
18 stars 15 forks source link

Error resetting world #30

Open ghost opened 12 years ago

ghost commented 12 years ago

Hello!

Whenever i try to reset a map it fails to delete the world, leaving it unloaded until i restart the server. Is this a known issue?

It works after a server restart to reset the map, but after a while it fails to do so.

See also: https://github.com/Multiverse/Multiverse-Adventure/issues/22 https://github.com/Multiverse/Multiverse-Adventure/issues/23

I also recieve this message posted in this issue when using MineBackup: https://github.com/Multiverse/Multiverse-Adventure/issues/26

Specs: Multiverse-Adventure 2.4 Build #547 CraftBukkit version git-Bukkit-1.2.5-R1.3-13-g7ab0391-b2190jnks (MC: 1.2.5) Bukkit API version 1.2.5-R2.0 MineBackup v5.9.3 MultiInv v3.0.6 WorldEdit v5.3 AuthMe v2.6.5 Nordic v0.2.0 SkylandsPlus v0.12 TimeLock v0.3 bSpace vv2.2 Multiverse-Core v2.4-b527 WorldGuard v5.5.2 CleanroomGenerator v1.0.0 dynmap v0.38-1138 Multiverse-Portals v2.4-b548 VanishNoPacket v3.9.1

Config.yml: adventure: adv: enabled: true template: NAME.template activationdelay: 10 resetdelay: 10 resetonrestart: true resetwhenempty: true cronresetschedule: ''

Server.log: 2012-05-22 21:13:02 [INFO] [Multiverse-Adventure] Beginning reset of world 'adv'... 2012-05-22 21:13:10 [INFO] [Multiverse-Core] World 'adv' was unloaded from memory. 2012-05-22 21:13:10 [SEVERE] [Multiverse-Adventure] Couldn't delete a world!

Debug.log: 2012-05-22 21:13:02 [INFO] [Multiverse-Adventure] Beginning reset of world 'adv'... 2012-05-22 21:13:10 [ALLVARLIG] [Multiverse-Adventure] Couldn't delete a world!

dumptruckman commented 12 years ago

Yes, this is a known issue. Unfortunately I see no way to fix it. What's happening is that when Multiverse-Adventure tells Java to delete the world folder, Java is unable to do so due to SOMETHING having an open file lock on some of the files. The problem is that it's not possible to tell what is locking the files or to tell Java to remove those locks.

ghost commented 12 years ago

What about http://docs.oracle.com/javase/1.4.2/docs/api/java/nio/channels/FileLock.html

fernferret commented 12 years ago

What about http://docs.oracle.com/javase/1.4.2/docs/api/java/nio/channels/FileLock.html

No. This is for dealing with the FileChannel class. What @dumptruckman is saying, is that the file is being held open (Most likely MineBackup). Java doesn't have permission to override that lock, unless you are running as the root user, but never do that.

My theory: MineBackup should watch for the world to be unloaded (via WorldListener) and it should close the file. No more changes are being made, no more backups needed. Then we could delete it. But that's just a theory.

TheMerciless commented 11 years ago

Im also getting this error. I see its been an issue for a while now, just wondering if u found a solution. tho i guess not as im getting the error. Hate to ask but does know anyone of a similar plugin i can use or a way around this.

EMOberger commented 11 years ago

For me it's just having a problem deleting some spout files in the spout_meta folder.

anyway you could set it so it will only delete the files within the .template folder?