TechPerplexed / Gooby

Gooby: The ultimate infinite Plex media server using a VPS and Cloud service
https://bit.ly/Tech_Perplexed
GNU General Public License v3.0
286 stars 43 forks source link

Emby Websocket connection closing after 1 Min. #208

Closed maestronix closed 2 years ago

maestronix commented 2 years ago

Hi,

very new to all this docker & reverse proxy stuff but trying to get along as good as I can. I've noticed, that the Emby Websocket connection is closed after pretty much exactly one minute disabling the ability to remote control any active Sessions in Emby. I've tried adding additional nginx proxy stuff to some config files but I can't get it to work...

These are the additional lines I've tried to add.

            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-Proto $remote_addr;
            proxy_set_header X-Forwarded-Protocol $scheme;
            proxy_redirect off;

            # Send websocket data to the backend aswell
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";

I've tried adding them to the following files: /var/local/Gooby/Docker/nginx/vhost.d/default /var/local/Gooby/Docker/nginx/my_custom_proxy_settings.conf

also tried adding them to the /etc/nginx/default.conf inside of the container but as soon as I reload nginx of course my lines get removed agai as the config is reloaded. I'm not able to find the config file on the docker host where I could add those lines so my changes become persistent. Is this even the correct approach to enable a steady websocket connection? Greatful for any input to guide me in the right direction. Thanks!

TechPerplexed commented 2 years ago

I'm not sure that I follow you... I have used Emby for years without any issues with just the vanilla installation.

What exactly do you mean by "remote control any active sessions"?

maestronix commented 2 years ago

Hi, attached screenshot. Down below is an option to pause/play the active remote stream and also to stop it or send messages to the user. After one minute this option vanishes because the websocket connection from emby to the remote client gets closed. I've read numerous threads in the emby forums about it and the additional lines seem to have fixed it for most users so I wanted to give it a try.

embywebsocket

TechPerplexed commented 2 years ago

I'm not sure what setting to change in that case... I think you might indeed be better off with the Emby forum in this case because it seems an "Emby thing" from what you described...

maestronix commented 2 years ago

It seems this is more an nginx problem to me. Could you guide me where to add those mentioned extra lines so they‘re active in the nginx container and apply to my emby entry?

Am 27.06.2022 um 18:46 schrieb Tech Perplexed @.***>:

 I'm not sure what setting to change in that case... I think you might indeed be better off with the Emby forum in this case because it seems an "Emby thing" from what you described...

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

TechPerplexed commented 2 years ago

Sorry about the late reply. I'm not versed with Nginx itself, but all needed files should be in /var/local/Gooby/Docker/nginx (if I remember correctly).

Just FYI we are in the process of releasing a version that is based on Traefik. It's currently not ready for public release yet but you can try it on a test server and see if that solves your issue without having to dabble with Nginx. More information in the "omni" branch of this project 😄