Search Unity

Major issues staying connecting to my own Facilitator

Discussion in 'Multiplayer' started by johnnycrich, Feb 1, 2010.

  1. johnnycrich

    johnnycrich

    Joined:
    Sep 26, 2009
    Posts:
    6
    Hello,

    ** I actually sent this as an email to support, but my deadline is looming and I'm ready to start sobbing, so I thought I'd try here too. **

    We recently purchased Unity Pro and are having great difficulties using a Facilitator that we built on our server via the Master Server package. I am running the Master Server command with default ports enabled, and can connect to it perfectly fine until the host does a send update command (see debug log below).

    • Connected to master server at 205.186.132.206:12345
      Sent host registration to master server, registering a NAT assisted game as "BA", 1, 33, not password protected, ""
      Connected to facilitator at 205.186.132.206:50000
      Sent host update to master server with identifier 3 <=== Here's where the masterserver says “Facilitator: Connection to 204.9.221.54:25000 lost”
      Connection lost to NAT facilitator, reconnecting.
      The connection request to 205.186.132.206:50000 failed. Are you sure the server can be connected to?

    After the “Connection lost to NAT facilitator, reconnecting” message, not only can we not reconnect to the Facilitator, but we cannot access the server IP from a browser for several minutes. We have tried debugging this for several days and are completely at a loss as to what to do. The only message that has come up as a result of this issue is the "Connection lost" while running the masterserver bin program via SSH.

    It appears that the Master Server code has not been updated from beta 0.1.0 for some time – is there a more updated version?

    I'd use Unity's default Facilitator, but for a production game I am assuming this would be less than reliable.

    Any help that you kindly folks can provide would be most appreciated.

    Johnny
     
  2. Quietus2

    Quietus2

    Joined:
    Mar 28, 2008
    Posts:
    2,058
    Hello Johnny,

    You do realize that Unity's networking is broken to the point that it's unusable in a production environment? Connections will randomly fail, due to a mono bug(s) causing an invalid threadstate to be returned.

    They have acknowledged the problem, but haven't given any time frame for resolution. People are guessing sometime this summer, as it will take an update to mono to resolve the core issues.

    Most all the problems are documented in the following thread.

    Unity networking is DISFUNCTIONAL

    Some issues though do have workarounds, such as the facilitator. People tend to restart their processes at regular intervals. Like an hour or less.
     
  3. johnnycrich

    johnnycrich

    Joined:
    Sep 26, 2009
    Posts:
    6
    Hi Quietus,

    I appreciate your reply.

    It is my understanding that the majority of the issues mentioned in that thread are focused around network views/network synchronization. Our game is using RPC for the vast majority of functions and it has been working pretty awesome so far, so I don't know how relevant those complaints are for us.

    I think the issue here is separate in that Master Server is poorly documented and implemented. Raknet is a wonderful library, so the fact that the Facilitator is so messy is a big surprise to me. I am not expecting 100% uptime, I am just wondering if anyone else has found a usable workaround for this issue. As my problem listed above is very specific and not "random", I imagine I am missing something, here.

    Below are the steps we have taken to attempt to resolve this issue.

    1. We first thought that this issue may be caused by the Master Server not running in the background within Linux, so we ran the command as “nohup ./masterserver ”. This did not help.
    2. Next we tried using non-default ports for masterserver, so we enabled our server’s firewall and opened up a different port that is not in use on both TCP and UDP. We then ran masterserver as “./masterserver 27012 27012”. This did not help, so we flushed Linux’s iptable to disable any firewall rules.
    3. Next we compiled the connection tester to the same location and were able to hook it up to the Facilitator via “./contester 10735 50000”, but it did not resolve the issue.
    4. Using Unity’s own default Facilitator works fine when using our masterserver.
    5. Our hosting provider has not been able to find a reason why the Facilitator would drop the connection.

    Thanks!
     
  4. hogus

    hogus

    Joined:
    Jul 9, 2009
    Posts:
    145
    I know this might sound like a stupid question, but since you don't mention it explicitly... Is your Linux Master-Server running on a public IP?
     
  5. hogus

    hogus

    Joined:
    Jul 9, 2009
    Posts:
    145
    This might sound even more stupid but the messages you are getting say:

    “Facilitator: Connection to 204.9.221.54:25000 lost”
    Connection lost to NAT facilitator, reconnecting.
    The connection request to 205.186.132.206:50000

    So is 204.9.221.54:25000 the incoming machine or the facilitor?

    I'm just confused as to whether the facilitor is running on a different IP from the master server?
     
  6. johnnycrich

    johnnycrich

    Joined:
    Sep 26, 2009
    Posts:
    6
    hogus,

    We are using a public IP on a VPS account. This is why we're able to connect to the Master Server (the problem is with the Facilitator).

    204.9.221.54:25000 is the incoming machine.
     
  7. hogus

    hogus

    Joined:
    Jul 9, 2009
    Posts:
    145
    Is the entire IP address being blocked? Or is it only when you trying and re-connect to the master-server's specfic port?

    It sounds almost as if some thread is locking the resource on the master-server side, and blocking any additional incoming connection attempts.
     
  8. hogus

    hogus

    Joined:
    Jul 9, 2009
    Posts:
    145
    And no.. there's no update to the 0.1.0 beta master server.

    This is another thing we've been whining about like little schoolgirls. :roll:
     
  9. johnnycrich

    johnnycrich

    Joined:
    Sep 26, 2009
    Posts:
    6
    Very interesting...

    I will have a look into this!
     
  10. DrHotbunz

    DrHotbunz

    Joined:
    Feb 14, 2009
    Posts:
    315
    My recommendation is to temporary use either the dimerocker master server or the Unity beta master server.

    Prove that your code works ok using these. These master servers and facilitators are proven to work.

    Thats how I do it. I hope by the time my games come out they have the problems fixed.
     
  11. johnnycrich

    johnnycrich

    Joined:
    Sep 26, 2009
    Posts:
    6
    Yes, as a band-aid I am using dimerocker as the facilitator while my server can handle the masterserver. So far it is stable but by production we definitely want everything on our hardware.

    We continue to investigate this issue and will report back any results!