EssentialsX

EssentialsX

2M Downloads

I get THOUSANDS of userdata files created for no reason?

AdminZero opened this issue ยท 18 comments

commented

I get literally THOUSANDS of userdata files with random UUIDs it seems that only have the following data exactly the same but different account names?

npc: true
lastAccountName: theageoforton
money: '0.0'
timestamps:
login: 1451850605833

I have Towny plugin and when i try to look them up with the /resident command they are FOUND as residents but when i try to /seen them it says them have never joined the server?

Is this a towny (or other plugin) problem or is there something i can do to stop this in the ESSENTIALS settings?

commented

Essentials now stores player info by UUID

commented

I know as i stayed that in the post!!!!! I also said that it creates RANDOM UUIDS with that information in the file for no reason... the RANDOM UUIDS are NOT the players uuid HENCE the duplice and uesless files!!!!! why is it creating duplicate userfile with random uuids that only have barely any data saved in it and ALL SAY NPC TRUE.... they not npc si it surely a bug of dome sort!

commented

Hey brother, first of all please take it easy on the caps and the attitude.

Now on to the issue, what you need to know is that these NPC userdata files have UUIDs generated based on the name (specifically the lastAccountName value). So if you're seeing thousands of UUID files that's coming from having different names.

What did you do that caused this to happen all of a sudden? Details matter, what exact commands have you typed so far.

Please respond calmly.

commented

The CAPS are use in a CONTROLLED fashion so your point on that was a waste of typing, and there is no attitude just hate repeating stuff now for the 3rd time it seems!

I understand that the NPC files are created with a RANDOM uuid. I also understand specifically from the lastAccountName value! So the question is WHY or WHAT plugin could be creating this?

I type no commands this is RANDOM and it just generates this files daily! Today i just deleted 1,300 of these files and when i posted this i just deleted like 3,400 previously. The server as NOT been restart/rebooted since this post, and I/nor any mods have any commands what would create any such files.

Here is a list of my plugins you can view from this timings report, if you think some may or may not be compatible.

http://www.spigotmc.org/go/timings?url=14407071

Please don't tell me stuff i already know, if you have a question ask and i will answer, but WHY/WHAT would be generating all these NPC (fake/accounts)?

Thanks

commented

tl;dr extra files are being created. We'll figure out a way to fix.

commented

thanks, let me know if you need more info.

commented

Okay, firstly, I think you should know - putting the occasional word in capitals in no way helps you convey meaning, or increase readability. For me, it's harder to read, because I read capitals in a different way, and it comes across as rude. Capitals are the internet's shout :)

Secondly, it sounds as if Towny is causing this - user files will be created for various things that Towny makes, not just NPCs. User files are also created for towns themselves, for instance. Are you sure that these files that are being created aren't in fact a town or resident or NPC or such?

commented

I've found that occasional use of bold lettering can, in fact, make a difference equal to CONTROLLED capitalizing without the confusion for people like @AdamQpzm who can't read capital letters.

I have nothing positive to add to this ticket, I'm just sleep deprived and find arguing about writing to be fun. Hope you find a fix :)

commented

Are you sure that these files that are being created aren't in fact a town or resident or NPC or such? @AdamQpzm No I have no idea what is creating these "extra" useless files! I was just giving information saying that i could do /res name and towny would give some information and /seen would give none, BUT that is not all cases many times /res and /seen both say "no data found" so i don't know which plugin is causing it BUT AGAIN this seems to be an essentials problem creating random useless files that ALL have NPC in them. That first example i give was one examples but most are very similar!

commented

Can confirm.

Just switched from Spigot Essentials to EssentialsX and noticed that on /ess reload new configuration files being generated for players that have visited the server since either last reload or restart.
Like above these files state that this is an npc and their name is a generated offline UUID.
We also have Citizens 2 running but no idea if this the cause....well as no files being generated by EssentialsX for the actual real NPCs...

