- Home /
Unity intializeserver problem
I'm using unity 4.6.3p4 I have following code
void Start () {
MasterServer.ipAddress = "127.0.0.1";
MasterServer.port = 5055;
portNo = MasterServer.port;
Debug.Log (" ip " + MasterServer.ipAddress + " port " + MasterServer.port);
initializeServer ();
}
private void StartServer()
{
Network.InitializeServer (2, portNo, !Network.HavePublicAddress());
MasterServer.RegisterHost(typeName, gameName);
}
It shows the error: Unknown message from master server (127.0.0.1:5055) 76 The connection request to 67.225.180.24:50005 failed. Are you sure the server can be connected to?
I am unable to understand the error as IPadress is "127.0.0.1". then why it is showing the error for "67.225.180.24".
How can I register my own server? On writing the IP address of my own server it shows the following error: Failed to initialize network interface. Is the listen port already in use? It's not possible to register a host until it is running.
$$anonymous$$ay be you have a problem with socket security? A properly set up crossdomain.xml might help.
the 127.0.0.1 just a local IP address on your LAN. the 67.225.180.24 is you remote IP adress. To be more specific: it's your router's IP address. Try this: http://whatismyipaddress.com . So if i want to join to your server i should connect to your router which has an unique IP address all over the world (67.225.180.24). But this is just your router and not your server. In your router you should open a port which will take me to your server. This is called port forwarding, you can google it. if you write your own remote IP address into a webbrowser's URL line and you made everything right, you should be able to connect it. some more info: if you open the 5055 port as you wanted, you should be able to connect in webbrowser like this: http://67.225.180.24:5055/
I registered masterserver on my own server but still the error is same and I am unable to open the link in webbrowser :(
I'm using Photon, so i never had this problem maybe I'm telling you false info. So try this: http://forum.unity3d.com/threads/tutorial-hosting-your-own-masterserver.146774/ I hope it helps.
I also tried Photon but with unity IL2CPP, the photon build crashes sometimes. I am able to setup master server on my own server and port is also working but still I am not able to connect to server.
Your answer
Follow this Question
Related Questions
Changing the custom master servers default port ? 1 Answer
Network ports ranges. 1 Answer
Master Server and Faciliator connection 0 Answers