profile
viewpoint

Ask questionsnginx with subpath reverse proxy issue with v10.4.1

Describe the bug <!-- A clear and concise description of what the bug is. --> After installing Jellyfin v10.4.1 over 10.4.0, the nginx reverse proxy with a subpath of /jellyfin no longer works properly after removing base URL path of /jellyfin

To Reproduce <!-- Steps to reproduce the behavior: -->

  1. Started with Jellyfin 10.4.0 with nginx reverse proxy on subpath of /jellyfin working properly
  2. Downloaded and installed Jellyfin 10,4,1 and Jellyfin-ffmpeg updates
  3. Use webui tp remove base URL path
  4. Connect to https://server_ip:8096 - works properly
  5. Connect to https://Public_DNS_Name/jellyfin/ - resolves to Public_DNS_Name/web/index.html#!/login.html and fails to load with '404 Not Found' from nginx
  6. Workaround - Manually edit URL in Chrome to insert /jellyfin, i.e.- "Public_DNS_Name/jellyfin/web/index.html#!/login.html" - now works properly to get to login page, and subsequent URL's work properly

Expected behavior <!-- A clear and concise description of what you expected to happen. --> https://Public_DNS_Name/jellyfin/ should resolve to jellyfin logn page

Logs <!-- Please paste any log errors. -->

Screenshots <!-- If applicable, add screenshots to help explain your problem. -->

System (please complete the following information):

  • OS: Lubuntu 18.10 on AtomicPi
  • Browser: Chrome
  • Jellyfin Version: 10.4.1
  • Reverse proxy: nginx

Additional context <!-- Add any other context about the problem here. -->

Subpath configuration on nginx was created using jellyfin documentation, and has been working fine since jellyfin 10.3. The initial URL may not be coded as relative (i.e.- "./web//index.html#!/login.html" as part of the 10.4.1 changes for base URL.

My nginx configuration details for the subpath are:

location /jellyfin/ { # Proxy main Jellyfin traffic # The / at the end is significant. #resolver 127.0.0.1; # set $jellyserv 127.0.0.1:8096/; # proxy_pass http://$jellyserv/; proxy_pass http://127.0.0.1:8096/; #proxy_pass http://127.0.0.1:8096/jellyfin/;

    proxy_pass_request_headers on;
    proxy_set_header Host $host;

    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-Host $http_host;

    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $http_connection;
}
jellyfin/jellyfin

Answer questions AlexandreBonneau

For info, the bug (and the workaround) is also happening on Debian with the official jellyfin package 10.6.4-1.

When you go to http://localname:8096/ you see the Jellyfin logo briefly, then a black screen and get stuck there. localname here is set in /etc/hosts as an alias for 10.0.0.1, where the server hosting jellyfin is. In the log, you see:

 [ERR] Error processing request. URL: "http://localname:8096/users/public"
System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
   at Jellyfin.Data.Entities.User.GetPreference(PreferenceKind preference)
   at Jellyfin.Server.Implementations.Users.UserManager.GetUserDto(User user, String remoteEndPoint)
   at MediaBrowser.Api.UserService.<>c__DisplayClass8_0.<Get>b__4(User i)
   at System.Linq.Enumerable.SelectIPartitionIterator`2.LazyToArray()
   at MediaBrowser.Api.UserService.Get(GetUsers request, Boolean filterByDevice, Boolean filterByNetwork)
   at MediaBrowser.Api.UserService.Get(GetPublicUsers request)
   at Emby.Server.Implementations.Services.ServiceExecGeneral.Execute(Type serviceType, IRequest request, Object instance, Object requestDto, String requestName)
   at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost httpHost, Object requestDto, IRequest req)
   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost httpHost, IRequest httpReq, HttpResponse httpRes, ILogger logger, CancellationToken cancellationToken)
   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IHttpRequest httpReq, String urlString, String host, String localPath, CancellationToken cancellationToken)

If you manually edit the url to add web/index.html#!/login.html then it shows you the correct login page. This bug breaks the jellyfin-mpv-shim application too.

useful!

Related questions

Alternative audio tracks does not work hot 3
Jellyfin Server Software coming to NAS package centers (like Synology's) hot 3
Plugin Update/Uninstall is failing on Windows hot 2
DLNA not working correctly hot 2
Adding folder to library results in erroneous path could not be found error hot 2
DLNA not working correctly hot 2
Invalid non-ASCII or control character in header: 0x4E0A hot 2
Server doesn't return images of the requested dimensions hot 1
transcoding-temp folder not cleanup up well hot 1
Updating plugins fails with resource temporarily unavailable hot 1
TVDB plugin - Can't fetch some informations/images (Forbidden access) hot 1
WebOS (LG) client hot 1
I can&#39;t find my external hard drive - jellyfin hot 1
Unable to login from EmbyCon hot 1
Unable to connect to Jellyfin Server using Jellyfin Kodi addon hot 1
source:https://uonfu.com/
Github User Rank List