Citizens 2.0.16-SNAPSHOT (build 1288)
EssentialsX 2.0.1-b469
Offline-Mode Server behind online-mode Bungeecord

Thanks for reading.
Olaf

commented

@AdminZero If this is still an issue, could you install this test build, run /ess debug then paste the full console output when Creating empty user config messages appear?

@EvilOlaf If your server is offline mode, EssentialsX will use offline-mode UUIDs for userdata files. I believe Towny bypasses Vault and hooks directly into the legacy Essentials Economy API using Register, causing these extra NPC files to be created when the legacy API methods can't find the user in question. The old files are most likely being deleted correctly.

commented

Closing due to lack of response. If this is still a problem, feel free to reopen the issue.

commented

Just a small update.
This also happens without having Citizens running.

[21:27:33] [Thread-481/INFO]: UUID of player Omer_GHG is efa354c1-fc77-4f82-9162-fc1a1eed5ed4
[21:27:33] [pool-37-thread-1/INFO]: Creating empty config file: /home/minecraft/bungeecord/freebuild/plugins/Essentials/userdata/65ce325a-a56d-3a9f-aa0f-f84c84423e3f.yml
[21:27:33] [Server thread/INFO]: [Essentials] Found new UUID for Omer_GHG. Replacing 65ce325a-a56d-3a9f-aa0f-f84c84423e3f with efa354c1-fc77-4f82-9162-fc1a1eed5ed4
[21:27:33] [Server thread/INFO]: Omer_GHG[/x.x.x.x:44049] logged in with entity id 845860 at ([world]2476.5, 105.0, 3236.5)
[21:27:33] [pool-37-thread-1/INFO]: Creating new config file: /home/minecraft/bungeecord/freebuild/plugins/Essentials/userdata/efa354c1-fc77-4f82-9162-fc1a1eed5ed4.yml

Maybe the replace one simply does not get deleted properly?

What's also odd is the fact that the server thread responses the correct UUID of the particular player in first player (yes, I double checked against nameMC), but Essentials seem to generate an offline UUID (or whatever that is) in first place anyways.

As always thank you for taking a look.

Edit:
Wrote a simple shell script to detect and rename all user files containing npc: true.
As always use with caution, no warranty, always backup first.
If you do not know how to use, simple do not.

#!/bin/bash
# Backup your userdata folder first !!! Just in case...

cd ~/minecraft/plugins/Essentials/userdata #Adjust the path so it fit your needs
for i in *; do
npc=$(cat $i|grep "npc: true")
filename=$(echo $i| sed 's/.yml//g')
if [[ -z $npc ]]
then
        echo No NPC
else
        echo NPC, renaming...
        mv $i $filename.npc
fi
done

Actually there were way less npc containing files than I expected. From about 50000 user files only close to 5000 were detected and renamed. So about 10%.
For the example I posted above I could find both real and offline UUID in my user files

$:~/userdata$ ls|grep efa354c1-fc77-4f82-9162-fc1a1eed5ed4
efa354c1-fc77-4f82-9162-fc1a1eed5ed4.yml
$:~/userdata$ ls |grep 65ce325a-a56d-3a9f-aa0f-f84c84423e3f
65ce325a-a56d-3a9f-aa0f-f84c84423e3f.npc
 
commented

@Niko302 Remove other plugins and check if they still generate. Some plugins may create NPCs and register them in Essentials.

commented

@Niko302 Remove other plugins and check if they still generate. Some plugins may create NPCs and register them in Essentials.

is there a way to know which plugins it could be ?

commented

I have this same issue running on 1.16. I still don't know the cause, I deleted userdata files. Deletes files with NPC:true but its still broken.

commented

By removing plugins one by another and check if the issue persists.

commented

Adding to this issue for anyone else who may encounter this. We discovered these files were being recreated because the incorrect UUIDs from the NPC files were also present in usermap.csv, I wrote a script to correct this: https://github.com/diademiemi/mc-essentials-usermapcsv-fixer, hope it can help anyone else facing this problem.