Failed to setup AMCP controller on port 5251. It is likely already in use

Hi all,

Today I tried to start the server 2.3.3 but it crashed every time, I encountered this error:

[2023-04-05 10:32:33.462] [info]    Initialized channels.
[2023-04-05 10:32:33.468] [fatal]   Failed to setup AMCP controller on port 5251. It is likely already in use
[2023-04-05 10:32:33.469] [info]    video_channel[1|1080i5000] Uninitializing.
[2023-04-05 10:32:33.470] [info]    [asio] Shutting down global io_service.
[2023-04-05 10:32:33.470] [info]    [asio] Global io_service uninitialized.
[2023-04-05 10:32:33.486] [info]    video_channel[2|1080i5000] Uninitializing.
[2023-04-05 10:32:33.507] [info]    video_channel[3|1080i5000] Uninitializing.
[2023-04-05 10:32:33.527] [info]    video_channel[4|1080i5000] Uninitializing.
[2023-04-05 10:32:33.547] [info]    video_channel[5|1080i5000] Uninitializing.
[2023-04-05 10:32:33.567] [info]    video_channel[6|1080i5000] Uninitializing.
[2023-04-05 10:32:33.587] [info]    video_channel[7|1080i5000] Uninitializing.
[2023-04-05 10:32:33.608] [info]    video_channel[8|1080i5000] Uninitializing.
[2023-04-05 10:32:33.656] [error]   Exception: Throw location unknown (consider using BOOST_THROW_EXCEPTION)
[2023-04-05 10:32:33.656] [error]   Dynamic exception type: class boost::exception_detail::clone_impl<struct boost::exception_detail::error_info_injector<class boost::system::system_error> >
[2023-04-05 10:32:33.656] [error]   std::exception::what: bind: Intento de acceso a un socket no permitido por sus permisos de acceso
[2023-04-05 10:32:33.656] [error]   

[2023-04-05 10:32:33.656] [error]    0# 0x00007FF71711A37E in casparcg
[2023-04-05 10:32:33.656] [error]    1# 0x00007FF717119CAF in casparcg
[2023-04-05 10:32:33.656] [error]    2# 0x00007FF7176009E7 in casparcg
[2023-04-05 10:32:33.656] [error]    3# 0x00007FFA57D81030 in VCRUNTIME140
[2023-04-05 10:32:33.656] [error]    4# is_exception_typeof in VCRUNTIME140
[2023-04-05 10:32:33.656] [error]    5# RtlCaptureContext2 in ntdll
[2023-04-05 10:32:33.656] [error]    6# 0x00007FF71712111D in casparcg
[2023-04-05 10:32:33.656] [error]    7# 0x00007FF717556A88 in casparcg
[2023-04-05 10:32:33.656] [error]    8# BaseThreadInitThunk in KERNEL32
[2023-04-05 10:32:33.656] [error]    9# RtlUserThreadStart in ntdll
[2023-04-05 10:32:33.656] [error]   
[2023-04-05 10:32:33.865] [fatal]   Unhandled exception in main thread. Please report this error on the GitHub project page (www.github.com/casparcg/server/issues).

I checked netstat -ab and the port is not in use by any application.
At the moment of starting the server I had Premiere and Teams opened; but I didn’t have any local servers running (like Companion, etc).

Anybody had this issue before?

Restarting the PC or changing the TCP port probably fixes it, but I wanted to post it first and maybe try to find the cause.

Thanks!

As the standard port is 5250 (and not 5251) are you sure that you do not have a firewall rule that blocks 5251?

It’d be weird because yesterday it was working no problem;

We add the 5251 on top to connect different clients at the same time.

Disabling all the firewalls didn’t help.

If I open a server without the port 5251 in the config, it works no problem.

Thanks!

…there is also a firewall in Windows…

Yeah by “all the firewalls” I meant all the Windows Security options.

As I suspected: I just restarted the PC and now it connects without errors, same config as before.