- Home /
How do I setup the Unity Network Connection Facilitator
I'm having an excruciating problem with Unity3D's networking features.
I've set up a Facilitator and Master Server on a publicly accessible IP address and verified that the address is reachable and the ports are open.
I'm able to have two players join and play in my game where one is the server and the other is the peer, with the server registering its game on the master server and the peer polling the master server for a game list, and then joining the correct game.
However, if I then specify the connection facilitator port and IP like this:
Network.natFacilitatorPort = connectionFacilitatorPort; Network.natFacilitatorIP = connectionFacilitatorIPAddress;
Nothing bloody works anymore! I simply get a message saying that the game isn't able to connect to the facilitator. This is misleading, because the port is open, the facilitator is running, and if I deactivate the faciliator, and run the master server on the facilitator's port everything works. The faciliator log/console window however is not reporting any activity.
The specific error I'm getting is:
"The connection request to xxx.xxx.xxx.xxx:5887 failed. Are you sure the server can be connected to?"
The master server and facilitator reside on the same server / IP address, the master server uses port 5886 and the facilitator uses port 5887 and both ports appear connectable. I'm using the default connection tester setup as I don't have 3 extra IP addresses to spare right now. The network connection tester returns the enum ConnectionTesterStatus.LimitedNATPunchthroughPortRestricted, which suggests that NAT punch through might work, however I'm not even getting to that point when the facilitator port/address is specified.
It seems like I've left out some fundamental configuration setting, perhaps the facilitator can't run on the same IP as the master server? I dunno, I'm just grasping at straws here having already fought for 8 hours with monodevelop and the atrocity that is developing with it and Unity on a Mac. So my mind is pretty cooked at this point.
What have I missed?
[Update]
The connectivity issues appear to be caused by our windows server and firewall, as when I attempted to setup the proxy server, it also was not able to connect to the facilitator. When I mirrored the setup on my workstation the two were able to communicate. If I figure out what caused this I'll post the solution here, along with exactly how I setup the master server, facilitator and proxy, as there simply isn't any useful information out there at the moment on how to get this stuff working.
So, finally facilitator and master server can run on the same machine? And if using facilitator players should not make port forwarding am I right?
Did you figure this out? We are having a similar issue, but our server does have 4 public IPs.
Burkedrane - we never figured it out fully. Sometimes the connection would be successful between two machines across firewalls, other times it would fail simply across our two company networks. The $$anonymous$$aster Server also had a habit of crashing randomly, and there were some bugs right in the main cpp file that meant errors weren't even always being reported (I can't quite remember what they were, something about it trying to initialise the connection even when an earlier step had failed, it's been a while).
Sadly, the conclusion we came to was that, at least for that build, Unity's networking solution was buggy, complex in its methods of failure and not in the least bit useful for facilitating a stable connection.