When tying to create a local test server I get the following errors,
Error while starting server: Failed to start network server, port:53640, error id:5
17:44:44.736 - Infinite yield possible on ‘RobloxReplicatedStorage:WaitForChild(“GetServerVersion”)’
17:44:44.737 - Stack Begin
17:44:44.737 - Script ‘CoreGui.RobloxGui.Modules.Settings.SettingsHub’, Line 62
17:44:44.737 - Stack End
17:44:45.886 - Failed to connect to 127.0.0.1|53640. Connection attempt failed.
This issue has been occurring three days now for me, and is greatly inhibiting to my workflow. Has anyone else been experiencing this? I searched up the error in google and it seems people have experienced this problem before.
Three days, you say? At least it wasn’t my change.
I’ve also been seeing this very intermittently in online games. I’ll see if we have anything logged on it internally, and log something if not. It sounds like the server just can’t start up, and the GetServerVersion thing is mostly unrelated.
That being said, I have one far-fetched idea that may or may not help: try closing all instances of Roblox in the task manager. Save your work first, of course. There could be a Roblox instance hiding out taking up the port or something. Let me know if that works!
Edit: Apparently error ID 5 is “port already in use,” so my advice should be exactly what you need. That also means my second paragraph is irrelevant.
I removed all Roblox running instances from task manager, re-opened studio, then did another local test server run. I am trying to run a 3 player test server and 2 players failed to connect (recently it seems like 90% of the time 1 player fails to connect). In response to this I cleaned up the test server, tried again, and I got the aforementioned error again.
My operating system is macOS Sierra 10.12.6, if that information helps at all.
Does your game use game:BindToClose or other on-close callbacks? This can sometimes keep the server process (and the server port) open even after the graphical studio window has closed. If this happens, you should be able to see the studio process for the server continuing to run in the Activity Monitor.
Also: Does this happen if you open the baseplate template and do the same testing flow?
The first mystery to resolve is what is using port 53640 (the port that roblox studio uses for the server). To do this on mac, open a terminal and run this:
lsof -i :53640
The next time you get the error, try closing the studio windows that have the error showing in them, and then run this command. This should tell you what process is holding the port open preventing the server from using it.