Errors when locally testing multiplayer

I’ve been testing multiplayer using the Multiplayer Play Mode and it’s been working pretty well except I get these errors before I start hosting with the one that doesn’t get the error.

Socket creation failed (error Unity.Baselib.LowLevel.Binding+Baselib_ErrorState: C:\build\output\unity\unity\External\baselib\baselib\Source\WinApi\Baselib_Socket_WinApi.inl.h(320):Baselib_Socket_Bind: Address in use (0x04000001) - Only one usage of each socket address (protocol/network address/port) is normally permitted.  (WinError:00002740)
Server failed to bind. This is usually caused by another process being bound to the same port.
[Netcode] Host is shutting down due to network transport start failure of UnityTransport!

I can’t seem to figure out how to test locally without these errors, and it seems to just be saying that I need to use a different port on each player but I don’t know how.

Any help is much appreciated!

Try restarting the system. Perhaps a socket is blocked due to a prior process having crashed.

If that doesn’t fix the issue, I have a hunch that your code is simply trying to start as host for both/all players.

1 Like

I was starting the host on all the players that was the problem, thanks for the help!