- Home /
Failed To Connect to my own Master Server
Hello ,
I managed to upload Unity Master Server and Facilitator to my own server.
MasterServer.ipAddress = "374.48.48.393";
MasterServer.port = 23466;
Network.natFacilitatorIP = "374.48.48.393";
Network.natFacilitatorPort = 50005;
i can ping "server_ip" .But when i register my game to master server it shows error.
Failed to connect to master server at server_ip:23466
What am i missing here ?? Why its not connecting .... Plz Help
Answer by hbalint1 · Apr 28, 2015 at 11:33 AM
you store your server_ip in a string. but if you pass it like this "server_ip", it actually passes "server_ip" not "65.67.213.12" or something like this. change it to:
MasterServer.ipAddress = server_ip;
MasterServer.port = 23466;
Network.natFacilitatorIP = server_ip;
Network.natFacilitatorPort = 50005;
no no... i just wrote that ... m doing like this $$anonymous$$asterServer.ipAddress = "542.338.921.001";
ok. i see you updated the question. I don't use master server, but I think it's not that easy. First you should check what's your remote IP address and after that do port forwarding on the given port.
see i know the remote IP and Port . Why it doesn't connect directly ? Why i need to do port forwarding ? ....Sry networking is not my forte.
because i assume you have a wireless or any type of router. now the remote IP address is basically for identifying the router, so i can say it's the router's address. in the hierarchy under the router there are your devices which are connected to router (like PC, laptop, mobile, tablet etc..). So if you want to reach you device (PC) you have to tell your router to forward the request to your PC. the request comes on the server_ip:port. Now you have to go to the router's config and set it. It's not hard so don't worry. go to the port forwarding menu and tell it that, if some request comes in the given port, forward it to your local computer (by telling it's IP address). you can look for IP address on command ter$$anonymous$$al with the ipconfig command. It gives you ike this: 192.168.0.105. If you have set this correctly the request on server_ip:port should go to your local computer. I recommend you to set static local IP address to your computer, so you don't have to reset forwarding any tie you restart your PC. It can be set in the router config too. It asks for the $$anonymous$$AC address of your PC and the IP address you want to always give to it. I hope it's understanable. You can search for port forwarding on google too.
@hbalint1 : Thanks for this(i think unity master server/facilitator does this NAT Punchthrough .Doesn't it? )....But what if the users are in different places (one using Cellular Network and other one WiFi). What will happen in that case ?
Your answer
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
Master Server Explanation? 0 Answers
Best cross platform Http Library? 1 Answer
Non-dedicated server? 1 Answer
Save and Load JSON Data to and from Webserver, Performance Question 0 Answers