Duplicate slot id in same dedicated server session

Discussion in 'Bug Reports' started by TheTrackAVL, Mar 27, 2024.

  1. TheTrackAVL

    TheTrackAVL Registered

    Joined:
    Jan 17, 2021
    Messages:
    24
    Likes Received:
    7
    As the title suggests, I'm seeing cars joining a dedicated server session being assigned the same slot id. The symptoms are that the dedicated server shows messages of one of the cars leaving and the other joining. This cycles every few seconds. The spectator view in the corner of the screen on the clients flashes seeming to change view every few seconds. Sometimes the dedicated server crashes.

    Until recently, we had never seen this behavior, but it it happening frequently now. For context, I'm running a sim center with 12 rigs and a spectator. The issue occurring seems independent of the number of rigs in a session. It also seems independent of the content being used.

    I just tried installing the dedicated server from scratch, adding content, and running with the same result.

    If this is important, I use the rf2 rest api to do things like join the dedicated server, change car, change assists, change driver name, etc.

    I also recently started generating a new profile for each dedicated server session, modifying the json files, then launching it. However, we tried going back to the old way (a handful of profiles that we launch from shortcuts) and have still seen the issue.

    I verified that multiple rigs were getting the same slot id by querying them via their api ( the /rest/watch/standings endpoint). I saw different slot ids being duplicated in different occurrences of the issue (ie it wasn't always slotid 0).

    Please let me know any next steps to gather information that could be useful in further troubleshooting this.

    Thanks,
    Joel
     
  2. TheTrackAVL

    TheTrackAVL Registered

    Joined:
    Jan 17, 2021
    Messages:
    24
    Likes Received:
    7
    I just changed the way we launch the rigs a bit and this adds some context.

    Previously, we launched rfactor 2, allow it to get to the main menu, then hit the rest api endpoint to join the dedi.

    I just changed it today to launch with the commandline parameter of "+connect" instead. That seems to have 'fixed' things. I'll keep testing, but I'm not seeing the behavior anymore.

    This is unfortunate as we have to back out of the dedi anyway, in order to change the driver name, then re-join. In addition, we have been launching the same way for months with no issue.

    Thanks,
    Joel
     
  3. TheTrackAVL

    TheTrackAVL Registered

    Joined:
    Jan 17, 2021
    Messages:
    24
    Likes Received:
    7
    Any insight is appreciated.
     
  4. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    723
    Likes Received:
    222
    Hello, can you post the logs here ?

    Last xml file in : whatever\rFactor 2\UserData\Log\Results (Server side !)
    where the problem occurs.

    You need to launch a session, make the "bug" happen, and then close the server
    in order to get the result in the xml file.
    There are identifications data on these files.

    Maybe also activate +trace=2 in the launch option of the dedicated and also post the trace here.
    The trace txt file will be in whatever\rFactor 2\UserData\Log folder server side too.

    Make sure you stop the server before extracting the log/trace. Some parts are generated on exit.

    There is probably something wrong happening with the users, like same steamid or else ...
     
  5. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    936
    Likes Received:
    6,375
    Slot ID can be reused, as stated in official document from "rFactor2 internals plugin" file, which is also used in game's API:
    I'm not sure about REST API, but it should follow the same rule. So unless "slot ID" is duplicated for two different players in server at same time, it is normal behavior that server reuses "slot ID" from someone who left server earlier.

    In our league, we mainly use user name to identify & record live timing data from user in server. Even though people can use same name which may results data saved under wrong people, but that is very rarely happens. Alternative way is to use STEAMID that ensures unique id for everyone, but it is only available from results log files on server side. (not sure if steamid can be found in REST API).
     
  6. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    723
    Likes Received:
    222
    It would be nice to see a video of the message center, when it shows the entry/exit cycling ...
     

Share This Page