Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database scrambled AGAIN! #1556

Closed
kFxDaKing opened this issue Oct 29, 2020 · 18 comments
Closed

Database scrambled AGAIN! #1556

kFxDaKing opened this issue Oct 29, 2020 · 18 comments
Assignees
Labels
Status: Done This issue has been completed or answered. This pull request has been merged.

Comments

@kFxDaKing
Copy link

Description

Describe the bug

Server crashed(Lagged out to 9 tps) and after server reboot there is tons of players that lost their island, mined blocks, levels, ob homes etc.
/ob commands created new ob for them.
It broke my whole server, since i have 80-120 players online it SO BIG problem...
What should i do now?

Steps to reproduce the behavior

Not sure, have some online players with islands on server, then crash a server somehow.
Im using MARIADB

Expected behavior

Fix?

Screenshots and videos (Optional)

Thats how my db looks again, no idea why it looks like that.
https://cdn.discordapp.com/attachments/310623455462686720/771441930474487858/unknown.png

Environment

Output of /bbox version (Mandatory)
>....�=>.... [20:58:49 INFO]: Běžím na Neplatné (YATOPIA) 1.16.3. (Its spigot fork, and it happens on spigot too)
>.... [20:58:49 INFO]: Verze BentoBox: 1.15.1
>.... [20:58:49 INFO]: Databáze: MARIADB
>.... [20:58:49 INFO]: Načtené herní světy:
>.... [20:58:49 INFO]: oneblock_world (OneBlock): Svět, Nether*, End*
>.... [20:58:49 INFO]: Načtené doplňky:
>.... [20:58:49 INFO]: AOneBlock 1.4.0 (ENABLED)
>.... [20:58:49 INFO]: Border 2.0.0 (ENABLED)
>.... [20:58:49 INFO]: Chat 1.0.5 (ENABLED)
>.... [20:58:49 INFO]: Level 2.4.1 (ENABLED)
>.... [20:58:49 INFO]: Warps 1.10.0 (ENABLED)

Plugins (Optional)

>....�=>.... [20:59:52 INFO]: Plugins (64): AutoMessage, AutoTool, BentoBox, BlockCommand*, BlockParticles, Citizens, ClearLag, CombatLogX, CommandNPC*, CoreProtect, CrazyAuctions, CrazyCrates, CrazyEnchantments, CrazyEnvoy, DeluxeMenus, DeluxeTags*, DisableJoinMessage*, EasyBackup, EntityDetection, EpicChatPrefix*, EpicSpawners, Essentials, EssentialsGeoIP, EssentialsSpawn, (WorldEdit)FastAsyncWorldEdit, HolographicDisplays, HolographicExtension, HolographicPlaceholders, Item2Chat, ItemFrameTagger*, JetsMinions, JetsSellChests, LoginSecurity*, LuckPerms, MineStore*, Minetrends*, MobFarmManager, Multiverse-Core, NametagEdit*, NoFlyZone, NoPlugins, PlaceholderAPI, Plan, PluginManager*, ProtocolLib, RevoltCrates, SAML, ShopGUIPlus, SkinsRestorer, spark, SuperBoosters, SuperbVote, SuperMobCoins, SuperPouches, TAB, TitleManager, Vault, VillagerLobotomizatorNator, VillagerOptimiser, VoidSpawn, VoidWorld*, VoteParty, Votifier, WorldGuard

Additional context (Optional)

Here is some logs, but i cant see nothing in that logs..
Server lagged out, so admin had to restart it, after restart it was scrambled..
https://dropmefiles.com/W7RA2 --LOGS
https://dropmefiles.com/HJt4i -- DATABASE BACKUPS

@kFxDaKing
Copy link
Author

In older databases you can see there is less tables..

@YellowZaki
Copy link
Contributor

Could you show your "backup-period" value on BentoBox config?

image

@BONNe
Copy link
Member

BONNe commented Oct 30, 2020

The issue is that it somehow wrote NULL values in the database.

@kFxDaKing
Copy link
Author

image

@kFxDaKing
Copy link
Author

Players are also reporting that they are rollbacking after every restart restart.

There is save before every restart.

They are reporting that they are losing ob level, phase, mined blocks etc..

@tastybento tastybento self-assigned this Oct 31, 2020
@tastybento tastybento added the Status: Under investigation Investigating the interest and the feasability of the issue. label Oct 31, 2020
@tastybento
Copy link
Member

tastybento commented Oct 31, 2020

@kFxDaKing I downloaded your database files and I opened the most recent one mc_oneblock202010292050 and imported it to MariaDB and ran my server and it all works fine. I can teleport to different coordinates and see player's islands. I also looked through the tables and all the data seems to be there. Was there a particular date that I need to look at?

There is a minor issue on start up - the Warps tables are duplicated (the older ones have the long names), but that should not affect anything else.

The log file link you shared does not work.

Are you running the server online or offline? Sometimes with situations like this, it's caused by online/offline mode changes so the player UUIDs change and all the islands become unowned.

@BONNe

The issue is that it somehow wrote NULL values in the database.

I cannot see evidence of that. Can you point to a database file that shows that? All the data appears to be in the tables I've checked so far (but there are a lot of them).

@kFxDaKing
Copy link
Author

Hello, there is my latest database, and for example player "natiix" is experiencing these problems:
(he is on island where no one else has any rights)

  • the number of deaths in the / ob level is different than in the right panel (placeholder)
  • the / ob team trust ... and / ob team invite ... team commands throw this error (Your rank is not high enough to do that)
  • on block 1975 "(it still shows the same value, no matter how many blocks he extract) but the real phase is a long time ago" jungle
  • Its showing him wrong level of island (looks like its taking info from another island?)

