Jellyfin Forum
jellyscrub Active but not working - 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: jellyscrub Active but not working (/t-jellyscrub-active-but-not-working)

Pages: 1 2


RE: jellyscrub Active but not working - jamjellyjam - 2024-01-25

Looks like the method above doesn't work, here is what I tried

  1. Attempt #1: Created folder in TrueNAS via SMB share (that's what I did for config, cache, media) and mapped it to "/jellyfin" as shown above > Jellyfin won't deploy, it's stuck at "Deploying"
  2. Attempt #2: Checked permissions and chagned them to root > Jellyfin won't deploy, it's stuck at "Deploying"
  3. Attempt #3: Deleted folder that I was mapping and created that folder via CLI in TrueNAS in case there was some weird permissions thing happeing > jellyfin won't deploy, it's stuck at "Deploying"
  4. Attemp #4: For fun within TrueNAS I mapped it to "/jellyfin/jellyfin-web" and this time it deployed but then automatically stopped. Logs show that "The server is expected to host the web client, but the provided content directory is either invalid or empty: /jellyfin/jellyfin-web."

Not sure what to do next and I would like to avoid dong the whole setup from scratch.

Logs:
Code:
2024-01-25T23:26:26.052997719Z [23:26:26] [INF] [1] Main: Jellyfin version: 10.8.13
2024-01-25T23:26:26.064889863Z [23:26:26] [INF] [1] Main: Environment Variables: ["[JELLYFIN_CONFIG_DIR, /config/config]", "[DOTNET_SYSTEM_GLOBALIZATION_INVARIANT, 1]", "[JELLYFIN_DATA_DIR, /config]", "[JELLYFIN_FFMPEG, /usr/lib/jellyfin-ffmpeg/ffmpeg]", "[JELLYFIN_CACHE_DIR, /cache]", "[JELLYFIN_WEB_DIR, /jellyfin/jellyfin-web]", "[JELLYFIN_LOG_DIR, /config/log]"]
2024-01-25T23:26:26.064995995Z [23:26:26] [INF] [1] Main: Arguments: ["/jellyfin/jellyfin.dll"]
2024-01-25T23:26:26.066338536Z [23:26:26] [INF] [1] Main: Operating system: Linux
2024-01-25T23:26:26.067530836Z [23:26:26] [INF] [1] Main: Architecture: X64
2024-01-25T23:26:26.067600722Z [23:26:26] [INF] [1] Main: 64-Bit Process: True
2024-01-25T23:26:26.067644410Z [23:26:26] [INF] [1] Main: User Interactive: True
2024-01-25T23:26:26.067668742Z [23:26:26] [INF] [1] Main: Processor count: 4
2024-01-25T23:26:26.067714274Z [23:26:26] [INF] [1] Main: Program data path: /config
2024-01-25T23:26:26.067851698Z [23:26:26] [INF] [1] Main: Web resources path: /jellyfin/jellyfin-web
2024-01-25T23:26:26.067953745Z [23:26:26] [INF] [1] Main: Application directory: /jellyfin/
2024-01-25T23:26:26.074111561Z [23:26:26] [ERR] [1] Main: The server is expected to host the web client, but the provided content directory is either invalid or empty: /jellyfin/jellyfin-web. If you do not want to host the web client with the server, you may set the '--nowebclient' command line flag, or set'hostwebclient=false' in your config settings.
2024-01-25T23:26:26.075210240Z [23:26:26] [INF] [2] Main: Received a SIGTERM signal, shutting down



RE: jellyscrub Active but not working - TheDreadPirate - 2024-01-26

Hmmmm. I figured it would have written jellyfin-web to that directory, but I guess not. I think you would need to install the jellyfin-web deb package directly on TrueNAS from our repo. Then point jellyfin-web to that directory. Kind of defeating the purpose of using docker.


RE: jellyscrub Active but not working - jamjellyjam - 2024-01-26

Thank you for all your help. If I solve this I'll report back.


RE: jellyscrub Active but not working - Efficient_Good_5784 - 2024-01-26

Does the BIF file generation work? Is your issue that the scrubbing doesn't appear on the web-player's playback bar?

The reason why your container wont run when you changed the mount was that Jellyfin can't find the files needed to host the web client.
Reading this thread, I assumed the same as @TheDreadPirate thinking that the folder would have been recreated in the host mount.

I'm also running Jellyfin with Jellyscrub on a Truenas Scale server. Revert back the host mount of the jellyfin folder, then just simply run the container as root. That should be enough to get Jellyscrub to inject the script itself into the index.html file.

(2024-01-25, 11:51 PM)jamjellyjam Wrote: Attemp #4: For fun within TrueNAS I mapped it to "/jellyfin/jellyfin-web" and this time it deployed but then automatically stopped. Logs show that
I tried the same thing and figured out what's wrong.

