Need help setting up a dedicated server

Discussion in 'Hosting Help' started by 123321mario, Jul 20, 2023.

  1. 123321mario

    123321mario Registered

    Joined:
    Jul 20, 2023
    Messages:
    4
    Likes Received:
    0
    Hello, it's been a few weeks i'm trying to set up a server for a friend that doesn't know much in computers.
    Thing is I don't really know how this game works and i'm a bit lost.
    We're both located in France.
    For every installation I tried, I followed this tutorial : https://docs.studio-397.com/users-guide/setting-up-a-dedicated-server

    • I first tried to host the server on his machine but he has Starlink access so I can't open any port.
    • I then tried to link his machine with my personal server (with a regular internet access, with DMZ set up so every port should be open) with WireGuard VPN, port forwarding seems to work but I still can't see the server in the multiplayer list.
    • I also tried running the server software directly on my server, this kind of worked, I now see the server in the list but I can't connect (it says something like mod missing, even if i installed the exact same mods on both machines). After a while this stopped working and I no longer see the server in the list.
    • I finally tried setting up the server on a Microsoft Azure VM located in the US with a dedicated IP, DMZ enabled and firewall disabled. The server software says "Matcher Status: Not Connected to Steam" and doesn't show up in the multiplayer list... (on my friend's machine and my server both showed "connected to steam")
    • I also tried to run the game with the "steam://run/365960//+multiplayer//+connect=[ip]:64297" with no success.
    Do I need to edit any config file ?
    I was searching in the \rfactor2-dedicated\UserData\player\Multiplayer.json file and found "Bind IP":"0.0.0.0" Since my friend's machine is connected through a VPN to my server, do I need to enter the IP of the VPN network adapter ?

    EDIT a few hours later:
    I managed to connect with "C:\Program Files (x86)\Steam\steamapps\common\rFactor 2\Launcher\Launch rFactor.exe" +connect="[ip]:64297", It does actually download the mods but after a while it fails to install them. I can't get past this error. The server still doesn't show up on the server list and is still "not connected to steam".


    I hope someone would be able to help me !
     
    Last edited: Jul 20, 2023
  2. Sounds still like a port / firewall issue.

    I was running my first rF2 dedicated servers on my computer at home and used port forwarding and it worked fine; also I do have a dedicated IPv4 address for my internet connection.

    It is a known problem that not all dedicated servers show up in multiplayers list.

    Concerning the mod - if it gets downloaded by the client then it should be possible to be installed ... so I would say the mod is not downloaded.

    If you join a dedicated server a popup appears "Joining" - just a second later you should see three dots near your mouse pointer ... if they do not appear there is a connection problem or just a problem downloading the mod.

    Sometimes - I encounter this from time to time on my servers for unknown reason (maybe the async I/O of Windows Server) - the mods are damaged on the server right after installation or creation.
    Have a look for rfmod files in rfactor 2\Packages - they should have at least 5kB I would say; if they are 0kB or 3kB they are damaged for some reason and you need to create them again from scratch (uninstall them with modmgr.exe e.g. before re-creation).

    Also it would be helpful to start the server and the client with +trace=2 and +traceflush ... right after the error occurs shut down server and client and have a look for the trace files in userdata\log - you can upload them here and we will have a look.
     
  3. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,327
    Likes Received:
    3,181
    @123321mario Another User did have a similar Problem, discussed HERE.
    Unfortunately he doesn't write what he did to get it working in the End, but the Thread was marked as solved.
    One of my Suspicions is, that DMZ doesn't work well.
    I would recommend to open all necessary Ports manually and ensure to 100%, that the Internet Access of the Dedicated Server is not blocked by any Anti-Virus Software.
    And you can also use my Server List, where normally all Server appear, also the ones that doesn't appear on the in Game or Steam Server List.
     
    Woodee likes this.
  4. 123321mario

    123321mario Registered

    Joined:
    Jul 20, 2023
    Messages:
    4
    Likes Received:
    0
    Hello, sorry for the late reply
    • First thing I did was to ask my ISP for a FULL STACK IP address (with full access to all the 65k+ ports), as soon I switched to the new IP, the server software running on my server or my friend's machine started to appear on the game multiplayer list and on @redapg 's website. I still have the exact same mod error when I try to connect. More on that later. I also disabled the DMZ and added all ports one by one in my router.
    • Now I'm trying to run the server software directly on my friend's machine through a WireGuard VPN running on my server (same Starlink issues as my first post). I now see the server on @redapg 's website BUT it doesn't appear in the game. I also tried to connect directly with the "+connect" argument but it doesn't do anything because I can't launch the game after launching the server software, I can only launch the game if the server software is closed.
    • @StoneRacing I do see the three dots on my mouse cursor while connecting. Mod file is 6kb, should be fine. I recreated it multiple times just in case.

    For the mods part, I followed EXACTLY what this guy did on both machines (french video but everything is shown on screen) :
    I also tried running the commands without using his custom utility, got exact same result.
    I tried this with Paul Ricard HTTT and Portland International Raceway maps and McLaren MP4/8 car for those logs (I tried a lot of other maps and cars but got the exact same results)

    The mod I created with those assets is called "test9" on both machines.​

    Note: I never ran the server software on my server and my friend's machine at the same time to avoid any errors.
    Now here are my log files, all copied after the first "practice" and the "qualifying" sessions ended:


    I have replaced in the log files my public IP with "XX.XX.XX.XX" for security reasons.
    I haven't managed to record any connection to the server software running on my friend's machine because I can't manage to connect to it.


    Finally, I gave up on the Microsoft Azure server, it's free for a month, but the cost after the trial is way too high for my friend (80€+/month). If he pays, he would want a server made for the game. Is there any recommended cloud host optimized for RFactor2 servers ? He wants to race with ~20 people.

    Thank you for your quick answers, I actually plan to play this game sometimes in the future so all of this might also be useful for me :)
     
  5. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,327
    Likes Received:
    3,181
    @123321mario Unfortunately i don't speak French.
    But to run the Dedicated Server and the Game on the same Machine (you did say that it doesn't work for you), do this:
    Before you start Steam, start the Dedicated Server.
    Then start Steam and you normally should be able to join the Server.
    Note: If the Server uses a Password, you can not join it by using the Link on my Server-Website.
    But you should be able to connect to it by using a direct Shortcut on your Machine (if the Server doesn't appear on the in Game or Steam Server Lsit), with Entries like this:
    Into the "Target" Field: "Your absolute Path\rFactor 2\Bin64\rFactor2.exe" +multiplayer +connect="IP:PORT" +password XXXXX"
    In the Field "execute in": "Your absolute Path\rFactor 2\Bin64"
    That normally should work.
     
  6. 123321mario

    123321mario Registered

    Joined:
    Jul 20, 2023
    Messages:
    4
    Likes Received:
    0
    @redapg I just tried launching the dedicated server before launching steam, server says 'Not connected to steam', doesn't appear on your website, the steam server list or inside the game.
    The server doesn't currently have any password.
    I don't even see the server in the "LAN" tab of the multiplayer menu
    Connecting with the shortcut says "invalid server details"
     
  7. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,327
    Likes Received:
    3,181
    This Thread goes in Circles. :)
    It now is again at the Point with the "not connected to Steam" Message.
    Just to be sure: the Steam dedicated Server doesn't show "Connected to Steam", as long as Steam is not running?
    I did never have that Problem with the Steam Command dedicated Server, when i start it without to start Steam.
    There must be something strange being messed up, when it only gets connected when Steam is running.
     
  8. 123321mario

    123321mario Registered

    Joined:
    Jul 20, 2023
    Messages:
    4
    Likes Received:
    0
    The dedicated server shows 'Not connected to steam' if it's launched before the steam client, even if i launch the Steam client after the server, it will keep saying not connected, even hours later
    If i launch the server after launching steam, it says Connected to steam instantly.
     
  9. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,327
    Likes Received:
    3,181
    That is the Reason, why i say that there must be something Basical wrong.
    I don't have to start Steam, to get the Steam Dedicated Server being connected to Steam, after i started it.

    EDIT You should be able, to run the rFactor 2 Steam Dedicated Server, without Steam and rFactor 2 being installed on the same Machine.
     
  10. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    767
    Likes Received:
    250
    Hello, on the same machine when you start the dedicated, Steam should not be launched or it will think the game is already running when you will run the game to connect.
    You must be able to launch the dedicated without Steam Running.
    Then after dedicated is started you can run Steam and the game and connect ...

    If you need to restart the server, you will need to stop the game, Steam and redo all from start, server alone first, etc ...
     

Share This Page