We’ve just upgraded from UE4.27.2 to UE5.1.0 and we’re getting spammed with this message:
c:\jk\workspace\Build2.2 Unreal_Win\core_api\src\fmod_os_net_winsock.cpp(273) - Cannot listen for connections, port 9265 is currently in use.
It seems to originate from a dll that we don’t have source for so I can’t really debug it any further. I noticed some similar issues being reported on the FMOD Unity forum and the suggestion was that something wasn’t being shut down, so I checked and this message appears even when I first boot the machine and launch the UE5 editor.
Changing the port just gives the same error on the new port.
All of the programmers here are getting the same issue, but our sound designer is using a compiled version of the editor, doesn’t see this error and is able to connect the studio to the running game.
You are correct that this issue appears to be similar to the issues reported on the Unity forum - the only way I’ve been able to replicate your problem is by running another process to the same port. An obvious example would be having another UE project open that uses FMOD, using the same default port for Editor Live Update, but I imagine this probably isn’t what you’re running into. Is it possible that you have some other process or application on your machines that is using the same port? You can get a list of all ports currently being used using the command netstat -ano.
Also, is there any difference in FMOD settings between you and the sound designer? For example, Editor Live Update being enabled for you but disabled for them, or a difference in ports?
Could I also get your FMOD Studio and FMOD Unreal Plugin version numbers?
One of the other programmers and I both tried using various other port values and the same thing happens on the new port. The other programmer noted that changing the port within the UE5 editor stopped the messages, but when the editor was restarted the messages started up again on the new port.
I tried that netstat command anyway and can’t see anything else using 9265.
The sound designer is also using the default ports.
Not much to go on, I’m afraid. Is there any way I can set a breakpoint on the code that’s trying to make the connection so I can see if it is hit twice for some reason? Maybe you could DM me some specific source files?
Throwing out a Me Too FWIW. UE5.0, FMOD 2.02.12, VS 2022, launching the editor from VS - changed the port, nothing else on the port. I stopped the madness by adding this to FMODFileCallbacks.cpp at line 22:
if (!Message.Contains("cannot listen for connections", ESearchCase::IgnoreCase))
But that won’t help the sound designer if something is preventing socket communication.
Thanks @johnPayload@pwkmikekelly for the extra details. I’ve been able to reproduce the issue - it seems to be due to how UE5 loads plugins when opening projects.
Essentially, an FMOD system is spun up by UE in the initial loading screen when you open a project, and then once more when the editor opens. For some reason, despite the initial FMOD system being released, the port is still considered as in use, meaning that the second FMOD system in the editor cannot use the port. The development team is currently looking into the issue in more detail.
Your proposed workaround to suppress the warning shouldn’t cause any problems. Unfortunately, Editor Live Update will not work unless you change the port every time you open your project, and I cannot provide any other workaround. However, regular Live Update (i.e. while playing the game in-editor) should still function fine.