Light build With Swarm fails with TCP error

Sometimes during a long session, I don’t know if it has anything to do with not restarting windows for a few days or just with random failures of Swarm, building fails and the swarm agent shows this in it’s log:

21:03:08: [ERROR] Channel registration failed. Reason: Only one usage of each socket address (protocol/network address/port) is normally permitted
, Callstack:    at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at System.Net.Sockets.TcpListener.Start(Int32 backlog)
   at System.Runtime.Remoting.Channels.ExclusiveTcpListener.Start(Boolean exclusiveAddressUse)
   at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.StartListening(Object data)
   at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupChannel()
   at Agent.AgentApplication.Main(String[] args) in D:\Build\++UE4+Release-4.12+Full\Sync\Engine\Source\Programs\UnrealSwarm\Agent\AgentApplication.cs:line 133.

the only way out is to restart windows. Restartung UE or even the swarm agent won’t change, the socket remains blocked

Hey Wallenstein,

This sounds like the port is becoming blocked by another process. Use this to help you identify what is using the port that is causing it to be blocked: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

This will likely come down to a Windows issue that you’ll need to resolve with port assignments which is not something that we will likely be able to help with.

-Tim