Docker port 55555 not available on Windows

Aaron Member, Moderator, Employee Posts: 285 Solace Employee
edited August 17 in Tips and Tricks #1

The Solace Messaging Format (SMF) protocol uses port 55555 as default (and 55003 for compressed, and 55443 for TLS). I occasionally run into a situation where Docker Desktop for Windows won't start my Solace container in WSL2 because of some blocked port. I get this:

$ docker start solace99
Error response from daemon: Ports are not available: listen tcp bind: An attempt was made to access a socket in a way forbidden by its access permissions.
Error: failed to start containers: solace99

This kind of similar to an issue with iOS Big Sur where it has reserved the port, but luckily in Windows you can reserve it yourself! 👍

The way around this is to add the port to the list of "excluded ports" so that it can't be used by Windows. My reference was here:

  1. Open up a PowerShell console as Administrator
  2. Simply type in: netsh int ipv4 add exclude proto=tcp start=55555 num=1
    This is shorthand for:
    netsh interface ipv4 add excludedportrange protocol=tcp startport=55555 numberofports=1
PS C:\Windows\system32> netsh int ipv4 add exclude proto=tcp start=55555 num=1

PS C:\Windows\system32>

You can run the same command for other ports if you want (e.g. 55003, 55443, etc.). Then you can use: netsh int ipv4 show exclude proto=tcp to see the changes that were done:

PS C:\Windows\system32> netsh int ipv4 show exclude proto=tcp

Protocol tcp Port Exclusion Ranges

Start Port    End Port
----------    --------
     50000       50059     *             <-- not sure who configured that one?
     55003       55003     *             <-- compressed SMF
     55443       55443     *             <-- secure SMF
     55555       55555     *             <-- default SMF
     57982       58081
     58082       58181
     61476       61575
     61580       61679
     61786       61885
     61886       61985
     61986       62085
     62086       62185
     63503       63602
     63603       63702

* - Administered port exclusions.

Hope that helps!

p.s. you can always add a ? at any point in the netsh command to get help at each level.