Whitelisted players kicked out of server with "not whitelisted" error, when game server performs "Reloading Userlist whitelist.txt"

Nitrado now has an official Discord server to bring communities, friends and other gamers together!
Join the Nitrado Community Discord now and share your experiences and knowledge with others!

Click here to go to the Discord Server!
  • Hi, since quite a while we have been having an annoying issue with our DayZ PS server: every now and then, at intervals that seem random, all players are kicked out of the server with a "not whitelisted" error.


    For context, I have a custom discord bot that updates the whitelist automatically using the Nitrado's REST API. The whitelist is compiled as follows:

    1. Usernames are checked to be matching the expected PSN id format (with a regex)

    2. Each username is on a single line, ending with \n

    3. Usernames are checked to ensure that they match 100% the PSN id (including the letter case)


    The kicks happen quite often (like every 30m-1h), and they seem unrelated to any of the following events:

    - number of players online

    - whitelist changes (i.e., they happen even if the rest api is never called)


    The only thing that is consistent is that the line "Reloading Userlist whitelist.txt" appears in the RPT logs everytime right before the kicking starts (so the whitelist reloading is causing the issue).


    For example, this is the RPT log sequence when the kicking happens:

    Code
    1. 19:36:46.757 Reloading Userlist ban.txt
    2. 19:36:46.757 Reloading Userlist whitelist.txt
    3. 19:36:46.757 Player <hidden1> (<hidden1>) kicked from server: 12 (You are not whitelisted on this server.)
    4. 19:36:46.757 Player <hidden2> (<hidden2>) kicked from server: 12 (You are not whitelisted on this server.)
    5. 19:36:46.757 [Disconnect]: Client <hidden1> early disconnect
    6. 19:36:46.757 [Disconnect]: Client <hidden2> early disconnect
    7. 19:36:46.773 Reloading Userlist whitelist.txt
    8. 19:36:46.773 [Disconnect]: Start script disconnect <hidden1> (dbCharacterId 1 dbPlayerId 1) logoutTime 5
    9. 19:36:46.773 [Disconnect]: Start script disconnect <hidden2> (dbCharacterId 31 dbPlayerId 31) logoutTime 5

    Whereas this is the log output when the kicking does not happen after Realoading Userlist:

    Code
    1.  19:15:11.347 Reloading Userlist whitelist.txt
    2. 19:15:24.157 [CE][LootRespawner] (PRIDummy) :: [RESPAWN CANDIDATE] Bandana_RedPattern missing:2 [cnt:2, nom:4, min:2]
    3. 19:15:24.157 Adding Bandana_RedPattern at [6013,3292]
    4. 19:15:24.157 Adding Bandana_RedPattern at [6757,2675]
    5. 19:15:24.157 [CE][LootRespawner] (PRIDummy) :: Bandana_RedPattern respawned:2, tests:2 missing:0

    (Which show that the realoading happens but players are not kicked)


    The issue seems to get worse on weekends, but this might be just a feeling.

    We run the server in Frankfurt, with a small regular base of 3-4 players online together.

    Any ideas how to address the problem?

  • We are still experiencing the problem on my server, so I went full on debugging.
    Background: I am rebooting my server every 2h using a bot that calls "restart" from the REST API.

    I collect all the RPT logs over time, and monitored the periodicity at which the DayZ server reloads the whitelist.
    This is when the "Reloading Userlist whitelist.txt" appears in the RPT log (for instance, look at my previous post).
    I assume DayZ server performs the reloading every 5m, but often this number grow to 5m 20s-30s, since the server must be busy running other things.
    Long story short, every about 5m 20s (that is, 320s), a Reloading Userlist whitelist.txt appears in the logs.

    I am plotting this period using the blue line in figure.
    Each row is one 2h period of server running. The blue line is in the middle when the periodicity of whitelist reloading is about 320s.
    The line is zero at the start of every 2h period (since it is the first time the reloading happens), then it goes to zero (the small downward triagle shapes) when the whitelist kick happens.
    If fact, in that case the whitelist is reloaded twice in short sequence, like if the first case failed.
    Note: in this day showed below, we did not perform any update to the whitelist.
    Note2: the red line shows the number of players connected in a given time window. If the players re-login quickly, the red line does not drop in correspondence of a whitelist kick


    I observed that whitelist kicks happen especially when the whitelist reloading periodicity changes often, which I believe is the byproduct of my DayZ server running on some shared CPU infrastructure. For instance, in the row second from last, you can see the blue line growing at some point, while it is expected to be stable.

    While I cannot be certain about why this is happening, my guess would be that Nitrado whitelist update script (which I assume updates the content of whitelist.txt) is locking the whitelist file at the time in which DayZ server tries to access it, causing this short failure.


    Any help is really appreciated, since this is often breaking the game momentum for my players (and upsetting me everyday more).
    (Note: any whitelist name is checked to be a compliant PSN id, and my bot ensures that also the name case is matching)