1. Such error occurs and all players gets 101 HP level. Tell me what's wrong?

    wipe levels did not help

    WTF Exception: sql error: NOT NULL constraint failed: Agents.EarnedXp?
    [DOUBLEPOST=1468943734][/DOUBLEPOST]Wolf help me!!!
     

    Attached Files:

    • xp.jpg
      xp.jpg
      File size:
      364.7 KB
      Views:
      70
    Last edited by a moderator: Jul 19, 2016
  2. +1 Exception: sql error: NOT NULL constraint failed: Agents.EarnedXp?

    Anyone help a poor student!!!
     
    Last edited by a moderator: Jul 19, 2016
  3. Last edited by a moderator: Jul 20, 2016
  4. I am confused what would be causing this spam and server lagging...

    Exception: sql error: NOT NULL constraint failed: Agents.EarnedXp
    Exception: sql error: NOT NULL constraint failed: Agents.EarnedXp
    Exception: sql error: NOT NULL constraint failed: Agents.EarnedXp
     
    Last edited by a moderator: Jul 20, 2016
  5. The server returned to the original
    Exception: sql error: NOT NULL constraint failed: Agents.EarnedXp
     
  6. and again the same
     
  7. Wipe global server and ok
     
  8. I took some time looking into the current problem and I was able to track the issue. Still, the reason is unknown for me, but I can assume the XP data is trying to import a NULL value inside the SQL which have a NON NULL policy applied to it. This event is generated on a player connection which throws this particular error inside the Oxide Debug Log:
    Code:
    [Oxide] 20:37 [Debug]   at Rust.Xp.Config.LevelToXp (Int32 level) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Notifier.ReplaceNameFormats (System.String text, .BasePlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Notifier.JoinMessages (.BasePlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Notifier.WebRequestFilter (Int32 code, System.String response, .BasePlayer player, Boolean joined) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Notifier+<InitializePlayer>c__AnonStorey0.<>m__0 (Int32 code, System.String response) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.WebRequests+WebRequest.<OnComplete>m__1 () [0x00000] in <filename unknown>:0
    However, solving the issue is not that hard. All you need is SQL Lite Browser which allows you to change quickly and easy the NON Null policy of importing into your server XP SQL data. Here are a few simple steps how you can solve the error spam without the need to wipe.

    1. Download and Install SQL Lite Browser
    2. Extract your xp.db file from your server folder to a local directory (Some servers may have xp2.db, xp3.db, xp4.db and so on. Use the latest xp.db number you have) img.jpg
    3. Open SQL Lite Browser and press the button Open Database and navigate to your xp.db file img.jpg
    4. Once the file is loaded, you will see a label called Tables (2), click on it and 2 drop down categories will appear Agents and XpValues img.jpg
    5. Right click on Agents then Modify Table... After that a dialog will appear with 3 names AgentId, EarnedXp and SpentXp. Untick EarnedXp and SpentXp and then press OK img.jpg
    6. Do the same with next table XpValues, but there make sure you Untick ValueId and Total
    7. After you are done press CTR + S to save all the changes so far
    8. Shut down your server and upload the new file you just edited
    9. Enjoy, no more spikes from spamming error!
    Conclusion: This method is not a solution to the current problem. Your SQL data is most likely to be filled up with NULL values from time to time, however you will no longer experience a problem with this kind of error.

    Hopefully this will help the people in need. Cheers. :p
     
    Last edited by a moderator: Jul 24, 2016
  9. Is there any news on the root cause of this issue?

    My server's pretty wrecked right now over the head of it.
    Sure, A wipe might sort it out but this has happened a few times now. I'd rather find out the cause and stop it, if possible.

    Thanks for the info above! :)
     
  10. Happening to me again. It happened last cycle and I used that sql browser to edit xp and after few days xp started to go crazy sending all players to lvl 101 and negative xp. I barely managed to make it by using xp manager and this cycle it is all over again. What can I do?
     
  11. I stopped using XPManager before the the wipe and haven't seen this problem yet.
    I'll keep XPManager off the server and report back if it happens again.

    Unfortunately I was in the same boat as you.
    All I could do was stop the server, allow nulls (to stop console spam), and manually set people's levels when they complained.
     
  12. Thing is that I am not even using xp manager. that spam came just randomly. It has stopped now after a restart but we will see how it will go.
     
  13. Oh, that's a shame....
    Did you wipe XP and player stats last Thursday with the forced wipe?
     
  14. Yes. both times it was after fresh wipe. Today server restart was good enough to stop it but last time it was strange. Maybe I need more frequent restarts we will see.
     
  15. Yeah it happened again. I don't know what is happening. I don't even use any plugins that would mess with xp it just randomly happens.
     
  16. I am also experiencing this issue. I don't run any XP specific plugins. This was not present last evening and nothing has changed. But I did not wipe xp or stats.
     
  17. 1) Download DB Browser for SQLite
    2) Shutdown your server
    3) open with DB Browser: rust_dedicated/server/your_server_identity/xp4.db
    4) Go to Execute SQL
    5) write this: DELETE from XpValues
    6) Press the "play" button (execute the command basically)
    It will say that the request was executed
    7) Save the modifications
    8 Start your server
    [DOUBLEPOST=1477437637][/DOUBLEPOST]This will NOT wipe the statistics, it will just wipe a useless database that stores all the reasons why players got XP. This database is NEVER used to get values from it, so 100% useless
    BUT it's always this database that bugs, so yeah ... wipe it as much as you want.
    If you are scared of doing it, just copy your xp4.db to another name to have a backup just in case.