alvyxaz / barebones-masterserver

Master Server framework for Unity
475 stars 106 forks source link

Client cant connect to masterserver using internet #193

Open diegoarx opened 6 years ago

diegoarx commented 6 years ago

In local it works but when i put the masterserver in a linux server it doesnt work, the client says "Not connected to server" when i try to make a login. I opened in the server firewall the 5000 port that is used by default to connect the client to the masterserver

MostHated commented 6 years ago

You are sure you adjusted the IP's as needed? What are the arguments you are using on startup of the master server?

diegoarx commented 6 years ago

i use -msfStartMaster using the rooms example and using the starting scene where you can choose the four options(masterserver, spawner, client,server) argument to start masterserver scene and in this scene i run the masterserver and some seconds later the spawner. Tried that in windows locally and the client can connect to masterserver. My configuration in client is in the initial scene ConnectionToMaster ip my static external ip, port 5000 My configuration in MasterServer is In the Master+spawner scene ConnectionToMaster ip 127.0.0.1, port 5000 and the Spawner the Default Matchine Ip 127.0.0.1, the MasterServerBehaviour uses port 5000

diegoarx commented 6 years ago

For some reason the client.connect in ConnectionToMaster doesnt connect, it gives me before trying to log in the error WebSocket connection to 'ws:///w' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT