- Home /
Connection Request to Master server failed
I am trying to connect master server running at my computer. My master server runs at port 20349 and my facilitator runs at port 20350. Let say local ip of master server is l.l.l.l and public ip is p.p.p.p. I enabled port forwarding for ports 20349 and 20350 for udp and tcp.
Following code works fine.
void Awake(){
MasterServer.ipAddress = "l.l.l.l";
MasterServer.port = 20349;
Network.natFacilitatorIP = "l.l.l.l";
Network.natFacilitatorPort = 20350;
Network.InitializeServer(32, 22222, true);
}
void OnServerInitialized()
{
MasterServer.RegisterHost("MyGameType", "Game1", "Game");
}
But following code gives 2 errors;
error 1: The connection request to p.p.p.p:20350 failed. Are you sure the server can be connected to?
error 2: The connection request to master server at p.p.p.p:20349 failed. Are you sure it can be connected to?
void Awake(){
MasterServer.ipAddress = "p.p.p.p";
MasterServer.port = 20349;
Network.natFacilitatorIP = "p.p.p.p";
Network.natFacilitatorPort = 20350;
Network.InitializeServer(32, 22222, true);
}
void OnServerInitialized()
{
MasterServer.RegisterHost("MyGameType", "Game1", "Game");
}
Any help will be appreciated.
Your answer
Follow this Question
Related Questions
Multiplayer UNet doesn't use UnityEngine.Network anymore right? 2 Answers
Failed to connect to master server since days 1 Answer
Changing the custom master servers default port ? 1 Answer
FPS drops to 30 when I use MasterServer.RegisterHost, WHY!? 1 Answer
Unexpected `MasterServerEvent.RegistrationSucceeded` on player connect/disconnect 1 Answer