Connection issues and solutions

From FA Forever Wiki
Jump to: navigation, search

Forged Alliance needs a direct connection between all players of the game. This means ports must be forwarded either manually in your router configuration (the preferred way) or using UPNP.

Please also note that LAN games are not fully supported by FAF due to the way the connections work.

Please see more detailed information and troubleshooting advice below.

Unable to connect to someone

Do I have a problem?

If you can't connect to a game/someone, it can be caused by that someone else having improper settings.

In order to be sure:

  1. Try to host a game.
  2. in the FAF client (the top bar), click "Help - Show Logs".
  3. Open the file "forever.log" in a text editor.
  4. Search for these lines.


  • INFO client.connection Outgoing JSON Message: {"args": [6112], "command": "InitiateTest", "target": "connectivity"}

This line is port you've set in the lobby. It's the one that FA will try to open locally.

  • INFO connectivity.helper.ConnectivityHelper Connectivity state is STUN, mapped address: 77.117.206.235:54176

This line means that the port that FA is trying to use is not forwarded and a different public port will be used instead which may cause issues down the line. You should check your local IP-address and router settings and make sure the right port is forwarded to the right IP-address.

  • INFO connectivity.helper.ConnectivityHelper Connectivity state is PUBLIC, mapped address: 77.117.206.235:6112

This line indicates that the port selected in the client is being forwarded properly manually.

  • INFO fa.upnp UPnP mapping 192.168.0.99:6112
  • ERROR fa.upnp Couldn't get StaticPortMappingCollection

These lines mean that your client is trying to use UPNP but can't. Probably because UPNP is not enabled on your router or just not working properly.

  • INFO fa.upnp UPnP mapping 192.168.0.99:6112
  • INFO fa.upnp -> UDP mapping of 192.168.0.99:6112 to 77.117.206.235:6112

These lines indicate that UPNP is active and working.

UPnP

In the lobby menu Options --> Settings --> Game Port tick the checkbox labeled UPnP. With UPnP enabled, the lobby should be able to communicate with your router to set the (temporary) good settings for FA.

Please feel free to try it if you are having connection issues.

DON'T TRY IT if you can connect to games and host games and aren't getting nil pings / red pings to people. Your connection is most likely fine.

The longer but definitive fix

To connect properly, it's simplest to make sure you have a publicly accessible port. To achieve that, you need to configure your router to forward a given port to your local machine. 6112 is the default port used by FAF.

Check out the following article for more information on how to setup your router to forward ports:

http://portforward.com/english/applications/port_forwarding/Supreme_Commander/Supreme_Commanderindex.htm

Select your router in the list (or the closest one) and follow the instructions.

It's still not working!

Multiple computers behind the same router

Let's say you have two computer behind the same router.

  • Computer 1 is 192.168.0.135
  • Computer 2 is 192.168.0.174

Each computer will need a separate port in FAF. By default, it's 6112. Change it in Options --> Settings --> Game Port.

For my example :

  • Computer (192.168.0.135) will use port 6112
  • Computer (192.168.0.174) will use port 7002

Each port should be routed to the right computer. It's very important that the IP / port couple is correct.

For your router, follow this link:

http://portforward.com/english/routers/port_forwarding/Linksys/WRT160Nv2/Supreme_Commander.htm

Select your router, replace the port and the IP with your settings.

How do I check if the settings are correct?

Simple:

  1. Try to host a game from your first computer.
  2. Try to join that game from the second computer.


If it doesn't work, look at the file named game.log (or game if you don't see the extensions).

  • It's normally created in "c:\ProgramData\FAForever\logs\" in Vista/Seven/Eight. You can find the directory by using HELP - Show logs in the lobby.
  • It's a text file that you can open with notepad.

You will see a lot of text in it. But you should see this :

  • info: GPGNET: setting nat handler to 0x?????004
  • info: LOBBY: Game port 6112[UDP] opened. (that port will be the one setted in FAF)
  • info: LOBBY: starting with local uid of 21 [Ze_PilOt] (that's your id and nickname)
  • info: GPGNET: entering lobby state. (meaning that the initialisation is complete)
  • info: LOBBY: Connecting to host "test" [213.219.163.245.bro01.dyn.edpnet.net:7002, uid=47] (That's the expected connection : the other computer connection and port).

and :

  • info: NET: using deflate compression for sends to 213.219.163.245.bro01.dyn.edpnet.net:7002.

These lines are VERY important. That's the incoming connections you receive.

The most important part is: 7002.

  • So, for computer one (port 6112), I must see an incoming connection from 7002 port.
  • And the other way, for computer two (port 7002), I must see an incoming connection from 6112 port.

If the port is not correct in the log, that's mean that the computer was not able to use the right port, and used a random one. That's mean that if I don't see "7002" in the log of the "6112" computer, the "7002" computer is not correctly routed.

In that case, the expecting connection (Connecting to host "test"...) is waiting for a port xxxx, while the computer is receiving a totally different port. That can or cannot work.


LAN Games

The information in the previous section is about two independent players both using FAF independently, not playing with each other.

Because FAF always uses the external IP address so that the game can work on the internet, for two players in the same LAN behind a NAT Router (i.e. the typical situation with home internet users) to be able to connect to each other when using FAF, the router must forward packets properly using its external IP address.

If your router doesn't do that, there currently just isn't any way for you to play FAF Games with someone in the same LAN.