cbueche wrote: 
> Hello Philippe,
> 
> after my previous posts, I have tried to narrow down the issue of not
> being able to run this plugin in docker in bridge mode. It works in host
> mode, but I'm opinionated :-)
> 
> Despite having a large port list forwarded to the container (including
> 5353:5353/udp), I think there is something missing and it relates to the
> publishPlayer part. Looking at the code of ShairTunes2/plugin/Plugin.pm,
> there is this snippet :
> 
> > 
Code:
--------------------
  >   > eval { $proc = Proc::Background->new( $shairtunes_helper, "-dns", 
"host", Slim::Utils::Network::serverAddr(), $id, "_raop._tcp", @params ); };
--------------------
> > 
> 
> and then when looking at the resulting process with ps -ef :
> 
> > 
Code:
--------------------
  >   > 
/config/cache/InstalledPlugins/Plugins/ShairTunes2W/Bin/shairport_helper-x64-linux
 -dns host 172.30.0.2 91C366DB3DF8@tube _raop._tcp 7405 tp=UDP sm=false 
sv=false ek=1 et=0,1 md=0,1,2 cn=0,1 ch=2 ss=16 sr=44100 pw=false vn=3 
txtvers=1 am=shairtunes2
--------------------
> > 
> 
> So I think this is the issue : the publication uses
> Slim::Utils::Network::serverAddr(), which in docker is not correct...
> instead of my host'IP of 192.168.20.7, it finds 172.30.0.2, which is
> docker's inside address.
> 
> I'm not sure what would be the best way here. An option to provide
> this IP that should be announced ? Maybe docker gurus can join in ?
> 
> EDIT: probably the easiest is to use an environment variable if
> present, and revert to Slim::Utils::Network::serverAddr() if not.

Problem is that your docker's IP address might change at anytime. I
would need to know the NATed address, not easy from inside the plugin I
think. I can always run some script as I'm sure docker provides a way to
get that but candidly, my plate is full these days and most people are
fine with host mode for LMS. In addition, understand that running a lot
of my other applications (bridges for example) is difficult in bridge
mode as they must listen to various TCP/UDP sockets and NAT will make it
impossible there.



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3
------------------------------------------------------------------------
philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=106289

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to