There is much more players that are reporting same or similar problems, for example they cant do anything in ob settings as owners.
It looks like there is "rollback of ob stats" every server restart..

latest.zip

@kFxDaKing
Copy link
Author

1 More example:
Player Malina3333 is owner of his island

Now he want to kick player Charlie_009 via command /ob team kick Charlie_009
So he write /ob team kick Charlie_009 and again in 10 seconds, then he check /ob team and the player is still there, its not possible to kick him from that island.

@kFxDaKing
Copy link
Author

kFxDaKing commented Nov 1, 2020

Hello, there is my latest database, and for example player "natiix" is experiencing these problems:
(he is on island where no one else has any rights)

  • the number of deaths in the / ob level is different than in the right panel (placeholder)
  • the / ob team trust ... and / ob team invite ... team commands throw this error (Your rank is not high enough to do that)
  • on block 1975 "(it still shows the same value, no matter how many blocks he extract) but the real phase is a long time ago" jungle
  • Its showing him wrong level of island (looks like its taking info from another island?)

There is much more players that are reporting same or similar problems, for example they cant do anything in ob settings as owners.
It looks like there is "rollback of ob stats" every server restart..

latest.zip

I found, that he was member of 2 islands, owner of his island and member of another.

So i kicked him from another island and now when he do /ob it create new island for him.

/ob info on his islands gives this
image

/ob info natiix gives error that he dont have any island.

Unregister/register
https://streamable.com/dgi2y3

@tastybento
Copy link
Member

tastybento commented Nov 2, 2020

You have a few islands where players are members of more than one island and even one island that has two owners. I do not know how that happened. I can only think of maybe the promote command being used, but it should not be possible. Anyway, I have made an admin command that will fix the database. You will need the SNAPSHOT build of BentoBox Build 1896 or later. After loading run the command: /oba fix or in the console oba fix. You will see this output similar to this:

> oba fix
[17:25:14 INFO]: Scanning database...
[17:25:15 INFO]: Player natiix is a member of more than one island in the database
[17:25:15 INFO]: Member on island at -8800,80,24800
[17:25:15 INFO]: Owner on island at 24000,80,-12000
[17:25:15 INFO]: Member on island at -20000,80,-25600
[17:25:15 INFO]: Player Charlie_009 is a member of more than one island in the database
[17:25:15 INFO]: Member on island at 21600,80,11200
[17:25:15 INFO]: Sub-Owner on island at -3200,80,24800
[17:25:15 INFO]: Player domga is a member of more than one island in the database
[17:25:15 INFO]: Owner on island at -7200,80,-16000
[17:25:15 INFO]: Sub-Owner on island at -22400,80,7200
[17:25:15 INFO]: Player Kubator007 is a member of more than one island in the database
[17:25:15 INFO]: Owner on island at -7200,80,-16000
[17:25:15 INFO]: Sub-Owner on island at 21600,80,11200
[17:25:15 INFO]: Scan completed
[17:25:15 INFO]: Fixed
[17:25:15 INFO]: Fixed
[17:25:15 INFO]: Fixed
[17:25:15 INFO]: Fixed
[17:25:15 INFO]: Fixed
> oba fix
[17:25:18 INFO]: Scanning database...
[17:25:19 INFO]: Scan completed

This will fix the database. I recommend you immediately shutdown and restart to make sure everything is in-sync.

If you spot weirdness again, try this command and see if it fixes anything. I would like to know why this is happening. I did notice that some of the players have ranks of sub-owner, but I do not know if this is related or not.

@kFxDaKing
Copy link
Author

kFxDaKing commented Nov 2, 2020

1 more thing, for 1st time i tried to fix that manualy in database, so i deleted player "natiix" from another islands, and it seems to be okay, now he can do everything.

But after that a lot of players reproted me that they lost their phase and destroyed blocks count, i have no idea how can this happend.

I didnt touch anything about phases and blocks, all i did was deleting "natiix" from other islands then his own, and setting his home location, and world.bentobox.aoneblock.dataobjects databases. (Server was offline, when i touch db)

Short list of players that reported it(there is much more players that got this problem):
Botydoro, natiix, Ameky, marble352, Revealer, 36kuba, novip, McBasic__, minirybak

Thats current db:
latest1.zip

@kFxDaKing
Copy link
Author

As i said i deleted these databases, and they are creating again..
image

@tastybento
Copy link
Member

As i said i deleted these databases, and they are creating again..

image

Why did you delete that table? That is where the OneBlock data is stored. That is why people are complaining that their block counts and phases are being reset.

@kFxDaKing
Copy link
Author

Becouse its erroring, something like world.bentobox.aoneblock.xxx could not rename, database name already exist

@kFxDaKing
Copy link
Author

I kept just those tables
image

@andris155
Copy link
Contributor

andris155 commented Nov 4, 2020

@tastybento /acid fix not work on my server.
https://pastebin.com/ekWzEePv

@tastybento
Copy link
Member

@andris155 Make a new bug report.

@tastybento
Copy link
Member

Becouse its erroring, something like world.bentobox.aoneblock.xxx could not rename, database name already exist

Don't delete the table. That is where your player data is stored for AOneBlock.

I recommend you try the latest AOneBlock build. Then if you see any errors report them in a new bug report. I'm going to close and lock this one now because the original issue is addressed.

@BentoBoxWorld BentoBoxWorld locked and limited conversation to collaborators Nov 4, 2020
@tastybento tastybento added Status: Done This issue has been completed or answered. This pull request has been merged. and removed Status: In progress Working on the issue. Status: Under investigation Investigating the interest and the feasability of the issue. labels Nov 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Status: Done This issue has been completed or answered. This pull request has been merged.
Projects
None yet
Development

No branches or pull requests

5 participants