Search Unity

Connection to master server fails

Discussion in 'Multiplayer' started by ColossalDuck, Oct 13, 2010.

  1. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    Every time I try to connect to the master server, it fails. This didn't happen in 2.6, so I presume it is because of the raknet upgrade, and if this is the case, I would like to have the source code for the new master server as soon as possible.
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    the source code is online already actually for the whole stuff so you can (and must) host your own one for your game
     
  3. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    So the source code is online already? Awesome thanks. :D

    Sorry, but I don't understand the rest of your sentence?
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    the rest just means that the sources allow you to host your master server + xxx setup to use :)
     
  5. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    Oh, ok. Thanks :D.

    Time to download that source code and compile it on my server... tomorrow.
     
  6. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    Okay, so I have spent the past 3 hours trying to remember linux terminal stuff and I have succeeded to build and run my masterserver.

    Yay.


    But, the connection fails. Just for fun, I tried to build one on my windows machine, and use 127.0.0.1(localhost), and it still fails to connect.
    Where is the unity3 master server source code, or what am I doing wrong?
     
  7. larus

    larus

    Unity Technologies

    Joined:
    Oct 12, 2007
    Posts:
    280
    I'm sorry but the source hasn't been updated on the website. You can download it here (it's the final version):
    http://beta.unity3d.com/download/8020885265/download_servers.html

    Unity 3 by default uses our provided servers (for testing and leisure stuff), so if you set the ip/ports to some custom server for 2.6 (and use the same project in 3.0), just unsetting them and using the defaults should work.
     
  8. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    There we be, thank you very much. I will post my results by the end of tonight.
     
  9. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    So I had a bit more time than I expected to, and have tested it on localhost. No complaints and it worked :D. Just got to compile it for My linux server now, and test it online. Thanks Larus.
     
  10. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    Just got it working on my linux server.

    A warning, the memory usage of the master server scales with its max connection number. For example, I tried 20,000 and it took 180MB of memory. Since I only have a 128MB VPS, it pretty much crashed and I had to reboot.

    I changed it to 14,000, and all is fine. Quite frankly if I surpass 14,000 any time soon, I will be suprised(and have quite enough money to upgrade).

    Just a tip.
     
  11. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    14k is a massive number of connections indeed ;-)

    also if you don't use the proxy, there won't be more than a few hundred connections at all ( independent of how successful, not even CS and alike have more than a few hundred servers in their listing) as players don't connect permanentely to the master server :)
     
  12. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    Heh heh, thanks for the reassurance :D. Thanks again Larus.
     
  13. mrwhite69

    mrwhite69

    Joined:
    May 28, 2009
    Posts:
    15

    => Hi Larus,

    if I let default values, I have this log:

    OnFailedToConnectToMasterServer(info)=>

    "The connection request to master server at 72.52.207.14:23466 failed. Are you sure it can be "connected to?


    ==>
    what are the IP/Port for each services , it is hard to find a post where the whole is written ... ?
     
    Last edited: Jan 20, 2011
  14. iceshaft07

    iceshaft07

    Joined:
    Jul 23, 2010
    Posts:
    293
    I am also getting the failure to connect to master server.

    Dreamora, I was not aware we had to compile our own Master Server-- I thought Unity provided one for us (and thus defaulted it to theres?). I believe in the networking tutorials, Unity wrote that one could compile a Master Server if he or she wanted to, but nowhere did they imply that it was necessary-- just that it was possible, especially if y ou wanted to seperate out the Facilitator from the Master Server.
     
  15. invulse

    invulse

    Joined:
    Nov 29, 2010
    Posts:
    128
    Apparently the master server and facilitator are down right now. I just compiled and ran both master server and facilitator on my vps, switched the ip's to my vps's ip and ports, and that fixed my issues.
     
  16. iceshaft07

    iceshaft07

    Joined:
    Jul 23, 2010
    Posts:
    293
    Yuck-- that is certainly not good. I'm not so fortunate to be able to switch everything around, everyhting is hard coded into an iPhone app that is already deployed.

    Also, I found this part in the Docs:
    Code (csharp):
    1.  
    2. Unity Technologies has a dedicated Master Server available for anyone to use which is the default server used.
    3.  
    Looks like I will be working on a fail over project next.
     
  17. mrwhite69

    mrwhite69

    Joined:
    May 28, 2009
    Posts:
    15
    One important question to me:
    --------------------------------------------
    With the latest version of the ConnectionTester , the server does not start if it doesn't find 4 public address on the
    server... do you have the trouble ? I looked at the previous version (for 2.6) and this was not done this way.

    How did you solve the issue on your server ?

    Cheers
     
  18. mrwhite69

    mrwhite69

    Joined:
    May 28, 2009
    Posts:
    15
    ==> YES , Solved
     
  19. Zwakstroom

    Zwakstroom

    Joined:
    Jan 19, 2009
    Posts:
    27
    @mrwhite69 How did you solve the 4 public address issue? Please tell me :)