Solved [CoreProtect] Not able to rollback after world change

Discussion in 'Spigot Plugin Help' started by Xeyame, Jun 2, 2017.

  1. After i was forced to change the world name on my server, what is an real pain. I couldn't roll back anything with coreprotect. I have changed the co_world table to take in account the world change. All logs show fine in game, but on rolling back i get this error in the console:
    Code (Text):
    [14:51:25 WARN]: java.lang.NullPointerException
    [14:51:25 WARN]:        at net.coreprotect.database.Lookup$2.run(Lookup.java:1190)
    [14:51:25 WARN]:        at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftTask.run(CraftTask.java:58)
    [14:51:25 WARN]:        at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:356)
    [14:51:25 WARN]:        at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:829)
    [14:51:25 WARN]:        at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:403)
    [14:51:25 WARN]:        at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:763)
    [14:51:25 WARN]:        at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:661)
    [14:51:25 WARN]:        at java.lang.Thread.run(Thread.java:748)
    [14:51:25 INFO]: [CoreProtect] Rollback or restore aborted.
     

    Has anyone any advise, or expirence with doing this?
    Thanks, Probdutch
     
  2. Stacktrace says CoreProtect couldn't find the blocks that it was asked to rollback. Make sure you've changed the world name for all the stored block data as well.
     
  3. Mh, then i need to change all 8 gigabytes of data. Thats a lot, to me it also doesnt make sense to be honest. As it stores blocks like this:
    upload_2017-6-2_15-37-55.png
    Where wid seems to be the world id, refering to this:
    upload_2017-6-2_15-38-37.png
    The value was 1|1|world before. I changed it to s5 (my new world name). Using the inspector does work for all blocks.

    Would there be any other (faster) way to change this all?
     
    #3 Xeyame, Jun 2, 2017
    Last edited: Jun 3, 2017
  4. I didn't know you used SQL?
     
  5. Oh, sorry. I forgot to state that. I thought it would be obvious because i said it was in tables. But well. Sqlite also has tables.
    Sorry for the misunderstanding
     
  6. Intelli

    Supporter

    Did you reboot your server after making the change? And your world folder is named "s5" exactly?
     
  7. yes, i actually did all the changes with the server off. The worlds are exactly s5, s5_nether and s5_the_end
    This is my config file:

    Code (Text):
    #CoreProtect Config

    # If enabled, extra data is displayed when doing rollbacks and restores.
    # If disabled, you can manually trigger it in-game by adding "#verbose"
    # to the end of your rollback statement.
    verbose: true

    # MySQL is optional and not required.
    # If you prefer to use MySQL, enable the following and fill out the fields.
    use-mysql: true
    table-prefix: coS5_
    mysql-host: 127.0.0.1
    mysql-port: 3306
    mysql-database: mc_hermitcraft_co
    mysql-username: mc_hermitcraft_co
    mysql-password: [removed]

    # If enabled, CoreProtect will check for updates when your server starts up.
    # If an update is available, you'll be notified via your server console.
    check-updates: true

    # If enabled, other plugins will be able to utilize the CoreProtect API.
    api-enabled: true

    # If no radius is specified in a rollback or restore, this value will be
    # used as the radius. Set to "0" to disable automatically adding a radius.
    default-radius: 10

    # The maximum radius that can be used in a command. Set to "0" to disable.
    # To run a rollback or restore without a radius, you can use "r:#global".
    max-radius: 100

    # If enabled, items taken from containers (etc) will be included in rollbacks.
    rollback-items: true

    # If enabled, entities, such as killed animals, will be included in rollbacks.
    rollback-entities: true

    # If enabled, generic data, like zombies burning in daylight, won't be logged.
    skip-generic-data: true

    # Logs blocks placed by players.
    block-place: true

    # Logs blocks broken by players.
    block-break: true

    # Logs blocks that break off of other blocks; for example, a sign or torch
    # falling off of a dirt block that a player breaks. This is required for
    # beds/doors to properly rollback.
    natural-break: true

    # Properly track block movement, such as sand or gravel falling.
    block-movement: true

    # Properly track blocks moved by pistons.
    pistons: true

    # Logs blocks that burn up in a fire.
    block-burn: true

    # Logs when a block naturally ignites, such as from fire spreading.
    block-ignite: true

    # Logs explosions, such as TNT and Creepers.
    explosions: true

    # Track when an entity changes a block, such as an Enderman destroying blocks.
    entity-change: true

    # Logs killed entities, such as killed cows and enderman.
    entity-kills: true

    # Logs text on signs. If disabled, signs will be blank when rolled back.
    sign-text: true

    # Logs lava and water sources placed/removed by players who are using buckets.
    buckets: true

    # Logs natural tree leaf decay.
    leaf-decay: true

    # Logs tree growth. Trees are linked to the player who planted the sappling.
    tree-growth: true

    # Logs mushroom growth.
    mushroom-growth: true

    # Logs natural vine growth.
    vine-growth: true

    # Logs when portals such as Nether portals generate naturally.
    portals: true

    # Logs water flow. If water destroys other blocks, such as torches,
    # this allows it to be properly rolled back.
    water-flow: true

    # Logs lava flow. If lava destroys other blocks, such as torches,
    # this allows it to be properly rolled back.
    lava-flow: true

    # Allows liquid to be properly tracked and linked to players.
    # For example, if a player places water which flows and destroys torches,
    # it can all be properly restored by rolling back that single player.
    liquid-tracking: true

    # Track item transactions, such as when a player takes items from a
    # chest, furnace, or dispenser. Necessary for any item based rollbacks.
    item-transactions: true

    # Track player interactions, such as when a player opens a door, presses
    # a button, or opens a chest. Player interactions can't be rolled back.
    player-interactions: true

    # Logs messages that players send in the chat.
    player-messages: true

    # Logs all commands used by players.
    player-commands: true

    # Logs the logins and logouts of players.
    player-sessions: true

    # Logs when a player changes their Minecraft username.
    username-changes: true

    # Logs changes made via the plugin "WorldEdit" if it's in use on your server.
    worldedit: false
     
    As you might see, it is shared with another coreprotect instance on the same database. But just the table- prefix changed.

    These are all the rows in the world table (starting with the S5_ prefix)
    upload_2017-6-3_10-8-1.png
    The blocks are correctly logged to the database with the correct world. If the rollback command gets executed (from ingame chat) It will say the rollback completed. But with 0 changed blocks. Then going over to the console spits out that error. The inspector tool does however say the blocks are rolled back after. Also the user has enough permissions.
    The only way that might work, is dumping all the tables, let it re- create all the data, and import all the logs again. As i have tested it on an blank server, with just the world copied. and no other plugins (same database) and i am having the exact same error.
    Also, little question thats been with me for a while, What does coreprotect do when the Sql server isnt fast enough to complete all the queries. Does sql have like an waiting list, or does coreprotect do that?

    Thanks.


    EDIT: I somehow managed to fix it. There was an temporairy world still in the worlds table. If anyone ever has the same problem, make sure to remove all not (anymore) existing worlds from there.
     
    • Useful Useful x 1