oaasgaa01 0 Posted January 10, 2021 Posted January 10, 2021 Hi, I have been running emby on Ubuntu virtual machines for several years, and now I'm in the process of moving to a docker environment. To start with, this looks good - but I'm struggling to implement two of the key advantages of a docker environment - namely easy horizontal scaling and high availability - by deploying several containers on different docker hosts. First some background information: The docker environment consists of 3 manager nodes which are set up as a docker swarm Both config volume and media volume(s) are external nfs volumes which are shared between all container instances Behind my firewall, I have a reverse proxy set up for routing and load balancing When deploying only one container, it seems to work fine, but as soon as I scale up to two or more, I experience a couple of issues which I have not been able to resolve so far. Connecting and logging into emby works fine with only one instance. When scaling up to 2 (or more) containers, I can sometimes connect and log in to Emby in another window - or from a different app, but suddenly I get "Invalid username or password. Please try again". When deleting the service and recreating it - it works again. I get suspicious about Embys ability to share same config over multiple containers... Can someone confirm if this is supported or not? Proxying and load-balancing between the different docker nodes works fine, but I cannot find out how to set it up to be able to cast to Chromecast in this configuration. I am using an internal dns server to resolve domain (eg. example.com) to the correct internal IP address (eg. 192.168.1.50). The configured path to Emby is then eg. https://example.com/emby which is proxied to 192.168.1.50:16105, 192.168.1.52:16105 and 192.168.1.53:16105 (the 3 docker nodes and the port which is exposed from the emby containers) As mentioned, this works perfect until I try to cast to Chromecast. I just see the emby loading page on the TV, but no loading is performed. I'm quite sure the Chromecast gets the wrong path to stream from... Any guiding to help resolve this would be very much appreciated. Casting to Chromcast works fine if I configure the path directly to one container (eg. 192.168.1.50:16105), but then none of the two docker key advantages mentioned at the beginning are available...
Luke 42078 Posted January 24, 2021 Posted January 24, 2021 Quote Connecting and logging into emby works fine with only one instance. When scaling up to 2 (or more) containers, I can sometimes connect and log in to Emby in another window - or from a different app, but suddenly I get "Invalid username or password. Please try again". When deleting the service and recreating it - it works again. I get suspicious about Embys ability to share same config over multiple containers...Can someone confirm if this is supported or not? @oaasgaa01 how exactly are you sharing the configuration? Is it actually one unique server installation per Docker container?
Luke 42078 Posted January 24, 2021 Posted January 24, 2021 Quote Proxying and load-balancing between the different docker nodes works fine, but I cannot find out how to set it up to be able to cast to Chromecast in this configuration.I am using an internal dns server to resolve domain (eg. example.com) to the correct internal IP address (eg. 192.168.1.50). The configured path to Emby is then eg. https://example.com/emby which is proxied to 192.168.1.50:16105, 192.168.1.52:16105 and 192.168.1.53:16105 (the 3 docker nodes and the port which is exposed from the emby containers)As mentioned, this works perfect until I try to cast to Chromecast. I just see the emby loading page on the TV, but no loading is performed. I'm quite sure the Chromecast gets the wrong path to stream from... Any guiding to help resolve this would be very much appreciated. Hi, yes this looks like your able to connect from app to Chromecast receiver, but the Chromecast receiver is not able to reach your Emby Server. The Chromecast receiver is most likely not going to work with your internal DNS. It would either have to be a public dns name or connected by ip address. Please let us know if this helps. thanks !
oaasgaa01 0 Posted March 17, 2021 Author Posted March 17, 2021 (edited) Hi Luke, and thanks for your feedback. I haven't had time to look more into this until now. My dockerized network is getting closer to being competed, and for the emby part, I'm now running only one docker instance as a swarm service - fixed to one docker host for the time beeing. The setup via reverse proxy is similar to the description above. Access to emby with fqd name, both externally (via external DNS) and internally (via internal DNS) works as expected when running https://domain.no/emby. The reverse proxy in DMZ is forwarding this to docker host 192.168.1.52:16105 in the LAN segment - where port 16105 is mapped to the emby container's port 8096. Casting to Chromecast is not yet working like expected/desired. Looking at the dashboard, I find the following: In-Home (LAN) access: http://172.18.0.3:8096 (which is the container internal ip - not accessable from outside the docker network) Remote (WAN) access: http://real-external-ip:8096 Question: Where is the In-Home (LAN) address taken from? Can it be configured - or is there a header field that could be modified? As a work-around I have made it work when using "docker service create --network host " (docker network is then not isolated as intended in a docker environment) when creating the swarm service. Then the reverse proxy needs to be configured to forward to docker host 192.168.1.52:8096 - and the port 8096 has to be opened in the firewall between DMZ and LAN. Thanks! Edited March 17, 2021 by oaasgaa01
Luke 42078 Posted March 23, 2021 Posted March 23, 2021 Quote Where is the In-Home (LAN) address taken from? Can it be configured - or is there a header field that could be modified? Hi there, yes, have you explored the server Network settings?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now