It's not enough to make a copy of all the files needed for the jellyfin-web folder and host mount it with "jellyfin/jellyfin-web". I could only get the container to run when I copied everything under "jellyfin/" and put that in a host mount to the container.

So if you do want to go the route of not changing your container to always run as root, you'll have to transfer over all the folders and files in /jellyfin into an outside folder, then make that the host mount that'll replace "/jellyfin" in your container.

If you don't want to run the container as root 24/7, you'll have to do the following.
  1. Edit the container to have a host mount to a blank folder. Start the container.
  2. Through the Truenas App GUI, open the shell of Jellyfin's container.
  3. Do the following command in the shell: cp -r jellyfin/* [path-to-external-folder-mount]/
  4. Exit the shell and re-edit Jellyfin's container to use the external folder with the copied contents. Host mount it as "/jellyfin"
You now have a running container and external access to edit the files under jellyfin-web.
You'll probably want to (or need to) repeat this after each release of a new Jellyfin version in case new things have been added to that folder.

The developer behind Jellyscrub did state some time ago that he's working on integrating it into Jellyfin. So this issue might be solved automatically eventually without needing to do all of this.
I don't know the progress that has been made on this, but I do think that I read that it will be implemented with the release of Jellyfin v10.9.


RE: jellyscrub Active but not working - jamjellyjam - 2024-01-26

I'm new to TrueCharts / docker / containers and appreciate the help and clear instructions.

That's correct, the .BIF files are appearing under each movie in a sub-folder called trickplay. Movie-Name > trickplay > Movie-Name-320.bif   *I'm not sure why it's appending 320.bif I am curious to what the 320 means. I'm confirming, there is no scrubbing in the browser player.

Thanks for doing tests on your end and providing additional instructions. You're right, I would rather not run it as root.

Part 1: Copying files

I'm stuck at step #3
Quote:Do the following command in the shell: cp -r jellyfin/* [path-to-external-folder-mount]/
  • When I enter the Jellyfin shell (TrueNAS > Apps > Jellyfin three-dots > shell) from what I understand I'm in the shell of the container. Wouldn't that mean I can't copy files outside the container / pod ?
  • When I run the command cp -r /jellyfin/* /mnt/pool/apps/jellyfin/jf-web I get an error that directory doesn't exist
  • I tried mapping an SMB share within the pod but because there is no sudo I can't mount to an external folder.

The next hurdle to overcome: How would I go about copying the contents of /jellyfin/* out of the container?

This is the text I get when I open Jellfyfin shell: WARNING: Your user does not have sudo privileges so /usr/local/bin/k3s command will run on your behalf. This might cause permission issues.

Screenshot of shell in case it helps:
[Image: W1Prtxp.png]

Part 2: Running Jellyfin as root

Quote:Revert back the host mount of the jellyfin folder, then just simply run the container as root. That should be enough to get Jellyscrub to inject the script itself into the index.html file.
  1. How would I got about running Jellyfin as root?
  2. Even if it's running as root, how would it inject the script into index.html, the docs for jellyscrub say that you have to manually inject the script into the index.html unless I'm understanding it incorrectly?



RE: jellyscrub Active but not working - Efficient_Good_5784 - 2024-01-26

(2024-01-26, 04:00 AM)jamjellyjam Wrote: I'm not sure why it's appending 320.bif I am curious to what the 320 means.
The number is the resolution of the BIF files.

You probably didn't look at the settings for Jellyscrub. Go to your dashboard, then plugins. Click on Jellyscrub (or the 3-dot menu) to open its settings.
You'll see where the number is coming from. You'll be able to change the number too. Make sure to read the text under the options so that you know what the things do.

This is also why you're probably getting confused. You may have missed it on the github page, and you probably didn't look at the settings, but there's a setting (turned on by default) that makes Jellyscrub inject the script automatically to the end of the index.html file. The reason I stated that you should run the container as root is so that the plugin will have the necessary permissions to do so.
If the auto-inject option works, you don't have to manually inject it yourself. You only have to manually edit it in yourself if this option doesn't do it for you.

The reason for this (from my knowledge) is that for those who run Jellyfin in a container, each restart reverts any changes to the jellyfin-web folder. So upon each restart, Jellyscrub needs to have that script appended into the index.html file.

Now to explain what you're doing wrong with the screenshot.
First, the issue with the sudo privileges warning is that the user running the container is not root. If you configure the app to launch with root access, logging into the shell will not show this.
I'll go over how to give it root access a bit later. I wouldn't try mounting anything in here just to keep things simple.

Second, you are in the shell of the app's container. As in, you're in what the container believes to be the whole system. It doesn't have access to the outside Truenas system.
The point of containerization is to cut off access to services from the rest of your system.
Therefore, when you tell it to copy jellyin/ into that path, it doesn't exist under that name.
Basically, the container running Jellyfin is presenting that whole path as just "jellyfin/jf-web" since that is how you mounted it.
So the correct command to copy everything from that folder would be: "cp -r jellyfin/* jellyfin/jf-web/" (There's an issue with this).
Now this is why I stated to remove the previous host mount you did. The blank host mount should be anything but linked to the name "jellyfin/".
You basically don't have the files if that's the case.

I will say that you should probably change the folder name for this mount path. You'll be copying everything in jellyfin/ into jf-web, which doesn't make sense with what we're trying to do.
However, this shouldn't be an issue as long as you mount "/mnt/pool/apps/jellyfin/jf-web" as "/jellyfin" in the container host path volume settings.


Finally, to run a container as the root user, just change the userID and groupID in the container's settings both to 0 (root is 0).
Truecharts and the IX-Systems provided Jellyfin apps force you to specify a user.

If you manually pull the Jellyfin Docker image using the "Manage Docker Images" section of Truenas's App section, you'll be able to launch Jellyfin without needing to specify the user & group which will just run the thing as root.
The section to do this manually is different on the newest Truenas Scale version. You're still on the previous version (Bluefin) from what I can see of your previous screenshots, but the latest version (Cobia) still has this option, but nested within some option boxes. Though I do think that by calling on TrueChart's Jellyfin app, the Jellyfin Docker image should already be installed on your server (I'm assuming it's with the tag "latest").

Also, as the github page for Jellyscrub states, you got it working but it's just not showing on the web-client.
If you try the "Jellyfin Media Player" client, it has built-in support for Jellyscrub. Try installing it and enabling Jellyscrub on it. You'll see a fully working Jellyscrub implementation on that most likely.
The whole issue you're having right now is tied to just the stock web client.


RE: jellyscrub Active but not working - jamjellyjam - 2024-01-26

This is incredible  Grinning-face I got it working! I can scrub a movie and see thumbnails in both the browser (Firefox) and on the iPhone! I'll have to give Jellyfin Media Player (JMP) a try in the future, right now I'm stoked that I got this working.

Thank you for explaining how containers work and pointing me in the right direction to the several settings within Jellyscrub and TrueNAS.

Here's what I did:
  1. Jellyfin TrueCharts app is deployed / active / running.
  2. I opened TrueNAS shell (System Settings > Shell) not the Jellyfin shell. This was so I can copy the /jellyfin/* contents out of the container versus the previous approach where I was inside the container and couldn't copy out of it.
  3. I then ran the command docker ps to see the container IDs and I looked for the ID where the NAMES header had jellyfin.
  4. I then ran the command docker cp SOURCE DESTINATION (docker cp abcdefg12345Confused-facejellyfin /mnt/pool/apps/jellyfin/jf-web ) this worked and then I can see the contents when I connect to that folder thru SMB share. I did have trouble with the command containerIDConfused-facejellyfin/* as it gave me errors, it did not like the forward slash and asterisk
  5. Shutdown Jellyfin app in TrueNAS
  6. Edited Jellyfin settings to map host-path to /jellyfin
  7. Started Jellyfin
  8. Voila! It works! Because I had the "Inject client script into jellyfin-web" field in Jellyscrub checkmarked I didn't have to do anything else.

It's my first time posting on this forum and a big thank you for making this such a positive experience.

Can this thread be renamed to SOLVED or would the person who started the thread have to change the title?


RE: jellyscrub Active but not working - Efficient_Good_5784 - 2024-01-26

(2024-01-26, 05:17 AM)jamjellyjam Wrote: I then ran the command docker ps to see the container IDs and I looked for the ID where the NAMES header had jellyfin.
I then ran the command docker cp SOURCE DESTINATION (docker cp abcdefg12345Confused-facejellyfin /mnt/pool/apps/jellyfin/jf-web ) this worked and then I can see the contents when I connect to
Just to point this out, these are Docker commands. With Truenas Scale, Docker has been removed with the introduction of Cobia (the current release of Scale). Trunas Scale Bluefin is the last version to have Docker built in.
This method will not work for those using the new Scale versions.

Truenas Scale now just runs Docker images using Kubernetes (k3s).

(2024-01-26, 05:17 AM)jamjellyjam Wrote: It's my first time posting on this forum and a big thank you for making this such a positive experience.

Can this thread be renamed to SOLVED or would the person who started the thread have to change the title?
It appears that only the creator of the thread (and mods most likely) has the ability to mark a specific post as the solution.
The most you can do on other people's threads that are not your own is to just add reactions to posts that you liked.
You can also visit profiles of users to give them a reputation point (on their profiles, click on the reputation number to be taken to the page to do this).

I'm not trying to be mean here, but think about this for a bit. If we marked this thread as solved, does that mean the original poster's problem was solved? He might have a different issue than you.
What happens if this is marked as solved and a new user posts asking for help? Will we need to remove "solved" from the title each time this happens?