Connection failed and Chromecast issues: Roon using new/additional network ports since 880

From a thread over on #private-beta - this was in relation to there being an upper limit in terms of connecting clients with new builds

  • have the same limit (7) in terms of Sonos devices that can be enabled endpoints
  • it doesn’t matter which 7 I choose, I can reduce number to 6 and add one that previously couldn’t be used

Adding an 8th results in the log message

12/15 18:03:12 Info: [transport] creating endpoint for sonos device 23:1:11b4f841-2d17-4b83-4ca4-90dce08473b5 in Thread[Id=13, Name=Broker:Transport]
12/15 18:03:12 Trace: [dspengine] created new dsp config {"version":3,"items":[{"type":"bs2b","enabled":false},{"type":"parametric_equalizer","enabled":false},{"type":"audeze_presets","enabled":false}]}
12/15 18:03:12 Trace: [transport/audeze] picking preset lowlatency
12/15 18:03:12 Trace: [transport/audeze] picked null preset!
12/15 18:03:12 Trace: [push] restarting connection (Unable to read data from the transport connection: Software caused connection abort.)
12/15 18:03:12 Trace: [push] retrying connection in 76710ms
12/15 18:03:12 Trace: [zone Guest Room] Loading
12/15 18:03:12 Trace: [zone Guest Room] Suspend
12/15 18:03:12 Info: [zone Guest Room] Canceling Pending Sleep
12/15 18:03:12 Info: [zone Guest Room] Canceling Pending Sleep
12/15 18:03:12 Critical: scx: in OnExit: System.Net.Sockets.SocketException (98): Address already in use
   at Sooloos.Http.HttpServer._Start()
   at Sooloos.Broker.Transport.UPNPZonePlayerBase._reset_http()
   at Sooloos.Broker.Transport.UPNPZonePlayerBase..ctor(UPNPQuirks quirks, State state, IEnumerable`1 endpoints, IEnumerable`1 endpoint_integrations)
   at Sooloos.Broker.Transport.ZonePlayerFactory.Create(State state, IEnumerable`1 endpoints)
   at Sooloos.Broker.Transport.Zone.LL_UpdateEndpoints(Boolean first)
   at Sooloos.Broker.Transport.Zone..ctor(State state, Module module, Sooid zoneid, IEnumerable`1 endpoints)
   at Sooloos.Broker.Transport.Module.ev_threadexit()
   at Sooloos.SynchronizationContextThread.OnExit()

So (speculation follows)

  • activating the Sonos endpoint involves creating a UPNP server on the Roonserver that the Sonos will stream audio from (guessing that from the log)
  • from looking at netstat Roon seems to use ports upwards from 9333 for these UPNP servers to listen on
  • without any endpoint enabled ports 9330-9332 are listening
    9330 - seems to be some sort of api for images e.g. http://192.168.2.150:9330/image/nariaaaa.512.jpg
    9331 - seems to TLS enabled version e.g. https://192.168.2.150:9331/image/nariaaaa.512.jpg
    9332 - seems to be some sort of binary message service
    9333 - 9339 - are 7 ports than can be used for Sonos UPNP
  • when an 8th Sonos device is enabled it perhaps tries to create a listening socket on one of the ports already in use (hence “address already in use”). Maybe it is mistakenly trying to use the 9330-9332 range? I don’t know which port it is attempting to listen on

/speculation