Editor becomes unresponsive on starting up swarm

Whenever I try to build any project, the editor becomes unresponsive on “Starting up Swarm Connection… (100%)”. I looked into the Swarm Agent Log and there was an error repeating itself every 3 seconds, even after I had closed all editors and the Epic Games Launcher.

The error message:

20:07:08: [ERROR] Channel registration failed. Reason: Kutakin vastakeosoitetta (protokolla, verkko-osoite tai portti) voi käyttää normaalisti vain 
kerran
, Callstack:    kohteessa System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
kohteessa System.Net.Sockets.Socket.Bind(EndPoint localEP)
kohteessa System.Net.Sockets.TcpListener.Start(Int32 backlog)
kohteessa System.Runtime.Remoting.Channels.ExclusiveTcpListener.Start(Boolean exclusiveAddressUse)
kohteessa System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.StartListening(Object data)
kohteessa System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupChannel()
kohteessa Agent.AgentApplication.Main(String[] args) tiedostossa d:\BuildFarm\buildmachine_++depot+UE4-Releases+4.9\Engine\Source\Programs\UnrealSwarm\Agent\AgentApplication.cs:rivillä 133.

Parts that are not English:

20:07:08: [ERROR] Channel registration failed. Reason: Each socket address (protocol, network address or port) can normally be used only
once

kohteessa = in

I found a fix for this in this thread: Swarm Agent Connection Stuck on Build - Platform & Builds - Epic Developer Community Forums

Doing these steps fixed it for me:

  • Make sure you don’t have multiple Swarm Agents open in your taskbar tray

  • Navigate to this folder and delete it’s contents while the editor is closed: C:\Users[Your Computer Name]\AppData\Local\UnrealEngine