Local multiplayer problem

Discussion in 'Hosting Help' started by Molano, Jul 1, 2015.

  1. Molano

    Molano Registered

    Joined:
    Jul 1, 2015
    Messages:
    10
    Likes Received:
    0
    I've purchased rFactor 2 yesterday to drive with a friend. We have had a succesfull GSCE server running so i figured this would be fairly similar to set up.

    After some looking around (this forum could use a sticky) and finding dozens of ports i should forward i finally found the 2 ports, and that the game went from a ini to a JSON. So i've forwarded everything and disabled the windows firewall alltogether and finally got my server showing and joinable. Clients can download the mods (only standard stuff) and everything seems to be working.

    When another player joins he can race the AI without a problem. However when i join i can drive like normal, however other players and the AI don't see me. i have no influence on the physics of any other cars. This means i can just drive in front of an AI and he literally just plows through me. He will drive on without anything changing while i go flying. Same goes for other players. They do not see me and if i hit them nothing happens on their client.

    I have looked around for a while and saw a post somewhere where players thought it could be the server couldnt handle it. So i put the server on a seperate pc (a gaming rig, so a beefy pc) and reforwarded the ports again to run into the exact same problem.

    Like i said i have rebound the ports to different ports in the multiplayer.JSON file, and forwarded those but that doesnt change anything. To see if it might have been windows firewall i completely disabled that on both the server and client to test it as well, but no changes whatsoever. I don't know where to look anymore. I've tried the prototype server and the regular server. Both have the same problem. It seems i do not send packets to my local server. However as far as i know i can't join it using a local ip, and i have no idea what else the problem could be.

    Any ideas? I don't know what else to try anymore after 6 hours of tinkering.
     
  2. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    Are you running the server on the same machine as the client? If not, is the server running on a machine that is on the same local network as your client computer. These scenarios shouldn't be a problem. I'm just trying to get an idea of how your setup. This problem is very odd. From time to time if a client fails to send its position back to the server then you will see strange stuff like this but typically if it's as bad as you're saying, the server finally kick you off the server.
     
  3. Molano

    Molano Registered

    Joined:
    Jul 1, 2015
    Messages:
    10
    Likes Received:
    0
    I have both setups. Currently i'm running the server seperately on the same LAN. When i get home this evening i can switch it around again to run it locally, but we had the exact same problem with that setup. I already found a thread with someone with the same problem (Don't have it handy at the moment) where people were saying maybe it's a matter of the server not keeping up, having trouble with performance. So i tried a different pc for the host, but the same problem seems to stay.

    When i enable windows firewall i can join the server and get kicked after a minute or so. When i disable it i can join and race for at least a few minutes (havent tried longer) without any hitches. I see the other players and AI drive around normally. I just cannot influence them in any way. I can block them off and they plow through me like im not there (my car does get thrown around, theirs doesnt change line and just act like they are driving their normal line.)

    Thanks for looking at the problem.
     
  4. Molano

    Molano Registered

    Joined:
    Jul 1, 2015
    Messages:
    10
    Likes Received:
    0
    After some mailing back and forth with support (thanks Tim!), and a lot of screwing around (many hours) i finally found the problem. If anyone is having the same issue this is what i did to fix it.

    I have my server running on a different machine in my network. Open the correct ports as usual in your router. If you now try to join locally and your router has trouble joining your global IP it will result in the before mentioned problems. You have to join your server using the local IP if you're in the same LAN. However the client right now does not allow to join by ip or filter the game list by LAN games only, so you cannot do this in the client currently. (2-7-2015)

    My fix is to add a router rule to the windows routing table.

    To do this you need to find your global ip (http://www.whatsmyip.org) and the local IP of the machine hosting your game. You can do this by hitting the windows key + r and typing cmd followed by enter. If you now enter ipconfig and press enter you should see your ip4 adress somewhere. It will probably be a number like 192.168.1.15

    If you have both of these you can enter the following command in the command prompt (windows key + r and type cmd followed by enter.)

    route add (global IP) MASK 255.255.255.255 (local IP of host) -p

    So for example :

    route add 123.123.154.156 MASK 255.255.255.255 192.168.1.2 -p

    Make sure you get the correct ip adresses. If you do this you will basically tell windows that if any applications wants to connect to your global ip adress (which rfactor does) it will instead connect to the ipadress you specified (in the example 192.168.1.2). Basically ensuring you join your own server locally in stead of via the global ip adress. This gets rid of these weird problems.
     
  5. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    Interesting fix. I've seen the join button be slow to appear in a LAN environment because it first attempts to us the public IP but normally that times out and then it tries your private IP and connects fine.

    Another work around to this that I've done before is use WF to block outgoing traffic to your public IP. So the sim will instantly fail to connect to your public ip and then switch to your private IP.

    You could add the rule like this:
    Code:
    netsh advfirewall firewall add rule name="rF2: Force LAN join" dir=out action=block remoteip=<yourpublicip>
     
  6. Molano

    Molano Registered

    Joined:
    Jul 1, 2015
    Messages:
    10
    Likes Received:
    0
    My original post of the fix still isn't showing up (needs to be authorized?) but i guess the staff can read my post.

    I tried going the windows firewall route by blocking the program off, but off course it couldn't authenticate at all. The problem for me was that i could join and connect fine. I could even chat in game. My car was just not visible to others (A.I. and players alike).

    I don't know if my specific router is causing the problem. It's an ASUS RT-N66U.
     
  7. Molano

    Molano Registered

    Joined:
    Jul 1, 2015
    Messages:
    10
    Likes Received:
    0
    Mods, the fix i posted in this thread and another are not showing up. When i posted them it said my post was awaiting admin approval. Was something wrong with my post?
     
  8. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    3,874
    Likes Received:
    2,681
    Maybe this:

    read this
     
  9. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    There. Post approved.
     
  10. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    Blocking the whole program wouldn't work because it wouldn't be able to communicate at all. Some routers will route traffic from the LAN back to the WAN IP but most will not. When the dedicated server advertises in the matchmaker it lists your LAN and WAN IPs. When someone joins your server it will first try to join via the WAN IP, if it fails it will fall back to the LAN IP. So a work around is to block all traffic to the wan ip so that rf2 falls back to the lan ip.

    The work around ISI gave you routes the WAN IP back to your LAN IP before it even leaves your computer. I can't think of any advantages of one way over another. You used the -p option so it will persist a reboot.

    I still think it's odd that you were able to join your server at all without adding a static route.

    Glad you got it working though.
     
  11. Molano

    Molano Registered

    Joined:
    Jul 1, 2015
    Messages:
    10
    Likes Received:
    0
    Yeah it was a first for me as well. I've ran servers for quite a few games, and mumble and never had something like this happen. Since upgrading to this router i couldn't join the mumble server on the WAN IP anymore, but since that it is join by IP i could just give it my LAN one and it was working. (which is better anyway, i just used join by WAN to check if i forwarded all ports correctly).

    ISI didn't give me the fix though, i had to think of it myself :D. Tim helped me on my way identifying the problem, but besides 1 thread with 2 people with the same problem i think it's pretty rare. I knew how to do the routing in Linux but had to google it for windows. I think the firewall fix you proposed might be a bit more eloquent. I never thought of just blocking my WAN IP. I figured i could just scan for LAN games if i only blocked off internet access for it in windows firewall but i didn't realize it needed a internet connection for authenticating.

    If you ever need any info on my setup to look at the problem let me know.
     

Share This Page