Jellyfin Forum
libraries disconnect every couple weeks - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: libraries disconnect every couple weeks (/t-libraries-disconnect-every-couple-weeks)

Pages: 1 2


libraries disconnect every couple weeks - kv3d - 2025-01-31

hello world

my libraries (movies, shows and music) get disconnected every other week or so. this is very, very frustrating. im new to nas-ing. been messing around with it for the past year or two. in my opinion ive set it all up correctly. when it happens i checked the logs and fed it to chat gpt and it told me that there were no errors or things related to loosing libraries. i also flew over it and i didnt see anything that would indicate such a thing.
at this point i really think its jellyfin itself. how can all my other apps work flawlessly but jellyfin does this every other week. its insane. it happened 4 times now.

what should i provide here to get to the bottom of this? is it because i do scubs on truenas scale? î also do smart tests and take snapshots. i cant imagine that those things would do such a thing. quick workd on my hardware i guess. i gutted a older laptop and i use a m.2 to sata controller. i have 3 sata ssds connected to it. runs smooth and dead silent. no issues for at least a year. and jellyfin does work nicely apart from this issue.

please, anything. much appreciated


RE: libraries disconnect every couple weeks - TheDreadPirate - 2025-01-31

Can you share screenshots of how the Jellyfin container is configured in TrueNAS?


RE: libraries disconnect every couple weeks - kv3d - 2025-01-31

of course.
[Image: 1.jpg]


RE: libraries disconnect every couple weeks - TheDreadPirate - 2025-01-31

It looks like you have the config, cache, and transcode directories all in the same root folder on the host. Meaning that all of these folders are intermingling. The cache and transcode folders have daily cleanup jobs that are almost certainly deleting files that shouldn't be deleted in the config folder.

config, cache, and transcode should be in their own folders to ensure separation.

config should be located in /mnt/gurke_pool_01_SSD/apps/jellyfin/config
cache should be located in /mnt/gurke_pool_01_SSD/apps/jellyfin/cache
transcodes should be located in /mnt/gurke_pool_01_SSD/apps/jellyfin/transcodes

Or something like that.


RE: libraries disconnect every couple weeks - kv3d - 2025-02-01

hm, not really. in this video the guy does the same thing. he points config, cache and transcodes to the one single jellyfin dataset. jellyfin creates folders on its own. i did what you said and it created a duplicate installation within my jellyfin folder. now i have to set everyrthing up again. unless i did something wrong but i did it the way he did in the video.
https://youtu.be/3GpaxFYe3MU?t=533


RE: libraries disconnect every couple weeks - TheDreadPirate - 2025-02-02

You would need to relocate all the folders you have in the combined Jellyfin folder into the newly created folders they would otherwise belong to.

Code:
cache:
total 12
drwxr-xr-x  2 jellyfin chris 4096 Jan 27 22:25 fontconfig
drwxr-xr-x 13 jellyfin chris 4096 Feb  2 12:54 jellyfin
drwxr-xr-x  2 jellyfin chris 4096 Oct  6 19:07 neo_compiler_cache

config:
total 160
drwxr-x---  5 jellyfin chris   4096 Oct 11 21:50 config
drwxr-xr-x  9 jellyfin chris   4096 Feb  2 18:50 data
drwxr-xr-x  2 jellyfin chris   4096 Jul 13  2024 liveTV
drwxr-xr-x  2 jellyfin chris 131072 Feb  2 13:09 log
drwxr-xr-x  8 jellyfin chris   4096 Nov 29 17:15 metadata
drwxr-xr-x 18 jellyfin chris   4096 Jan  2 15:01 plugins
drwxr-xr-x  3 jellyfin chris   4096 Aug 15  2023 root
drwxr-xr-x  2 jellyfin chris   4096 Oct  4 23:47 transcodes

Stop Jellyfin, then use my code block above to move each of the folders into the folder they belong to (config or cache). Once finish moving everything where they belong, start jellyfin and it should restore your previous install.


RE: libraries disconnect every couple weeks - kv3d - 2025-02-04

if i were to install it freshly. id do it like this(?)

1: create 1 dataset called jellyfin

2: create 3 new datasets within jellyfin (transcodes, config and cache)
/mnt/gurke_pool_01_SSD/apps/jellyfin/transcodes
/mnt/gurke_pool_01_SSD/apps/jellyfin/config
/mnt/gurke_pool_01_SSD/apps/jellyfin/cache

3: install the app

at this point i want to cleanly install it again. its a bit above my experience level and doesnt give me an absolute certainty it did what it should do. i appreciate the code though Smiling-face
let me know if these steps above are ok. i try that and then i hope its good to go


RE: libraries disconnect every couple weeks - TheDreadPirate - 2025-02-04

The steps you outlined look correct.


RE: libraries disconnect every couple weeks - kv3d - 2025-02-11

awesome. so ive set up jellyfin that way now. so far so good. all metadata has been created and im happy so far. lets see if it stays that way.
one more thing. having my logs open during the install and set up process. now that all metadata has been created and the log has quieted down. i see this happening pretty much every second. any idea what this might be?

Code:
2025-02-11 10:47:04.169280+00:00[11:47:04] [INF] [55] Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Invalid token.
2025-02-11 10:47:04.170709+00:00[11:47:04] [INF] [55] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: CustomAuthentication was challenged.
2025-02-11 10:47:07.202928+00:00[11:47:07] [INF] [54] Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Invalid token.
2025-02-11 10:47:07.203614+00:00[11:47:07] [INF] [54] Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Invalid token.
2025-02-11 10:47:07.203731+00:00[11:47:07] [INF] [54] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: CustomAuthentication was challenged.
2025-02-11 10:47:10.239737+00:00[11:47:10] [INF] [44] Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Invalid token.
2025-02-11 10:47:10.239939+00:00[11:47:10] [INF] [44] Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Invalid token.
2025-02-11 10:47:10.240405+00:00[11:47:10] [INF] [44] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: CustomAuthentication was challenged.
2025-02-11 10:47:13.268566+00:00[11:47:13] [INF] [54] Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Invalid token.
2025-02-11 10:47:13.268793+00:00[11:47:13] [INF] [54] Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Invalid token.
2025-02-11 10:47:13.268873+00:00[11:47:13] [INF] [54] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: CustomAuthentication was challenged.
2025-02-11 10:47:16.290846+00:00[11:47:16] [INF] [54] Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Invalid token.
2025-02-11 10:47:16.290887+00:00[11:47:16] [INF] [54] Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Invalid token.
2025-02-11 10:47:16.290912+00:00[11:47:16] [INF] [54] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: CustomAuthentication was challenged.
2025-02-11 10:47:19.329694+00:00[11:47:19] [INF] [12] Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Invalid token.
2025-02-11 10:47:19.329895+00:00[11:47:19] [INF] [12] Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Invalid token.
2025-02-11 10:47:19.330864+00:00[11:47:19] [INF] [12] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: CustomAuthentication was challenged.



RE: libraries disconnect every couple weeks - TheDreadPirate - 2025-02-11

This is probably a TV client. Android TV, Roku, etc. It was logged in before you reset your server and is attempting to log in with the old token. You would need to figure out which TV client this is and re-log in with fresh credentials.